improve grant page appearance, allow partial scope approval#10321
Merged
openshift-bot merged 1 commit intoopenshift:masterfrom Aug 15, 2016
liggitt:grant-page
Merged
improve grant page appearance, allow partial scope approval#10321openshift-bot merged 1 commit intoopenshift:masterfrom liggitt:grant-page
openshift-bot merged 1 commit intoopenshift:masterfrom
liggitt:grant-page
Conversation
Contributor
Author
Contributor
Author
|
[test] |
Contributor
|
LOVE. IT. |
Contributor
|
How do service accounts render? |
Contributor
|
Should we only check by default the risky things, and then put a warning if any of them have to be opted in? I.e. force users to opt into the scarier ones? |
Contributor
Author
Contributor
Author
|
updated with service account rendering, ready for review |
|
|
||
| var defaultGrantTemplate = template.Must(template.New("defaultGrantForm").Parse(defaultGrantTemplateString)) | ||
|
|
||
| const defaultGrantTemplateString = `<!DOCTYPE html> |
Contributor
Contributor
pkg/auth/server/grant/templates.go
Outdated
| <head> | ||
| <title>Authorize {{ .Values.ClientID }}</title> | ||
| <style> | ||
| body { font-family: sans-serif; line-height: 1.2em; margin: 2em 5%; color: #222; } |
Member
There was a problem hiding this comment.
#363636 is our base font color in openshift
Contributor
|
go code lgtm. @jwforres merge is yours. |
Member
|
template LGTM |
Contributor
Author
|
[merge] |
Contributor
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7918/) (Image: devenv-rhel7_4831) |
Contributor
|
Evaluated for origin merge up to 3905a09 |
Contributor
|
Evaluated for origin test up to 3905a09 |
Contributor
|
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7918/) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Service account <foo> in project <bar>...)To exercise various permutations of the page:
Create a prompting OAuth client and an OAuth service account:
Start the OAuth flow requesting a bunch of scopes ([example oauth client link](https://localhost:8443/oauth/authorize?client_id=myclient&response_type=token&scope=user:info user:check-access user:full role:admin:* role:admin:*:! role:admin:my-namespace role:admin:my-namespace:!), [example service account link](https://localhost:8443/oauth/authorize?client_id=system:serviceaccount:default:builder&response_type=token&scope=user:info user:check-access role:admin:default role:admin:default:!))
Go through the flow several times, exercising various permutations:
At each step, the OAuthClientAuthorization object for the user should include all the scopes approved thus far, and the created OAuthAccessToken objects should include the scopes that were both requested AND approved.
Before:

After

No existing permissions:
With existing permissions:

When the client is a service account:

Mobile view:

