This repository has been archived by the owner on Jul 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 403
docs(OAuth2):added guide for aws cognito #2017
Open
joetancy
wants to merge
7
commits into
spinnaker:master
Choose a base branch
from
joetancy:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c37f033
added guide for aws cognito
joetancy f053aea
Merge branch 'master' into patch-1
joetancy bbdd7c0
Edited the doc based on comments in PR #2017
joetancy 7e978a2
better bullet formatting
joetancy ee84cca
Merge branch 'master' into patch-1
joetancy e5c856c
Merge branch 'master' into patch-1
joetancy 20a12b9
Merge branch 'master' into patch-1
joetancy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,62 @@ | ||||||
--- | ||||||
title: "AWS Cognito" | ||||||
sidebar: | ||||||
nav: setup | ||||||
--- | ||||||
|
||||||
This page instructs you on how to obtain an OAuth 2.0 client ID and client secret for | ||||||
use with your AWS Cognito User Pools. | ||||||
|
||||||
## Setting up an AWS Cognito App Client | ||||||
|
||||||
1. Navigate to [https://aws.amazon.com/cognito/](https://aws.amazon.com/cognito/) and log in with your AWS credentials. | ||||||
2. Search for Cognito in the search bar. | ||||||
3. Select the user pools you want Spinnaker to use. | ||||||
4. At the side bar under "General settings", select "App clients", add a client. | ||||||
- Make sure you select "Generate client secret." | ||||||
5. After that go to "App integration", then to "App client settings." | ||||||
- Select "Cognito User Pool" as one of the "Enabled Identity Providers." | ||||||
- Input your callback URL. | ||||||
- Check the following | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- Authorization code grant, Implicit grant | ||||||
- email, openid | ||||||
- Also make sure you already have a domain name for your hosted UI | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
Have these credentials ready before moving on to the next step | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- App client id | ||||||
- App client secret | ||||||
- Hosted UI domain name | ||||||
|
||||||
## Configure Halyard | ||||||
|
||||||
You can configure Halyard either with the [CLI](/reference/halyard/commands/) or by manually editing the hal config. | ||||||
|
||||||
### Hal config | ||||||
|
||||||
```yaml | ||||||
security: | ||||||
authn: | ||||||
oauth2: | ||||||
enabled: true | ||||||
client: | ||||||
clientId: {CLIENT_ID} | ||||||
clientSecret: {CLIENT_SECRET} | ||||||
accessTokenUri: {YOUR_DOMAIN_NAME}/oauth2/token | ||||||
userAuthorizationUri: {YOUR_DOMAIN_NAME}/oauth2/authorize | ||||||
preEstablishedRedirectUri: {GATE_URL}/login | ||||||
useCurrentUri: false | ||||||
resource: | ||||||
userInfoUri: {YOUR_DOMAIN_NAME}/oauth2/userInfo | ||||||
userInfoMapping: {} | ||||||
provider: OTHER | ||||||
``` | ||||||
|
||||||
### CLI | ||||||
|
||||||
1. Set up OAuth 2.0 with AWS Cognito: | ||||||
|
||||||
`hal config security authn oauth2 edit --provider OTHER --client-id (client ID from above) --client-secret (client secret from above) --access-token-uri (your domain name)/oauth2/token --user-authorization-uri (your domain name)/oauth2/authorize --user-info-uri (your domain name)/oauth2/userInfo` | ||||||
|
||||||
2. Enable OAuth 2.0 using: | ||||||
|
||||||
`hal config security authn oauth2 enable` |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, @joetancy, I should have done this the last time I looked at this. Can you change all UI elements to be in boldface instead of double-quotes? Thanks!
https://developers.google.com/style/ui-elements