Skip to content

Commit 618ffbd

Browse files
authored
Merge pull request #8 from ing-bank/feature/add-homedir-policy
added additional policy to allow generic access to home directories
2 parents cc2e48c + ca2feea commit 618ffbd

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"service": "testservice",
3+
"name": "home_dirs",
4+
"description": "FOR TESTING PURPOSES, Allow access for testuser to home subfolder",
5+
"isAuditEnabled": true,
6+
"resources": {
7+
"path": {
8+
"values": [
9+
"/home/{USER}"
10+
],
11+
"isExcludes": false,
12+
"isRecursive": true
13+
}
14+
},
15+
"policyItems": [
16+
{
17+
"accesses": [
18+
{
19+
"type": "read",
20+
"isAllowed": true
21+
},
22+
{
23+
"type": "write",
24+
"isAllowed": true
25+
}
26+
],
27+
"users": [
28+
"{USER}"
29+
],
30+
"groups": [],
31+
"conditions": [],
32+
"delegateAdmin": false
33+
}
34+
],
35+
"denyPolicyItems": [],
36+
"allowExceptions": [],
37+
"denyExceptions": [],
38+
"dataMaskPolicyItems": [],
39+
"rowFilterPolicyItems": [],
40+
"options": {},
41+
"validitySchedules": [],
42+
"policyLabels": [],
43+
"isEnabled": true,
44+
"version": 1
45+
}

airlock-dev-apache-ranger/setup-ranger.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ if [ "$start_timeout_exceeded" = "false" ]; then
3838
printf "Creating policy... \n"
3939
curl -u admin:admin -d "@/tmp/resources/policy/ranger-policy-s3.json" -X POST -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:6080/service/public/v2/api/policy
4040
curl -u admin:admin -d "@/tmp/resources/policy/ranger-policy-deny-subdir-s3.json" -X POST -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:6080/service/public/v2/api/policy
41+
curl -u admin:admin -d "@/tmp/resources/policy/ranger-policy-homedirs-s3.json" -X POST -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:6080/service/public/v2/api/policy
4142
printf "\nPolicy created\n"
4243

4344
echo "Done setting up Ranger for s3"

0 commit comments

Comments
 (0)