Skip to content

auth: move apiGroup to be a suffix in error messages - #13451

Merged
openshift-bot merged 2 commits into
openshift:masterfrom
mfojtik:authorizer-messages
Mar 23, 2017
Merged

openshift-bot merged 2 commits into
openshift:masterfrom
mfojtik:authorizer-messages

Conversation

@mfojtik

@mfojtik mfojtik commented Mar 20, 2017 •

Copy link
Copy Markdown
Contributor

Fixes: #13445

@smarterclayton @enj PTAL

This will make the error messages in sync with rest of the upstream errors.

@mfojtik

mfojtik commented Mar 20, 2017

Copy link
Copy Markdown
Contributor Author

[test]

@mfojtik
mfojtik force-pushed the authorizer-messages branch from f8630f3 to 1bb07a4 Compare March 20, 2017 10:49
@enj

enj commented Mar 20, 2017

Copy link
Copy Markdown
Contributor

@mfojtik want to address everything in #13155?

@mfojtik

mfojtik commented Mar 20, 2017

Copy link
Copy Markdown
Contributor Author

@enj oh I missed that one, sure I want to address everything ;-)

@mfojtik
mfojtik force-pushed the authorizer-messages branch from 1bb07a4 to 6fa3224 Compare March 20, 2017 16:03
@mfojtik

mfojtik commented Mar 20, 2017

Copy link
Copy Markdown
Contributor Author

@enj hope the last commit fixes everything :-) PTAL

@enj enj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update comment and unit tests.

@@ -22,10 +22,5 @@ type RequestInfoFactory interface {

// ForbiddenMessageMaker creates a forbidden message from a MessageContext

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix comment.

@@ -10,16 +10,16 @@ import (
func TestDefaultForbiddenMessages(t *testing.T) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add tests that have all valid fields from AttributesRecord filled out per IsResourceRequest and !IsResourceRequest.

This will test the new groups path and will fail in the future if we start using the other fields in the messages.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i added the test, but keep in mind that eventually we want to get rid of the API group in the message and just use the "human" resource names there, so this test/code will be reworked once again.
The original intent here was to just fix the ordering in messages to match what kube does today ;-)

@smarterclayton

Copy link
Copy Markdown
Contributor

Messages look fine, will leave to Mo to review

@mfojtik
mfojtik force-pushed the authorizer-messages branch 2 times, most recently from e2b43fd to 925ff43 Compare March 21, 2017 09:51
@mfojtik
mfojtik force-pushed the authorizer-messages branch from 925ff43 to 8dec1fa Compare March 22, 2017 09:09
@mfojtik

mfojtik commented Mar 22, 2017

Copy link
Copy Markdown
Contributor Author

@enj hopefully plumbed all tests.

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 8dec1fa

@openshift-bot

Copy link
Copy Markdown
Contributor

@enj

enj commented Mar 22, 2017

Copy link
Copy Markdown
Contributor

LGTM 👍 :shipit:

@mfojtik

mfojtik commented Mar 22, 2017

Copy link
Copy Markdown
Contributor Author

[merge]

@mfojtik

mfojtik commented Mar 23, 2017

Copy link
Copy Markdown
Contributor Author

flake (?): #13522

[merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to 8dec1fa

@openshift-bot

openshift-bot commented Mar 23, 2017 •

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/384/) (Base Commit: 49f5489) (Image: devenv-rhel7_6097)

@openshift-bot
openshift-bot merged commit 902388c into openshift:master Mar 23, 2017
@mfojtik
mfojtik deleted the authorizer-messages branch September 5, 2018 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants