feat: introduce auth scheme and jumping to next authentication#982
feat: introduce auth scheme and jumping to next authentication#982Marlinc wants to merge 1 commit intoory:masterfrom
Conversation
f64c7a0 to
fb908e1
Compare
Codecov Report
@@ Coverage Diff @@
## master #982 +/- ##
===========================================
- Coverage 77.79% 66.31% -11.48%
===========================================
Files 81 107 +26
Lines 3873 4771 +898
===========================================
+ Hits 3013 3164 +151
- Misses 587 1325 +738
- Partials 273 282 +9
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
41d2dc6 to
0a4adec
Compare
0a4adec to
2e345a4
Compare
aeneasr
left a comment
There was a problem hiding this comment.
Thank you @Marlinc and sorry. for the late review! I'm wondering if it would make more sense to use a generic authenticator in such a case? The bearer token authenticator is supposed to solve https://datatracker.ietf.org/doc/html/rfc6750 which is expecting the Bearer to be in the header. If that's not the case, wouldn't it be a different type of authentication (same mechanism maybe, but a different HTTP auth mechanism).
We could add another authenticator that handles this (e.g. a more generic one)
|
This would potentially be solved by: #949 |
2e345a4 to
64e332f
Compare
Some (legacy) application don't use
Beareras auth scheme in theAuthorizationheader, in the current implementation this means Oathkeeper cannot be used to handle these legacy applications. The bearer token (and cookie) authenticator currently also don't support handling multiple authentication configurations (for example an access token in a header but also in a query parameter).This change adds an optional
auth_schemeoption to the bearer token authenticator that allows changing the scheme it accepts, it also supports setting an empty scheme for applications that provide a token directly in a header. For compatibility it defaults toBearerwhen the header is set toAuthorization. The second change is that the session store endpoint can now return aHTTP 406 Not Acceptableresponse to tell Oathkeeper to jump to the next authentication rule.This changes were previously discussed on Slack.
I will add some documentation too about these new features.
Related issue(s)
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security. vulnerability, I
confirm that I got green light (please contact
security@ory.sh) from the maintainers to push
the changes.
works.
Further Comments