scitokens / ligo

LIGO OAuth Public Keys
0 stars 1 forks source link

https://scitokens.org/ligo/.well-known/openid-configuration content-type should be application/json #4

Closed jbasney closed 3 years ago

jbasney commented 3 years ago

https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig and https://datatracker.ietf.org/doc/html/rfc8414#section-3.2 indicate that the proper content-type for provider metadata is application/json. However, https://scitokens.org/ligo/.well-known/openid-configuration currently returns a content-type of application/octet-stream. According to https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#mime-types-on-github-pages the content-type is determined by the file extension, so I don't see an obvious fix at the GitHub Pages layer. Our site goes through Cloudflare, so we could potentially change the content-type in Cloudflare, though it doesn't seem easy.

jbasney commented 3 years ago

I think we could do a Cloudflare rewrite rule from openid-configuration to openid-configuration.json.

jbasney commented 3 years ago

Same thing applies to https://scitokens.org/ligo/oauth2/certs.

jbasney commented 3 years ago

Done. Cloudflare FTW.

$ curl -D - https://scitokens.org/ligo/.well-known/openid-configuration
HTTP/2 200
date: Tue, 27 Jul 2021 14:24:49 GMT
content-type: application/json; charset=utf-8
[...]
$ curl -D - https://scitokens.org/ligo/oauth2/certs
HTTP/2 200
date: Tue, 27 Jul 2021 14:28:13 GMT
content-type: application/json; charset=utf-8
[...]