Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K8SPSMDB-1146: User management improvements and roles management #1647

Open
wants to merge 77 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
1a3638e
log
inelpandzic Sep 6, 2024
79ad235
Log
inelpandzic Sep 9, 2024
fe16d12
log
inelpandzic Sep 9, 2024
6b3059b
Refactor
inelpandzic Sep 10, 2024
d1d3932
Log
inelpandzic Sep 10, 2024
686a05f
Update getUserInfo
inelpandzic Sep 10, 2024
b710a08
Refactor
inelpandzic Sep 10, 2024
772b7b6
Revert bundle.yaml.
inelpandzic Sep 10, 2024
5be947a
Merge branch 'main' into K8SPSMDB-1146-user-mgmt-improvements
inelpandzic Sep 10, 2024
5ce45d1
Revert cr.yaml.
inelpandzic Sep 10, 2024
b793c90
Merge branch 'main' into K8SPSMDB-1146-user-mgmt-improvements
hors Sep 10, 2024
3803ac6
Merge branch 'main' into K8SPSMDB-1146-user-mgmt-improvements
inelpandzic Sep 12, 2024
3283448
Default user.DB and user.PasswordSecretRef.Key.
inelpandzic Sep 11, 2024
1d1ca63
Add e2e test.
inelpandzic Sep 12, 2024
5f06684
Updated tests.
inelpandzic Sep 12, 2024
6c081e2
Update test.
inelpandzic Sep 12, 2024
07f947b
Update users test.
inelpandzic Sep 12, 2024
48e77d5
Update pkg/psmdb/mongo/models.go
inelpandzic Sep 12, 2024
e7bb930
Update users e2e test.
inelpandzic Sep 12, 2024
af6537d
Update role spec and models.
inelpandzic Sep 13, 2024
fa14ef6
Update spec and regenerate CRDs.
inelpandzic Sep 13, 2024
50934d1
Update spec
inelpandzic Sep 13, 2024
fa93d57
Update role name field.
inelpandzic Sep 13, 2024
7569899
Update CR spec and mongo API.
inelpandzic Sep 13, 2024
4d9876a
Update mongo role api and implement handling user roles.
inelpandzic Sep 13, 2024
b2937e5
Fix resource field.
inelpandzic Sep 13, 2024
b9c5587
Update crds.
inelpandzic Sep 13, 2024
a246850
Fix
inelpandzic Sep 14, 2024
a0d692c
Roles cr example
inelpandzic Sep 14, 2024
c0f42f3
Fix role create/update.
inelpandzic Sep 14, 2024
6c9df52
Get role with showAuthenticationRestrictions flag.
inelpandzic Sep 14, 2024
31d161d
log
inelpandzic Sep 14, 2024
f55137d
Update role creation.
inelpandzic Sep 14, 2024
66b0465
Update e2e test config.
inelpandzic Sep 14, 2024
fe1277b
Log
inelpandzic Sep 14, 2024
2177ec9
Fix get role API call.
inelpandzic Sep 14, 2024
14d7b7c
Fix getRole mongo api.
inelpandzic Sep 14, 2024
87b4f1f
Update role on change.
inelpandzic Sep 14, 2024
0b83e11
Fix deepEquel
inelpandzic Sep 14, 2024
92e6f14
Fix
inelpandzic Sep 14, 2024
a4ff5e1
log
inelpandzic Sep 14, 2024
3077044
log
inelpandzic Sep 14, 2024
9722f41
Update getRole
inelpandzic Sep 14, 2024
216db5f
Update e2e test.
inelpandzic Sep 14, 2024
8624be0
Fix unit tests.
inelpandzic Sep 16, 2024
039db75
Set authRestrictions to nil.
inelpandzic Sep 16, 2024
fe7a2b1
Log and fix.
inelpandzic Sep 16, 2024
2e5fc1e
Fix comparation
inelpandzic Sep 16, 2024
9a6318b
Log
inelpandzic Sep 16, 2024
f61f164
log
inelpandzic Sep 16, 2024
54cbd9d
Add e2e tests.
inelpandzic Sep 16, 2024
366f308
Cleanup
inelpandzic Sep 16, 2024
13d1543
Fix
inelpandzic Sep 16, 2024
5a22479
Update PasswordKeySelector type.
inelpandzic Sep 16, 2024
ad786e7
Update pkg/apis/psmdb/v1/psmdb_types.go
inelpandzic Sep 16, 2024
3b6c940
Update e2e-tests/users-app/run
inelpandzic Sep 16, 2024
2998070
Update e2e-tests/users-app/run
inelpandzic Sep 16, 2024
7c514ac
Format
inelpandzic Sep 16, 2024
29bb305
Update e2e test and fix go-lint.
inelpandzic Sep 16, 2024
ced05a9
user.db optional
inelpandzic Sep 16, 2024
3b03883
Test sharded cluster.
inelpandzic Sep 16, 2024
e13f034
Update tests CSVs.
inelpandzic Sep 16, 2024
a06d85f
Update e2e test for sharded.
inelpandzic Sep 18, 2024
eecd954
Merge branch 'main' into K8SPSMDB-1146-user-mgmt-improvements
inelpandzic Sep 18, 2024
71d3189
Fix test.
inelpandzic Sep 18, 2024
aba26bf
Fix run-release list.
inelpandzic Sep 19, 2024
e6e05fb
Merge branch 'main' into K8SPSMDB-1146-user-mgmt-improvements
inelpandzic Sep 19, 2024
85b2a1d
Create all roles.
inelpandzic Sep 23, 2024
1f19fc9
log
inelpandzic Sep 23, 2024
8ec0a7c
logi
inelpandzic Sep 23, 2024
0694d34
fix
inelpandzic Sep 23, 2024
4fc9889
Create user first.
inelpandzic Sep 23, 2024
6145ca6
Update e2e tests.
inelpandzic Sep 23, 2024
6b8d2eb
Merge branch 'main' into K8SPSMDB-1146-user-mgmt-improvements
inelpandzic Sep 23, 2024
eb02cb4
Fix
inelpandzic Sep 23, 2024
6736b9e
Update pkg/apis/psmdb/v1/psmdb_types.go
inelpandzic Sep 24, 2024
73f7fae
Merge branch 'main' into K8SPSMDB-1146-user-mgmt-improvements
inelpandzic Sep 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 59 additions & 6 deletions config/crd/bases/psmdb.percona.com_perconaservermongodbs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8226,6 +8226,64 @@ spec:
- size
type: object
type: array
roles:
items:
properties:
authenticationRestrictions:
items:
properties:
clientSource:
items:
type: string
type: array
serverAddress:
items:
type: string
type: array
type: object
type: array
db:
type: string
privileges:
items:
properties:
actions:
items:
type: string
type: array
resource:
properties:
cluster:
type: boolean
collection:
type: string
db:
type: string
type: object
required:
- actions
type: object
type: array
role:
type: string
roles:
items:
properties:
db:
type: string
role:
type: string
required:
- db
- role
type: object
type: array
required:
- db
- privileges
- role
type: object
type: array
schedulerName:
type: string
secrets:
Expand Down Expand Up @@ -18485,14 +18543,10 @@ spec:
key:
type: string
name:
default: ""
type: string
optional:
type: boolean
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
roles:
items:
properties:
Expand All @@ -18506,7 +18560,6 @@ spec:
type: object
type: array
required:
- db
- name
- passwordSecretRef
- roles
Expand Down
65 changes: 59 additions & 6 deletions deploy/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8908,6 +8908,64 @@ spec:
- size
type: object
type: array
roles:
items:
properties:
authenticationRestrictions:
items:
properties:
clientSource:
items:
type: string
type: array
serverAddress:
items:
type: string
type: array
type: object
type: array
db:
type: string
privileges:
items:
properties:
actions:
items:
type: string
type: array
resource:
properties:
cluster:
type: boolean
collection:
type: string
db:
type: string
type: object
required:
- actions
type: object
type: array
role:
type: string
roles:
items:
properties:
db:
type: string
role:
type: string
required:
- db
- role
type: object
type: array
required:
- db
- privileges
- role
type: object
type: array
schedulerName:
type: string
secrets:
Expand Down Expand Up @@ -19167,14 +19225,10 @@ spec:
key:
type: string
name:
default: ""
type: string
optional:
type: boolean
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
roles:
items:
properties:
Expand All @@ -19188,7 +19242,6 @@ spec:
type: object
type: array
required:
- db
- name
- passwordSecretRef
- roles
Expand Down
33 changes: 33 additions & 0 deletions deploy/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,39 @@ spec:
# - "host1"
# - "host2"

# roles:
# - role: myClusterwideAdmin
# db: admin
# privileges:
# - resource:
# cluster: true
# actions:
# - addShard
# - resource:
# db: config
# collection: ''
# actions:
# - find
# - update
# - insert
# - remove
# roles:
# - role: read
# db: admin
# - role: my-role
# db: myDb
# privileges:
# - resource:
# db: ''
# collection: ''
# actions:
# - find
# authenticationRestrictions:
# - clientSource:
# - 127.0.0.1
# serverAddress:
# - 127.0.0.1

# users:
# - name: my-user
# db: admin
Expand Down
65 changes: 59 additions & 6 deletions deploy/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8908,6 +8908,64 @@ spec:
- size
type: object
type: array
roles:
items:
properties:
authenticationRestrictions:
items:
properties:
clientSource:
items:
type: string
type: array
serverAddress:
items:
type: string
type: array
type: object
type: array
db:
type: string
privileges:
items:
properties:
actions:
items:
type: string
type: array
resource:
properties:
cluster:
type: boolean
collection:
type: string
db:
type: string
type: object
required:
- actions
type: object
type: array
role:
type: string
roles:
items:
properties:
db:
type: string
role:
type: string
required:
- db
- role
type: object
type: array
required:
- db
- privileges
- role
type: object
type: array
schedulerName:
type: string
secrets:
Expand Down Expand Up @@ -19167,14 +19225,10 @@ spec:
key:
type: string
name:
default: ""
type: string
optional:
type: boolean
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
roles:
items:
properties:
Expand All @@ -19188,7 +19242,6 @@ spec:
type: object
type: array
required:
- db
- name
- passwordSecretRef
- roles
Expand Down
65 changes: 59 additions & 6 deletions deploy/cw-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8908,6 +8908,64 @@ spec:
- size
type: object
type: array
roles:
items:
properties:
authenticationRestrictions:
items:
properties:
clientSource:
items:
type: string
type: array
serverAddress:
items:
type: string
type: array
type: object
type: array
db:
type: string
privileges:
items:
properties:
actions:
items:
type: string
type: array
resource:
properties:
cluster:
type: boolean
collection:
type: string
db:
type: string
type: object
required:
- actions
type: object
type: array
role:
type: string
roles:
items:
properties:
db:
type: string
role:
type: string
required:
- db
- role
type: object
type: array
required:
- db
- privileges
- role
type: object
type: array
schedulerName:
type: string
secrets:
Expand Down Expand Up @@ -19167,14 +19225,10 @@ spec:
key:
type: string
name:
default: ""
type: string
optional:
type: boolean
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
roles:
items:
properties:
Expand All @@ -19188,7 +19242,6 @@ spec:
type: object
type: array
required:
- db
- name
- passwordSecretRef
- roles
Expand Down
Loading
Loading