Skip to content

Commit fe23787

Browse files
committed
Custom roles: remove listSearchIndexes for 50 psmdb
1 parent cd57039 commit fe23787

File tree

6 files changed

+408
-0
lines changed

6 files changed

+408
-0
lines changed
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
switched to db admin
2+
{
3+
"_id" : "admin.role-one",
4+
"role" : "role-one",
5+
"db" : "admin",
6+
"privileges" : [
7+
{
8+
"resource" : {
9+
"cluster" : true
10+
},
11+
"actions" : [
12+
"addShard"
13+
]
14+
},
15+
{
16+
"resource" : {
17+
"db" : "config",
18+
"collection" : ""
19+
},
20+
"actions" : [
21+
"find",
22+
"insert",
23+
"remove",
24+
"update"
25+
]
26+
}
27+
],
28+
"roles" : [
29+
{
30+
"role" : "read",
31+
"db" : "admin"
32+
}
33+
],
34+
"authenticationRestrictions" : [
35+
[
36+
{
37+
"clientSource" : [
38+
"127.0.0.1"
39+
],
40+
"serverAddress" : [
41+
"127.0.0.1"
42+
]
43+
}
44+
]
45+
],
46+
"inheritedRoles" : [
47+
{
48+
"role" : "read",
49+
"db" : "admin"
50+
}
51+
],
52+
"inheritedPrivileges" : [
53+
{
54+
"resource" : {
55+
"cluster" : true
56+
},
57+
"actions" : [
58+
"addShard"
59+
]
60+
},
61+
{
62+
"resource" : {
63+
"db" : "config",
64+
"collection" : ""
65+
},
66+
"actions" : [
67+
"find",
68+
"insert",
69+
"remove",
70+
"update"
71+
]
72+
},
73+
{
74+
"resource" : {
75+
"db" : "admin",
76+
"collection" : ""
77+
},
78+
"actions" : [
79+
"changeStream",
80+
"collStats",
81+
"dbHash",
82+
"dbStats",
83+
"find",
84+
"killCursors",
85+
"listCollections",
86+
"listIndexes",
87+
"planCacheRead"
88+
]
89+
},
90+
{
91+
"resource" : {
92+
"db" : "admin",
93+
"collection" : "system.js"
94+
},
95+
"actions" : [
96+
"changeStream",
97+
"collStats",
98+
"dbHash",
99+
"dbStats",
100+
"find",
101+
"killCursors",
102+
"listCollections",
103+
"listIndexes",
104+
"planCacheRead"
105+
]
106+
}
107+
],
108+
"inheritedAuthenticationRestrictions" : [
109+
[
110+
{
111+
"clientSource" : [
112+
"127.0.0.1"
113+
],
114+
"serverAddress" : [
115+
"127.0.0.1"
116+
]
117+
}
118+
]
119+
],
120+
"isBuiltin" : false
121+
}
122+
bye
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
switched to db admin
2+
{
3+
"_id" : "admin.role-two",
4+
"role" : "role-two",
5+
"db" : "admin",
6+
"privileges" : [
7+
{
8+
"resource" : {
9+
"db" : "config",
10+
"collection" : ""
11+
},
12+
"actions" : [
13+
"find"
14+
]
15+
}
16+
],
17+
"roles" : [
18+
{
19+
"role" : "read",
20+
"db" : "admin"
21+
}
22+
],
23+
"authenticationRestrictions" : [ ],
24+
"inheritedRoles" : [
25+
{
26+
"role" : "read",
27+
"db" : "admin"
28+
}
29+
],
30+
"inheritedPrivileges" : [
31+
{
32+
"resource" : {
33+
"db" : "config",
34+
"collection" : ""
35+
},
36+
"actions" : [
37+
"find"
38+
]
39+
},
40+
{
41+
"resource" : {
42+
"db" : "admin",
43+
"collection" : ""
44+
},
45+
"actions" : [
46+
"changeStream",
47+
"collStats",
48+
"dbHash",
49+
"dbStats",
50+
"find",
51+
"killCursors",
52+
"listCollections",
53+
"listIndexes",
54+
"planCacheRead"
55+
]
56+
},
57+
{
58+
"resource" : {
59+
"db" : "admin",
60+
"collection" : "system.js"
61+
},
62+
"actions" : [
63+
"changeStream",
64+
"collStats",
65+
"dbHash",
66+
"dbStats",
67+
"find",
68+
"killCursors",
69+
"listCollections",
70+
"listIndexes",
71+
"planCacheRead"
72+
]
73+
}
74+
],
75+
"inheritedAuthenticationRestrictions" : [ ],
76+
"isBuiltin" : false
77+
}
78+
bye

e2e-tests/custom-users-roles-sharded/run

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ compare() {
88
local uri="$3"
99
local target="$4"
1010

11+
if [[ $IMAGE_MONGOD =~ 5\.0 ]] && [ -f ${test_dir}/compare/$target-50.json ]; then
12+
target=$target-50
13+
fi
14+
1115
run_mongos "use ${database}\n ${command}" "$uri" "mongodb" \
1216
| egrep -v 'I NETWORK|W NETWORK|F NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' \
1317
| $sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxxesvc/' \
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
switched to db admin
2+
{
3+
"_id" : "admin.role-one",
4+
"role" : "role-one",
5+
"db" : "admin",
6+
"privileges" : [
7+
{
8+
"resource" : {
9+
"cluster" : true
10+
},
11+
"actions" : [
12+
"addShard"
13+
]
14+
},
15+
{
16+
"resource" : {
17+
"db" : "config",
18+
"collection" : ""
19+
},
20+
"actions" : [
21+
"find",
22+
"insert",
23+
"remove",
24+
"update"
25+
]
26+
}
27+
],
28+
"roles" : [
29+
{
30+
"role" : "read",
31+
"db" : "admin"
32+
}
33+
],
34+
"authenticationRestrictions" : [
35+
[
36+
{
37+
"clientSource" : [
38+
"127.0.0.1"
39+
],
40+
"serverAddress" : [
41+
"127.0.0.1"
42+
]
43+
}
44+
]
45+
],
46+
"inheritedRoles" : [
47+
{
48+
"role" : "read",
49+
"db" : "admin"
50+
}
51+
],
52+
"inheritedPrivileges" : [
53+
{
54+
"resource" : {
55+
"cluster" : true
56+
},
57+
"actions" : [
58+
"addShard"
59+
]
60+
},
61+
{
62+
"resource" : {
63+
"db" : "config",
64+
"collection" : ""
65+
},
66+
"actions" : [
67+
"find",
68+
"insert",
69+
"remove",
70+
"update"
71+
]
72+
},
73+
{
74+
"resource" : {
75+
"db" : "admin",
76+
"collection" : ""
77+
},
78+
"actions" : [
79+
"changeStream",
80+
"collStats",
81+
"dbHash",
82+
"dbStats",
83+
"find",
84+
"killCursors",
85+
"listCollections",
86+
"listIndexes",
87+
"planCacheRead"
88+
]
89+
},
90+
{
91+
"resource" : {
92+
"db" : "admin",
93+
"collection" : "system.js"
94+
},
95+
"actions" : [
96+
"changeStream",
97+
"collStats",
98+
"dbHash",
99+
"dbStats",
100+
"find",
101+
"killCursors",
102+
"listCollections",
103+
"listIndexes",
104+
"planCacheRead"
105+
]
106+
}
107+
],
108+
"inheritedAuthenticationRestrictions" : [
109+
[
110+
{
111+
"clientSource" : [
112+
"127.0.0.1"
113+
],
114+
"serverAddress" : [
115+
"127.0.0.1"
116+
]
117+
}
118+
]
119+
],
120+
"isBuiltin" : false
121+
}
122+
bye

0 commit comments

Comments
 (0)