-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: implement access Policy public API #1998
base: main
Are you sure you want to change the base?
Conversation
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.
Reviewed 5 of 10 files at r1, 5 of 5 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @roaminggypsy)
src/main/kotlin/org/wfanet/measurement/access/service/Errors.kt
line 326 at r2 (raw file):
ServiceException( Errors.Reason.POLICY_ALREADY_EXISTS, "Policy $name already exists",
This shouldn't take the name as you can get an ALREADY_EXISTS for other reasons, such as a policy (with possibly a different name) already existing for the specified protected resource. The backend doesn't have a great way to distinguish which case it is, so we can't either.
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.
Reviewable status: 7 of 10 files reviewed, 1 unresolved discussion (waiting on @SanjayVas)
src/main/kotlin/org/wfanet/measurement/access/service/Errors.kt
line 326 at r2 (raw file):
Previously, SanjayVas (Sanjay Vasandani) wrote…
This shouldn't take the name as you can get an ALREADY_EXISTS for other reasons, such as a policy (with possibly a different name) already existing for the specified protected resource. The backend doesn't have a great way to distinguish which case it is, so we can't either.
Ohhh okay. I was thinking about the inconsistency in RoleAlreadyExists and PrincipalAlreadyExists. The principal one does not take name as a param, but the role one does.
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.
Reviewed 3 of 3 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @roaminggypsy)
src/main/kotlin/org/wfanet/measurement/access/service/Errors.kt
line 326 at r2 (raw file):
Previously, roaminggypsy (Lin) wrote…
Ohhh okay. I was thinking about the inconsistency in RoleAlreadyExists and PrincipalAlreadyExists. The principal one does not take name as a param, but the role one does.
The Role one actually has the same problem, I just didn't catch it in previous code review. The only ALREADY_EXISTS error where we know the cause for sure is POLICY_BINDING_MEMBERSHIP_ALREADY_EXISTS.
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.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @roaminggypsy)
src/main/kotlin/org/wfanet/measurement/access/service/Errors.kt
line 326 at r2 (raw file):
Previously, SanjayVas (Sanjay Vasandani) wrote…
The Role one actually has the same problem, I just didn't catch it in previous code review. The only ALREADY_EXISTS error where we know the cause for sure is POLICY_BINDING_MEMBERSHIP_ALREADY_EXISTS.
Got it I will fix that in another PR.
904026e
to
9dc99e1
Compare
No description provided.