-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:cloudfoundry/uaa into feature/mi…
…nimal_user_lookup * 'develop' of github.com:cloudfoundry/uaa: (76 commits) Bump k8s.io/client-go from 0.21.0 to 0.21.2 in /k8s (#1586) Bump commons-io from 2.7 to 2.10.0 (#1582) Bump k8s.io/api from 0.21.0 to 0.21.2 in /k8s (#1585) Bump github.com/onsi/gomega from 1.11.0 to 1.13.0 in /k8s (#1573) Bump github.com/onsi/ginkgo from 1.16.1 to 1.16.4 in /k8s (#1575) Bump k8s.io/apimachinery from 0.21.0 to 0.21.2 in /k8s (#1587) Github userUserInfo from local configuration (#1595) Add '-Xdebug' jvm args to application container run in cargo if '-Dxdebug=true' option is sepcified for 'gradle run'. (#1592) Bump Guava Dependencies (#1581) Document the 'userInfoUrl' property for OAuth identity provider config Bump Spring Dependencies (#1591) Fix issue 1584 Test that we redirect when client allows only SAML Backfill test cases for using refresh token value that was created with refresh_token_validity seconds specified [#178076368] Bump Spring Dependencies (#1580) fix: test token audience claim in an unordered way Bump Spring Dependencies (#1577) Bump bouncyCastleVersion from 1.68 to 1.69 Small improvements for the consent form (#1561) Use Claims class to desrialize the token string. ...
- Loading branch information
Showing
79 changed files
with
1,496 additions
and
303 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Registering Github as external OAuth provider in UAA | ||
|
||
Github can be setup as an Oauth2 provider for UAA. | ||
|
||
1. Create an OAuth “application” client in Github. | ||
For example at: `https://github.com/organizations/{YOUR-ORG}/settings/applications/new`. | ||
|
||
Add following URI in the “_Authorization callback URL_” text field: | ||
`http://{UAA_HOST}/login/callback/{origin}`. Additional Github | ||
documentation for achieving this can be found here: | ||
[Creating an OAuth App](https://docs.github.com/en/free-pro-team@latest/developers/apps/creating-an-oauth-app) | ||
[Authorizing OAuth Apps](https://docs.github.com/en/free-pro-team@latest/developers/apps/authorizing-oauth-apps) | ||
|
||
2. Make sure you have `Client ID` and `Client secret`. | ||
|
||
3. The following configuration needs to be added in login.yml. | ||
Please refer to 'https://accounts.google.com/.well-known/openid-configuration' for authUrl and tokenUrl | ||
|
||
login: | ||
oauth: | ||
providers: | ||
github: | ||
type: oauth2.0 | ||
providerDescription: Github OAuth provider, using the 'Authorization Code Grant' flow | ||
authUrl: https://github.com/login/oauth/authorize | ||
tokenUrl: https://github.com/login/oauth/access_token | ||
userInfoUrl: https://api.github.com/user | ||
scopes: | ||
- read:user | ||
- user:email | ||
linkText: Login with Github | ||
showLinkText: true | ||
addShadowUserOnLogin: true # users won't need to be pre-populated into the UAA database prior to authenticating with Github | ||
relyingPartyId: REPLACE_WITH_CLIENT_ID | ||
relyingPartySecret: REPLACE_WITH_CLIENT_SECRET | ||
skipSslValidation: false | ||
clientAuthInBody: true | ||
attributeMappings: | ||
given_name: login | ||
family_name: name # Github doesn't split 'given_name' and 'family_name' | ||
user_name: email | ||
|
||
4. Ensure that the scope `email` is included in the`scopes` property. Without | ||
this, UAA will not be able to identify the authenticated user. | ||
|
||
5. Restart UAA. You will see `Login with github` link on your login page. |
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
Oops, something went wrong.