commit | 0ba53fd4ea93654d8c41213b7a39749e8fc61668 | [log] [tgz] |
---|---|---|
author | Andy Botting <andy.botting@ardc.edu.au> | Wed Jun 23 20:24:47 2021 +1000 |
committer | Andy Botting <andy.botting@ardc.edu.au> | Mon Jan 17 15:39:32 2022 +1100 |
tree | 4f71fd10c77824b2db20d80795eca47089e83681 | |
parent | 4aa7322db5ec221b2419e12a9ec7af5b8c66659c [diff] |
Make preferred_username optional for Keycloak This commit adds a new config option 'use-preferred-username' which can be used with the Keycloak provider to make it optional to use the preferred_username delivered by Keycloak. This is useful in situations where the preferred_username is set as an email address, which don't work as a gerrit username. Leaving the username unset also allows the user to choose their own username. Change-Id: Iff114537527c672190c6a1a41726d2c32bb97810
With this plugin Gerrit can use OAuth2 protocol for authentication. Supported OAuth providers:
See the Wiki what it can do for you.
Prebuilt binary artifacts are available on release page. Make sure to pick the right JAR for your Gerrit version.
To build the plugin with Bazel, install Bazel and run the following:
git clone https://gerrit.googlesource.com/plugins/oauth cd oauth && bazel build oauth
Copy the bazel-bin/oauth.jar
to $gerrit_site/plugins
and re-run init to configure it:
java -jar gerrit.war init -d <site> [...] *** OAuth Authentication Provider *** Use Bitbucket OAuth provider for Gerrit login ? [Y/n]? n Use Google OAuth provider for Gerrit login ? [Y/n]? Application client id : <client-id> Application client secret : confirm password : Link to OpenID accounts? [true]: Use GitHub OAuth provider for Gerrit login ? [Y/n]? n
Make sure to read the FAQ before reporting issues.
Apache License 2.0