opensearch-k8s-operator icon indicating copy to clipboard operation
opensearch-k8s-operator copied to clipboard

Add Backend_roles to OpensearchUserRoleBinding

Open azimin-ex42 opened this issue 2 years ago • 1 comments

Hello!

For now, we can add only roles to OpensearchUserRoleBinding. Could you make it possible to add backend_roles to OpensearchUserRoleBinding, please? Like this in roles_mapping.yml:

all_access:
  reserved: false
  backend_roles:
  - "admins"
  description: "Maps admins to all_access"

azimin-ex42 avatar Sep 17 '22 20:09 azimin-ex42

Labeled as enhancement, will be added in one of the further releases. You are welcome to rise a PR on it :)

idanl21 avatar Sep 19 '22 10:09 idanl21

i see this has been fixed, but i am having still issues...

error: error validating "roles_mapping.yaml": error validating data: ValidationError(OpensearchUserRoleBinding.spec): unknown field "backendRoles" in io.opster.opensearch.v1.OpensearchUserRoleBinding.spec; if you choose to ignore these errors, turn validation off with --validate=false

this is my manifest

apiVersion: opensearch.opster.io/v1
kind: OpensearchUserRoleBinding
metadata:
  name: demo-role-mapping
  namespace: opensearch-dev
spec:
  opensearchCluster:
    name: opensearch-cluster
  users:
    - demo
  backendRoles:
    - demorole
  roles:
    - demo-compliance-role

i have the operator version 2.1.1

I'm thinking this fix isn't in the release yet?

anubisg1 avatar Dec 07 '22 13:12 anubisg1

Hi @anubisg1

I'm thinking this fix isn't in the release yet?

Correct. This PR was merged shortly after the last release. It will be included in the next version which we hope to release sometime next week.

swoehrl-mw avatar Dec 08 '22 14:12 swoehrl-mw