Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Sync Scope Strategies in Oathkeeper&Hydra #497

Merged
merged 6 commits into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/docs/scope-strategies-hydra.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
id: oauth2-token-introspection-hydra
title: Connect to ORY Hydra OAuth2 Token Introspection
---

vinckr marked this conversation as resolved.
Show resolved Hide resolved
This document is a work in progress.

## Synchronize Access Token / OAuth2 Scope Strategy

When using ORY Oathkeeper together with ORY Hydra the scope strategy needs to be kept in sync.

ORY Oathkeeper sends the scope as part of the introspection request. [(More about token introspection)](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/)

[Hydra](https://www.ory.sh/hydra/docs/guides/oauth2-token-introspection/) processes this scope parameter (which is actually not defined in the OAuth2 Introspection RFC) according to the scope strategy defined in Hydra.

The scope strategy defined in ORY Oathkeeper serves as a fallback for when OAuth2 servers do not implement this feature.

Therefore, these two settings must be kept in sync.

[Here](https://www.ory.sh/hydra/docs/reference/api#parameters-27) you can find the Hydra setting and [here](https://www.ory.sh/oathkeeper/docs/v0.37/pipeline/authn/#configuration-5) the respective one for Oathkeeper.

The same problem would arise if you configure your client to be allowed to request scope foo and your OAuth2 request requests foo.bar.
1 change: 1 addition & 0 deletions docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
],
"Guides": [
"configure-deploy"
"oauth2-token-introspection-hydra"
],
"Reference": [
"reference/configuration",
Expand Down