Skip to content
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(access control): Fine-Grained Access Control M1 #3182

Merged
merged 76 commits into from
Sep 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
1e34f75
Merging in from GraphQL branch
jjoyce0510 Aug 19, 2021
642bad8
Finally merging
jjoyce0510 Aug 19, 2021
dfe92c9
Removing unnecessary files
jjoyce0510 Aug 19, 2021
bc028db
Completing migration of GraphQL API
jjoyce0510 Aug 20, 2021
e6808bd
Fix checkstyle
jjoyce0510 Aug 20, 2021
fd519ac
Fixing some things up
jjoyce0510 Aug 20, 2021
d015b77
Updating container values
jjoyce0510 Aug 20, 2021
d2fb643
Rebranding to metadat-service
jjoyce0510 Aug 20, 2021
238a58a
pleasing docusauraus
jjoyce0510 Aug 20, 2021
84ef751
Merging in SSO
jjoyce0510 Aug 20, 2021
9931b33
Merging in changes from other branch
jjoyce0510 Aug 20, 2021
57d169d
remove unnecessary file
jjoyce0510 Aug 20, 2021
e0b6839
merging in policies gql
jjoyce0510 Aug 18, 2021
1ec7a4d
Adding me resolver
jjoyce0510 Aug 18, 2021
95bd14f
Adding slide out panel
jjoyce0510 Aug 18, 2021
bd37465
Adding policies first pass
jjoyce0510 Aug 22, 2021
5d49419
Policies
jjoyce0510 Aug 23, 2021
0493cd0
Policies
jjoyce0510 Aug 23, 2021
1982e0b
Adding a new file
jjoyce0510 Aug 23, 2021
b27fb8f
Adding policy builder updates
jjoyce0510 Aug 24, 2021
ce8e421
adding untracked files
jjoyce0510 Aug 24, 2021
4ee99c0
Adding files
jjoyce0510 Aug 24, 2021
9c04f9d
Adding AuthorizationManager
jjoyce0510 Aug 25, 2021
4a565da
Finalizing some things
jjoyce0510 Aug 25, 2021
aafd4b8
Policies
jjoyce0510 Aug 26, 2021
27f156a
Removing unnecessary var
jjoyce0510 Aug 26, 2021
92af050
Disabling warning notices
jjoyce0510 Aug 27, 2021
507e10b
Adding file
jjoyce0510 Aug 27, 2021
be519ce
Adding policy config resolver
jjoyce0510 Aug 30, 2021
3bc520d
Improving policies by adding bootstrap manager
jjoyce0510 Aug 31, 2021
a2d9891
Yes
jjoyce0510 Aug 31, 2021
5f3d642
Merge branch 'master' into RbacP1
jjoyce0510 Aug 31, 2021
77bbece
Fine-Grained Access Control P1
jjoyce0510 Aug 31, 2021
a070689
Fix system principal
jjoyce0510 Aug 31, 2021
ec47785
Assets
jjoyce0510 Aug 31, 2021
f1a9d7e
adding docs
jjoyce0510 Aug 31, 2021
ba5f94b
Remove unnecessary authorizer refereence
jjoyce0510 Aug 31, 2021
dadbee3
Rebranding custom exceptions
jjoyce0510 Aug 31, 2021
31e7629
Small fix
jjoyce0510 Aug 31, 2021
a04818f
Better names
jjoyce0510 Aug 31, 2021
fab7d1f
MapResources comment
jjoyce0510 Aug 31, 2021
4eac96f
Remove unnecessary comments etc
jjoyce0510 Aug 31, 2021
979871c
Correct analytics view
jjoyce0510 Aug 31, 2021
9f19245
Bootstrap naming
jjoyce0510 Aug 31, 2021
f8f070b
Actor
jjoyce0510 Aug 31, 2021
72fc2eb
Adding java docs
jjoyce0510 Aug 31, 2021
2fdfcf0
Consolidate where constants live
jjoyce0510 Aug 31, 2021
f287a26
Add
jjoyce0510 Aug 31, 2021
0fa51ee
Adding a super policy for all users
jjoyce0510 Aug 31, 2021
e585118
Adding app config and more
jjoyce0510 Sep 1, 2021
21ef446
Refactoring GraphQL land
jjoyce0510 Sep 1, 2021
8154d56
Disabling edit and delete for built in policies
jjoyce0510 Sep 1, 2021
bb7b6a1
clean up
jjoyce0510 Sep 1, 2021
6a451ca
Adjust testIngestTemporalAspect
jjoyce0510 Sep 1, 2021
d4d19e5
Adding policies doc
jjoyce0510 Sep 1, 2021
c9a2ffe
Controls
jjoyce0510 Sep 1, 2021
b0b08a6
Policies guide
jjoyce0510 Sep 1, 2021
51fb9c6
EntityKeyUtilsTest
jjoyce0510 Sep 1, 2021
d776ac9
adding smoke tests
jjoyce0510 Sep 1, 2021
bb5f455
test me query
jjoyce0510 Sep 1, 2021
484a77f
Adding policy engine test
jjoyce0510 Sep 1, 2021
1415444
Adding authorization manager test
jjoyce0510 Sep 1, 2021
fffa9e1
Additional tests
jjoyce0510 Sep 1, 2021
1b9ec63
Fix checkstyle and more
jjoyce0510 Sep 1, 2021
683219e
Merging master
jjoyce0510 Sep 1, 2021
89e6e29
More refactoring
jjoyce0510 Sep 2, 2021
819853e
Actors should be urns for now
jjoyce0510 Sep 2, 2021
f3ecbdc
Refactoring Entity Key work on MCP path
jjoyce0510 Sep 2, 2021
be278e2
Fixing entity key ingest
jjoyce0510 Sep 2, 2021
6868f7b
Making Side slide visible
jjoyce0510 Sep 2, 2021
2005b10
Final pass
jjoyce0510 Sep 2, 2021
d4a2e22
Updating GMS docs
jjoyce0510 Sep 2, 2021
042f19b
Fixing NPE from model groups.
jjoyce0510 Sep 2, 2021
b877ddc
Fixing error handling in UI
jjoyce0510 Sep 3, 2021
d003978
Adding back seeded policies
jjoyce0510 Sep 3, 2021
e397374
Revert doc changes
jjoyce0510 Sep 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding policy engine test
  • Loading branch information
jjoyce0510 committed Sep 1, 2021
commit 484a77fc6b92b9a3cc9b47c65947bd82bedcdb0a
4 changes: 3 additions & 1 deletion metadata-service/auth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ dependencies {
compile externalDependency.lombok

annotationProcessor externalDependency.lombok
compile externalDependency.servletApi

testCompile externalDependency.mockito

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.linkedin.identity.GroupMembership;
import com.linkedin.metadata.aspect.CorpUserAspect;
import com.linkedin.metadata.aspect.VersionedAspect;
import com.linkedin.metadata.authorization.PoliciesConfig;
import com.linkedin.metadata.snapshot.CorpUserSnapshot;
import com.linkedin.policy.DataHubActorFilter;
import com.linkedin.policy.DataHubPolicyInfo;
Expand Down Expand Up @@ -45,6 +46,11 @@ public PolicyEvaluationResult evaluatePolicy(

final PolicyEvaluationContext context = new PolicyEvaluationContext();

// If policy is inactive, simply return DENY.
if (PoliciesConfig.INACTIVE_POLICY_STATE.equals( policy.getState())) {
return PolicyEvaluationResult.DENIED;
}

// If the privilege is not in scope, deny the request.
if (!isPrivilegeMatch(privilege, policy.getPrivileges(), context)) {
return PolicyEvaluationResult.DENIED;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.datahub.metadata.authorization;

public class AuthorizationManagerTest {
}
Loading