blob: aa63cbf2ad0f731bc164b70819b2a92586b4d1ed [file] [view]
Gerrit OAuth2 authentication provider
=====================================
With this plugin Gerrit can use OAuth2 protocol for authentication.
Supported OAuth providers:
* [AirVantage](https://doc.airvantage.net/av/reference/cloud/API/#API-GeneralInformation-Authentication)
* [Azure (previously named Office365)](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols)
* [Bitbucket](https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html)
* [CAS](https://www.apereo.org/projects/cas)
* [CoreOS Dex](https://github.com/coreos/dex)
* [Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) — any generic OpenID Connect provider, via Well-Known Discovery
* [Facebook](https://developers.facebook.com/docs/facebook-login)
* [GitHub](https://developer.github.com/v3/oauth/)
* [GitLab](https://about.gitlab.com/)
* [Google](https://developers.google.com/identity/protocols/OAuth2)
* [Keycloak](http://www.keycloak.org/)
* [Phabricator](https://secure.phabricator.com/book/phabcontrib/article/using_oauthserver/)
* [SAP Cloud Identity Services (IAS)](https://help.sap.com/docs/identity-authentication)
Auth0, Authentik, Amazon Cognito, LemonLDAP::NG and Tuleap were previously
shipped as dedicated providers. They are standard OpenID Connect providers, so
they have been removed in favour of the generic Discovery provider; see
[Documentation/config-discovery.md](src/main/resources/Documentation/config-discovery.md)
for how to migrate their configuration.
See [Documentation/providers.md](src/main/resources/Documentation/providers.md)
for a per-provider capability matrix, and the
[Wiki](https://github.com/davido/gerrit-oauth-provider/wiki) for what it can do
for you.
Prebuilt artifacts
------------------
Prebuilt binary artifacts are available on [release page](https://github.com/davido/gerrit-oauth-provider/releases). Make sure to pick the right JAR for your Gerrit version.
Build
-----
To build the plugin with Bazel, install
[Bazel](https://bazel.build/versions/master/docs/install.html) and run the
following:
```
git clone https://gerrit.googlesource.com/plugins/oauth
cd oauth && bazel build oauth
```
Install
-------
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
```
Reporting bugs
--------------
Make sure to read the [FAQ](https://github.com/davido/gerrit-oauth-provider/wiki/FAQ) before reporting issues.
License
-------
Apache License 2.0