-
Notifications
You must be signed in to change notification settings - Fork 1
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
✨(keycloak) add ralph client for generating access tokens #27
Open
wilbrdt
wants to merge
2
commits into
main
Choose a base branch
from
add-ralph-keycloak
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"clientId": "ralph", | ||
"name": "Ralph", | ||
"description": "The ultimate toolbox for your learning analytics", | ||
"enabled": true, | ||
"rootUrl": "http://localhost:8100", | ||
"adminUrl": "http://localhost:8100", | ||
"baseUrl": "/", | ||
"clientAuthenticatorType": "client-secret", | ||
"secret": "bcef3562-730d-4575-9e39-63e185f99bca", | ||
"redirectUris": ["http://localhost:8100/whoami"], | ||
"webOrigins": ["http://localhost:8100"], | ||
"standardFlowEnabled": true, | ||
"directAccessGrantsEnabled": true, | ||
"fullScopeAllowed": false, | ||
"protocol": "openid-connect", | ||
"publicClient": false, | ||
"protocolMappers": [ | ||
{ | ||
"name": "Roles", | ||
"protocol": "openid-connect", | ||
"protocolMapper": "oidc-usermodel-client-role-mapper", | ||
"config": { | ||
"claim.name": "roles", | ||
"jsonType.label": "String", | ||
"usermodel.clientRoleMapping.clientId": "ralph", | ||
"userinfo.token.claim": "true", | ||
"id.token.claim": "true", | ||
"access.token.claim": "true", | ||
"multivalued": "true" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,10 +14,19 @@ DB_PASSWORD=password | |
KEYCLOAK_USER=admin | ||
KEYCLOAK_PASSWORD=pass | ||
|
||
# Potsie | ||
DEFAULT_REALM_NAME=fun-mooc | ||
TEST_USER_NAME=grafana | ||
TEST_USER_PASSWORD=funfunfun | ||
[email protected] | ||
|
||
# Potsie | ||
POTSIE_TEST_USER_NAME=grafana | ||
POTSIE_TEST_USER_PASSWORD=funfunfun | ||
[email protected] | ||
GRAFANA_CLIENT_ID=potsie | ||
GRAFANA_CLIENT_SECRET=fa9e98ee-61a1-4092-8dac-1597da0c1bb0 | ||
|
||
# Ralph | ||
RALPH_ADMIN_USER_NAME=ralph_admin | ||
RALPH_ADMIN_USER_PASSWORD=funfunfun | ||
[email protected] | ||
RALPH_LEARNER_USER_NAME=ralph_learner | ||
RALPH_LEARNER_USER_PASSWORD=moocmooc | ||
[email protected] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do we want a one-to-one
role
toscope
relationship?If yes, and if we want to support all supported Ralph scopes - could we add the remaining roles?
statestate/write
state/read
define
profile/write
profile/read
Also, it seems that Keycloak doesn't automatically add scopes to the user
access_token
based on his assigned roles.One (manual) approach might be to add something like:
However, I'm new to Keycloak; thus, maybe there is a better/automatic solution to add the scopes to the
access_token
/map roles to scopes?