-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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(auth) - New privilege for Associate entities for entities tags and glossary terms #8644
base: master
Are you sure you want to change the base?
Conversation
@@ -4,6 +4,7 @@ public enum DataHubGraphQLErrorCode { | |||
BAD_REQUEST(400), | |||
UNAUTHORIZED(403), | |||
NOT_FOUND(404), | |||
UNAUTHORIZED_TAG_ERROR(405), |
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.
HTTP 405 is well defined in general tech. Let's not override the standard HTTP codes
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.
Reverted back the error code to 403 with different error message
I think we definitely need to add a test around the policy and new privilege added to the existing tests around the policy engine. Note that the policy engine will grant access if any of the policies match, which means the NOT_EQUAL condition would not be given precedence. It is not a deny condition, but the naming might be a bit confusing based on the Specifically, I am not sure this logic allows this use case
|
Comments from John Joyce: The defaults also have to be great |
Hi guys - Circling back on this one. I don't think you have responded directly about the request to drop the exclusionary policy requirement. We've to date kept our policy system extremely simple intentionally. We don't want to break this without deeper consideration. Given the name of the PR, can we please isolate only the changes related to adding a a new privilege for associating tags? That would reduce the surface area dramatically. Then we can focus on adding tests to this and we can merge this. I think we need clear alignment around the exclusionary rules piece. I would want to have a meeting with our team and yours to establish alignment before we proceed any more with this. Please coordinate with Raj Tekal to get that meeting on the books! |
Hi Joyce, I attempted to explain the need for the exclusionary rule in this message #8644 (comment). The rationale behind this is the restriction for tag association would typically not be needed for most tags. It is something that would be needed only for certain specially-governed tags. With inclusive policies alone, the policy/policies for Associate tag privilege has to be updated every time a new tag is introduced in the system. If the use case is to restrict association of 2 tags TagA, TagB and allow only a set of users to associate these 2 tags and allow all users to associate all other tags. The current datahub setup allows all users to associate all tags. Without exclusionary policy, I am thinking it would be hard to establish a policy for Associate tag privilege. We can discuss further on options to configure such a setup or any use case for Associate tags. I will work with Raj to plan for a meeting for this discussion. Thanks |
Hi there. This makes sense. Our team will be considering this reasoning shortly. Getting this through will be a priority for us! |
Codecov ReportAttention: Patch coverage is ❌ Your patch check has failed because the patch coverage (6.09%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage. 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
@jjoyce0510 Please suggest what more is needed in accepting this PR. Thank you. |
@jjoyce0510 - Updated the privilege to call it Associate Entity and applied the logic for glossary terms as well. The other ask was to add more test cases around new policy and we are working on it. |
New privilege to restrict association of tags. We have some use-cases where only a specific group users are authorized to associate certain tags. Also added a resource exclusion capability so that policy can be created for all resources excluding a certain set of resources using NOT_EQUALS policy condition.
To mimic behavior before this change, we need to create a policy which authorizes all users to the new privilege ASSOCIATE TAGS all tag resources.
Checklist
Summary by CodeRabbit
New Features
NOT_EQUALS
to improve filtering capabilities in policy conditions.Bug Fixes
Documentation