-
Notifications
You must be signed in to change notification settings - Fork 67
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 support for Keycloak #209
Merged
primetheus
merged 10 commits into
3rd-party-integrations:main
from
NotActuallyTerry:notactuallyterry/keycloak-integration
Jun 17, 2024
Merged
Add support for Keycloak #209
primetheus
merged 10 commits into
3rd-party-integrations:main
from
NotActuallyTerry:notactuallyterry/keycloak-integration
Jun 17, 2024
Conversation
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 integration allows Github Team Sync to pull group data from Keycloak via its admin REST API. Users can choose to do a username sync as normal, or they can link to an existing Github account by enabling KEYCLOAK_USE_GITHUB_IDP. This requires the user to add Github as an Identity provider on the user's realm.
Thanks for opening this up @NotActuallyTerry! I'll do some testing and get it merged in for a new release! |
Defining members as None then adding group members to it appears to work in newer Python versions. However, this results in a TypeError in 3.9. Changing this to define an empty list from the outset works better, and I probably should've done that to begin with
No worries! I've pushed another commit fixing an issue that I ran into. Turns out my pipenv didn't fully override the system Python, so something that works in 3.11 but doesn't work in 3.9 slipped through 🤦 |
NotActuallyTerry
force-pushed
the
notactuallyterry/keycloak-integration
branch
from
May 28, 2024 12:35
baac1ad
to
7bc7723
Compare
NotActuallyTerry
force-pushed
the
notactuallyterry/keycloak-integration
branch
from
May 28, 2024 12:52
7bc7723
to
a44359a
Compare
Turns out, you need to start your page at 0 to get all users! How could this have happened!
primetheus
approved these changes
Jun 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds the ability to sync memberships from Keycloak groups to GitHub teams.
Right now, this only supports syncing from groups within a single Keycloak realm. If the need arises, I could look into adding support for defining the realm within the sync map.
As Keycloak supports using GitHub as an IdP, if you have this set up you can enable
KEYCLOAK_USE_GITHUB_IDP
to use their linked GitHub username directly. Further down the line it might be ideal to look at using the GitHub account ID in the sync.