Skip to content

Commit

Permalink
Merge pull request #209 from NotActuallyTerry/notactuallyterry/keyclo…
Browse files Browse the repository at this point in the history
…ak-integration

Add support for Keycloak
  • Loading branch information
primetheus authored Jun 17, 2024
2 parents 5cfed28 + 11bb420 commit 3132837
Show file tree
Hide file tree
Showing 6 changed files with 416 additions and 127 deletions.
93 changes: 93 additions & 0 deletions .env.example.keycloak
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#########################
## GitHub App Settings ##
#########################
## Webhook Secret
WEBHOOK_SECRET=development
## GitHub App ID
APP_ID=12345
## Private Key Path
PRIVATE_KEY_PATH=.ssh/team-sync.pem
## Uncomment the following line and use your own GitHub Enterprise
## instance if this will not be used on https://github.com
#GHE_HOST=github.example.com
## Uncomment if you are using a self-signed certificate on GitHub Enterprise.
## Defaults to False.
#VERIFY_SSL=False

## User directory to sync GitHub teams from
## Azure AD = AAD
## Active Directory = LDAP
## OpenLDAP = LDAP
## Okta = OKTA
## Keycloak = KEYCLOAK
USER_DIRECTORY=KEYCLOAK
## Attribute to compare users with
## username or email
USER_SYNC_ATTRIBUTE=username


###################
## Keycloak Settings ##
###################
## Your organizations Okta URL
KEYCLOAK_SERVER_URL=https://example.okta.com

###############################
## Keycloak authentication ##
###############################
## Keycloak account credentials
## This account needs to have access to the master (or equivalent) realm
## as it will be using the Admin API
KEYCLOAK_USERNAME=api-account
KEYCLOAK_PASSWORD=ExamplePassword
## Realm where users are stored
## Default: master
#KEYCLOAK_REALM=master
## Realm where the API account is stored
## Only required if the account is stored in a different realm than your
## users are in
## Default: same as KEYCLOAK_REALM
#KEYCLOAK_ADMIN_REALM=master
## Use the Github Identity Provider within Keycloak?
## This requires you to set up the provider as an Identity provider with
## the user realm
#KEYCLOAK_USE_GITHUB_IDP=true

#########################
## Additional settings ##
#########################
## Stop if number of changes exceeds this number
## Default: 25
#CHANGE_THRESHOLD=25
## Create an issue if the sync fails for any reason
## Default: false
#OPEN_ISSUE_ON_FAILURE=true
## Where to open the issue upon sync failure
#REPO_FOR_ISSUES=github-demo/demo-repo
## Who to assign the issues to
#ISSUE_ASSIGNEE=githubber
## Sync schedule, cron style schedule
## Shortcode for emu accounts
#EMU_SHORTCODE=volcano

## Default (hourly): 0 * * * *
SYNC_SCHEDULE=0 * * * *
## Show the changes, but do not make any changes
## Default: false
#TEST_MODE=false
## Automatically add users missing from the organization
ADD_MEMBER=false
## Automatically remove users from the organisation that are not part of a team
REMOVE_ORG_MEMBERS_WITHOUT_TEAM=false

####################
## Flask Settings ##
####################
## Default: app
FLASK_APP=app
## Default: production
FLASK_ENV=development
## Default: 5000
FLASK_RUN_PORT=5000
## Default: 127.0.0.1
FLASK_RUN_HOST=0.0.0.0
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ setuptools = "*"
cryptography = "*"
werkzeug = "*"
importlib-metadata = "*"
python-keycloak = "*"

[pipenv]
allow_prereleases = false
Expand Down
Loading

0 comments on commit 3132837

Please sign in to comment.