-
Notifications
You must be signed in to change notification settings - Fork 176
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
Add OAuth docs #752
Add OAuth docs #752
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# OAuth integration | ||
|
||
* TOC | ||
{:toc} | ||
|
||
## Overview | ||
|
||
Turnilo can integrate with your OAuth provider. | ||
Turnilo will: | ||
* Redirect your users to authentication page, | ||
* Handle authorization code flow with PKCE (Proof Key for Code Exchange ) | ||
* Will decorate all data requests with access token. | ||
|
||
## Configuration | ||
|
||
To enable OAuth support you need to add top level `oauth` option in your config with following fields: | ||
|
||
- `clientId`: OAuth Client Identifier for your Turnilo instance | ||
- `tokenEndpoint`: Full address of your [token endpoint](https://tools.ietf.org/html/rfc6749#section-3.2) | ||
- `authorizationEndpoint`: Full address of your [authorization endpoint](https://tools.ietf.org/html/rfc6749#section-3.1) | ||
- `redirectUri`: Full address of your Turnilo installation. If you go to this address in browser, your Turnilo install should launch and show home view. | ||
- `tokenHeaderName`: Name of your choosing for the OAuth token header. You will be reading this header in your server plugin. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have default for header name? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No and I don't think we should. This name is used in admin's plugin and should be chosen deliberately. I know that you like to have defaults for most of the config options but I think there's no good one here and we need to force admin to pick one. |
||
|
||
Example: | ||
|
||
```yaml | ||
oauth: | ||
clientId: "turnilo" | ||
tokenEndpoint: "https://oauth.example.com/auth/oauth/token" | ||
authorizationEndpoint: "https://oauth.example.com/auth/oauth/authorize" | ||
tokenHeaderName: "x-turnilo-oauth-token" | ||
redirectUri: "https://turnilo.example.com/" | ||
``` | ||
|
||
## Further reading | ||
|
||
Please refer to our [github discussion](https://github.com/allegro/turnilo/discussions/734) for our use case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add information about supported integration method: PKCE?