Skip to content

Commit

Permalink
Merge branch 'main' into dev/K8SPSMDB-675
Browse files Browse the repository at this point in the history
  • Loading branch information
hors authored Dec 2, 2024
2 parents ffc8309 + 7556bbc commit 9945cb5
Show file tree
Hide file tree
Showing 71 changed files with 1,786 additions and 306 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18764,7 +18764,6 @@ spec:
type: array
required:
- name
- passwordSecretRef
- roles
type: object
type: array
Expand Down
1 change: 0 additions & 1 deletion deploy/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19460,7 +19460,6 @@ spec:
type: array
required:
- name
- passwordSecretRef
- roles
type: object
type: array
Expand Down
1 change: 0 additions & 1 deletion deploy/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19460,7 +19460,6 @@ spec:
type: array
required:
- name
- passwordSecretRef
- roles
type: object
type: array
Expand Down
1 change: 0 additions & 1 deletion deploy/cw-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19460,7 +19460,6 @@ spec:
type: array
required:
- name
- passwordSecretRef
- roles
type: object
type: array
Expand Down
122 changes: 122 additions & 0 deletions e2e-tests/custom-users-roles-sharded/compare/role-one-50.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
switched to db admin
{
"_id" : "admin.role-one",
"role" : "role-one",
"db" : "admin",
"privileges" : [
{
"resource" : {
"cluster" : true
},
"actions" : [
"addShard"
]
},
{
"resource" : {
"db" : "config",
"collection" : ""
},
"actions" : [
"find",
"insert",
"remove",
"update"
]
}
],
"roles" : [
{
"role" : "read",
"db" : "admin"
}
],
"authenticationRestrictions" : [
[
{
"clientSource" : [
"127.0.0.1"
],
"serverAddress" : [
"127.0.0.1"
]
}
]
],
"inheritedRoles" : [
{
"role" : "read",
"db" : "admin"
}
],
"inheritedPrivileges" : [
{
"resource" : {
"cluster" : true
},
"actions" : [
"addShard"
]
},
{
"resource" : {
"db" : "config",
"collection" : ""
},
"actions" : [
"find",
"insert",
"remove",
"update"
]
},
{
"resource" : {
"db" : "admin",
"collection" : ""
},
"actions" : [
"changeStream",
"collStats",
"dbHash",
"dbStats",
"find",
"killCursors",
"listCollections",
"listIndexes",
"planCacheRead"
]
},
{
"resource" : {
"db" : "admin",
"collection" : "system.js"
},
"actions" : [
"changeStream",
"collStats",
"dbHash",
"dbStats",
"find",
"killCursors",
"listCollections",
"listIndexes",
"planCacheRead"
]
}
],
"inheritedAuthenticationRestrictions" : [
[
{
"clientSource" : [
"127.0.0.1"
],
"serverAddress" : [
"127.0.0.1"
]
}
]
],
"isBuiltin" : false
}
bye
78 changes: 78 additions & 0 deletions e2e-tests/custom-users-roles-sharded/compare/role-two-50.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
switched to db admin
{
"_id" : "admin.role-two",
"role" : "role-two",
"db" : "admin",
"privileges" : [
{
"resource" : {
"db" : "config",
"collection" : ""
},
"actions" : [
"find"
]
}
],
"roles" : [
{
"role" : "read",
"db" : "admin"
}
],
"authenticationRestrictions" : [ ],
"inheritedRoles" : [
{
"role" : "read",
"db" : "admin"
}
],
"inheritedPrivileges" : [
{
"resource" : {
"db" : "config",
"collection" : ""
},
"actions" : [
"find"
]
},
{
"resource" : {
"db" : "admin",
"collection" : ""
},
"actions" : [
"changeStream",
"collStats",
"dbHash",
"dbStats",
"find",
"killCursors",
"listCollections",
"listIndexes",
"planCacheRead"
]
},
{
"resource" : {
"db" : "admin",
"collection" : "system.js"
},
"actions" : [
"changeStream",
"collStats",
"dbHash",
"dbStats",
"find",
"killCursors",
"listCollections",
"listIndexes",
"planCacheRead"
]
}
],
"inheritedAuthenticationRestrictions" : [ ],
"isBuiltin" : false
}
bye
20 changes: 20 additions & 0 deletions e2e-tests/custom-users-roles-sharded/compare/user-external.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
switched to db $external
{
"_id" : "$external.user-external",
"user" : "user-external",
"db" : "$external",
"roles" : [
{
"role" : "clusterAdmin",
"db" : "admin"
},
{
"role" : "userAdminAnyDatabase",
"db" : "admin"
}
],
"mechanisms" : [
"external"
]
}
bye
8 changes: 4 additions & 4 deletions e2e-tests/custom-users-roles-sharded/compare/user-five.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ switched to db testAdmin
"user" : "user-five",
"db" : "testAdmin",
"roles" : [
{
"role" : "role-four",
"db" : "testAdmin1"
},
{
"role" : "role-five",
"db" : "testAdmin2"
},
{
"role" : "role-four",
"db" : "testAdmin1"
}
],
"mechanisms" : [
Expand Down
21 changes: 21 additions & 0 deletions e2e-tests/custom-users-roles-sharded/compare/user-gen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
switched to db admin
{
"_id" : "admin.user-gen",
"user" : "user-gen",
"db" : "admin",
"roles" : [
{
"role" : "clusterAdmin",
"db" : "admin"
},
{
"role" : "userAdminAnyDatabase",
"db" : "admin"
}
],
"mechanisms" : [
"SCRAM-SHA-1",
"SCRAM-SHA-256"
]
}
bye
4 changes: 2 additions & 2 deletions e2e-tests/custom-users-roles-sharded/compare/user-two.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ switched to db admin
"db" : "admin",
"roles" : [
{
"role" : "userAdminAnyDatabase",
"role" : "clusterAdmin",
"db" : "admin"
},
{
"role" : "clusterAdmin",
"role" : "userAdminAnyDatabase",
"db" : "admin"
}
],
Expand Down
14 changes: 14 additions & 0 deletions e2e-tests/custom-users-roles-sharded/conf/some-name-rs0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@ spec:
db: admin
- name: userAdminAnyDatabase
db: admin
- name: user-gen
db: admin
roles:
- name: clusterAdmin
db: admin
- name: userAdminAnyDatabase
db: admin
- name: user-external
db: $external
roles:
- name: clusterAdmin
db: admin
- name: userAdminAnyDatabase
db: admin

backup:
enabled: false
Expand Down
Loading

0 comments on commit 9945cb5

Please sign in to comment.