Skip to content

Commit 194ee0b

Browse files
authored
Merge pull request #3413 from atlanhq/wf_service_account
WIN-24 | Grant permissions to governance workflow client
2 parents 9d8dc78 + 6b135d5 commit 194ee0b

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

addons/policies/bootstrap_entity_policies.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,7 +2120,8 @@
21202120
[
21212121
"admin",
21222122
"service-account-atlan-argo",
2123-
"service-account-atlan-backend"
2123+
"service-account-atlan-backend",
2124+
"atlan-governance-workflows"
21242125
],
21252126
"policyGroups":
21262127
[],
@@ -2185,7 +2186,8 @@
21852186
[
21862187
"admin",
21872188
"service-account-atlan-argo",
2188-
"service-account-atlan-backend"
2189+
"service-account-atlan-backend",
2190+
"atlan-governance-workflows"
21892191
],
21902192
"policyGroups":
21912193
[],
@@ -2221,7 +2223,8 @@
22212223
[
22222224
"admin",
22232225
"service-account-atlan-argo",
2224-
"service-account-atlan-backend"
2226+
"service-account-atlan-backend",
2227+
"atlan-governance-workflows"
22252228
],
22262229
"policyGroups":
22272230
[],
@@ -2441,7 +2444,8 @@
24412444
"policyUsers":
24422445
[
24432446
"service-account-atlan-argo",
2444-
"service-account-atlan-backend"
2447+
"service-account-atlan-backend",
2448+
"atlan-governance-workflows"
24452449
],
24462450
"policyGroups":
24472451
[],
@@ -2551,7 +2555,8 @@
25512555
"policyUsers":
25522556
[
25532557
"service-account-atlan-argo",
2554-
"service-account-atlan-backend"
2558+
"service-account-atlan-backend",
2559+
"atlan-governance-workflows"
25552560
],
25562561
"policyGroups":
25572562
[],
@@ -2587,7 +2592,8 @@
25872592
"policyUsers":
25882593
[
25892594
"service-account-atlan-argo",
2590-
"service-account-atlan-backend"
2595+
"service-account-atlan-backend",
2596+
"atlan-governance-workflows"
25912597
],
25922598
"policyGroups":
25932599
[],
@@ -2622,7 +2628,8 @@
26222628
"policyUsers":
26232629
[
26242630
"service-account-atlan-argo",
2625-
"service-account-atlan-backend"
2631+
"service-account-atlan-backend",
2632+
"atlan-governance-workflows"
26262633
],
26272634
"policyGroups":
26282635
[],
@@ -2657,7 +2664,8 @@
26572664
"policyUsers":
26582665
[
26592666
"service-account-atlan-argo",
2660-
"service-account-atlan-backend"
2667+
"service-account-atlan-backend",
2668+
"atlan-governance-workflows"
26612669
],
26622670
"policyGroups":
26632671
[],

repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/AuthPolicyValidator.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,10 @@ public void validate(AtlasEntity policy, AtlasEntity existingPolicy,
307307
//only allow argo & backend
308308
if (!RequestContext.get().isSkipAuthorizationCheck()) {
309309
String userName = RequestContext.getCurrentUser();
310-
validateOperation (!ARGO_SERVICE_USER_NAME.equals(userName) && !BACKEND_SERVICE_USER_NAME.equals(userName),
311-
"Create/Update AuthPolicy with policyCategory other than persona, purpose and datamesh");
310+
validateOperation (!ARGO_SERVICE_USER_NAME.equals(userName) &&
311+
!BACKEND_SERVICE_USER_NAME.equals(userName) &&
312+
!GOVERNANCE_WORKFLOWS_SERVICE_USER_NAME.equals(userName),
313+
"Create/Update AuthPolicy with policyCategory other than persona, purpose and datamesh");
312314
}
313315
}
314316
}

repository/src/main/java/org/apache/atlas/repository/util/AccessControlUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public final class AccessControlUtils {
114114
public static final String CONN_NAME_PATTERN = "connection_admins_%s";
115115
public static final String ARGO_SERVICE_USER_NAME = "service-account-atlan-argo";
116116
public static final String BACKEND_SERVICE_USER_NAME = "service-account-atlan-backend";
117+
public static final String GOVERNANCE_WORKFLOWS_SERVICE_USER_NAME = "atlan-governance-workflows";
117118

118119
public static final String INSTANCE_DOMAIN_KEY = "instance";
119120

0 commit comments

Comments
 (0)