-
Notifications
You must be signed in to change notification settings - Fork 26
feat(keycloak): add public client for browser-based SDK authentication #3050
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
|
|
@@ -77,10 +77,23 @@ realms: | |
| name: cli-client | ||
| serviceAccountsEnabled: false | ||
| publicClient: true | ||
| directAccessGrantsEnabled: true | ||
| redirectUris: | ||
| - 'http://localhost:*' | ||
| protocolMappers: | ||
| - *customAudMapper | ||
| - client: | ||
| clientID: opentdf-public | ||
|
Contributor
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. Similar to the # WARNING: This client is for browser-based SDK quickstarts and local testing only.
# It uses the less-secure password grant flow. Do not use in production.
clientID: opentdf-public |
||
| enabled: true | ||
| name: opentdf-public | ||
| serviceAccountsEnabled: false | ||
| publicClient: true | ||
| directAccessGrantsEnabled: true | ||
|
Contributor
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. Enabling |
||
| redirectUris: | ||
| - 'http://localhost:*' | ||
| - 'http://127.0.0.1:*' | ||
|
Comment on lines
+93
to
+94
Contributor
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. The use of wildcards in |
||
| protocolMappers: | ||
| - *customAudMapper | ||
| users: | ||
| - username: sample-user | ||
| enabled: true | ||
|
|
||
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.
Enabling
directAccessGrantsEnabled(Resource Owner Password Credentials grant) is discouraged by OAuth 2.0 security best practices as it increases the risk of credential theft and bypasses MFA. While intended for local development, it's crucial to add a warning comment here to prevent accidental enabling in production environments. For production, the Authorization Code Flow with PKCE is the recommended secure alternative.