Hello. We're already using Ory Oathkeeper + Ory N...
# ory-selfhosting
r
Hello. We're already using Ory Oathkeeper + Ory Network Hydra to enable authentication on our API via OAuth access tokens through the
oauth2_introspection
authenticator. We'd like to add support for API keys using the
bearer_token
where we'll validate against internal tools that can check the API keys.
Question: is it possible to have all the API consumers use the same header, and have Oathkeeper "fall through" to the next authenticator if the first one fails?
E.g. • Request comes through with
Authorization: Bearer <some-value>
• Oathkeeper attempts
bearer_token
◦ if it passes, request is allowed ◦ if it fails, it falls through to next authenticator • Oathkeeper attempts
oauth2_introspection
◦ if it passes, request is allowed ◦ if it fails, it request is denied
Current observation This configuration doesn't seem to work currently. Once
bearer_token
authentication fails, the request is denied immediately.
jwt
+
oauth2_introspection
seems to work Interestingly, we also have
jwt
enabled here, so API consumers can send:
Copy code
Authorization: Bearer <jwt>
In this case, if
jwt
fails, it's currently falling back to
oauth2_introspection
NB: we found an undocumented flag on
bearer_token
config that will help us accomplish our goal: https://github.com/ory/docs/pull/2288 The flag is
prefix