-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve grant page appearance, allow partial scope approval #10321
Conversation
[test] |
LOVE. IT. |
How do service accounts render? |
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? |
updated with service account rendering, ready for review |
|
||
var defaultGrantTemplate = template.Must(template.New("defaultGrantForm").Parse(defaultGrantTemplateString)) | ||
|
||
const defaultGrantTemplateString = `<!DOCTYPE html> |
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.
<head> | ||
<title>Authorize {{ .Values.ClientID }}</title> | ||
<style> | ||
body { font-family: sans-serif; line-height: 1.2em; margin: 2em 5%; color: #222; } |
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.
#363636
is our base font color in openshift
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.
fixed
go code lgtm. @jwforres merge is yours. |
template LGTM |
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7918/) (Image: devenv-rhel7_4831) |
Evaluated for origin merge up to 3905a09 |
Evaluated for origin test up to 3905a09 |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7918/) |
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: