Skip to content

Commit 8e8c3eb

Browse files
authored
Merge pull request #6 from ing-bank/add-deny-subdir-policy
added additional policy to deny access to demobucket subdir
2 parents 56b1398 + 6cc7a2b commit 8e8c3eb

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": "testuser_deny_subdir",
4+
"description": "FOR TESTING PURPOSES, Deny access for testuser to subfolder of demobucket",
5+
"isAuditEnabled": true,
6+
"resources": {
7+
"path": {
8+
"values": [
9+
"/demobucket/subdir"
10+
],
11+
"isExcludes": false,
12+
"isRecursive": true
13+
}
14+
},
15+
"policyItems": [],
16+
"denyPolicyItems": [
17+
{
18+
"accesses": [
19+
{
20+
"type": "read",
21+
"isAllowed": true
22+
},
23+
{
24+
"type": "write",
25+
"isAllowed": true
26+
}
27+
],
28+
"users": [
29+
"testuser"
30+
],
31+
"groups": [],
32+
"conditions": [],
33+
"delegateAdmin": false
34+
}
35+
],
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
@@ -37,6 +37,7 @@ if [ "$start_timeout_exceeded" = "false" ]; then
3737
# Setup ranger policies
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
40+
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
4041
printf "\nPolicy created\n"
4142

4243
echo "Done setting up Ranger for s3"

0 commit comments

Comments
 (0)