The auth header type should be taken from the openID Connect capabilities
- Dominant language
- TypeScript
- Stars
- 189
- Forks
- 37
- Avg merge
- 17h 18m
- Merged PRs (30d)
- 17
Description
See https://github.com/Kinto/kinto-admin/pull/509#pullrequestreview-108359050
When authenticating using openID Connect, the headers that are sent to the kinto server are using `Bearer`, which is hardcoded. Instead it should use the `header_type` from the capabilities, eg:
```json
"openid":{
"description":"OpenID connect support.",
"url":"http://kinto.readthedocs.io/en/stable/api/1.x/authentication.html",
"providers":[
{
"name":"google",
"issuer":"https://accounts.google.com",
"auth_path":"/openid/google/login",
"client_id":"248628588820-707f9m6vs19jt7g41cev4iqkglu72u58.apps.googleusercontent.com",
"header_type":"Bearer",
"userinfo_endpoint":"https://www.googleapis.com/oauth2/v3/userinfo"
}
]
}
```
Fixing this might also fix the [review from @leplatrem](https://github.com/Kinto/kinto-admin/pull/509#pullrequestreview-122460014) about the ugliness of splitting/concatenating strings to get the auth type and provider for openID Connect. If we can pass the full "provider capability" object, we'll be able to extract both the provider name and the header type.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with pull request 509 and the linked review comments, then trace the OpenID Connect authentication flow that reads the capabilities. Confirm how the provider capability is passed into request construction and verify that the configured header_type and provider name are used without splitting or concatenating strings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100