Adding ResourceNotFound Error when user does not have access to resource#368
Merged
Bento007 merged 2 commits intotsmith/auto-provisionfrom Dec 6, 2019
Merged
Adding ResourceNotFound Error when user does not have access to resource#368Bento007 merged 2 commits intotsmith/auto-provisionfrom
Bento007 merged 2 commits intotsmith/auto-provisionfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## tsmith/auto-provision #368 +/- ##
=========================================================
- Coverage 89.53% 89.46% -0.07%
=========================================================
Files 34 34
Lines 2197 2203 +6
=========================================================
+ Hits 1967 1971 +4
- Misses 230 232 +2
Continue to review full report at Codecov.
|
chmreid
approved these changes
Dec 6, 2019
Contributor
chmreid
left a comment
There was a problem hiding this comment.
A few minor things, but overall lookin good
| authz_params = get_resource_authz_parameters(body['principal'], body['resource']) | ||
| except AuthorizationException: | ||
| response = {'result': False, 'reason': "The user is disabled."} | ||
| response = {'result': False, 'reason': "UserDisabled"} |
Contributor
There was a problem hiding this comment.
I would expect this error message to be "User is not authorized" or similar - does "disabled" better describe this outcome?
Collaborator
Author
There was a problem hiding this comment.
Not authorized is implied by the result false. The reason gives more details to the server side applications as to why they are not authorized.
Co-Authored-By: Charles Reid <53452777+chmreid@users.noreply.github.com>
Bento007
added a commit
that referenced
this pull request
Dec 6, 2019
…rce (#368) When a user tries to access a controlled access resource they do not have any access privileges to, the object appears as if it does not exist. A user should not know about resources they do not have access to. ResourceNotFound error raised during evaluation if the user does not have access to the specified resource type or id. Co-Authored-By: Charles Reid <53452777+chmreid@users.noreply.github.com>
Bento007
added a commit
that referenced
this pull request
Dec 9, 2019
…rce (#368) When a user tries to access a controlled access resource they do not have any access privileges to, the object appears as if it does not exist. A user should not know about resources they do not have access to. ResourceNotFound error raised during evaluation if the user does not have access to the specified resource type or id. Co-Authored-By: Charles Reid <53452777+chmreid@users.noreply.github.com>
Bento007
added a commit
that referenced
this pull request
Dec 10, 2019
…rce (#368) When a user tries to access a controlled access resource they do not have any access privileges to, the object appears as if it does not exist. A user should not know about resources they do not have access to. ResourceNotFound error raised during evaluation if the user does not have access to the specified resource type or id. Co-Authored-By: Charles Reid <53452777+chmreid@users.noreply.github.com>
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.
When a user tries to access a controlled access resource they do not have any access privileges to, the object appears as if it does not exist. A user should not know about resources they do not have access to.