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

Cannot use Role ako-tenant with access to Controller, Role, Tenant or User in non-admin tenant #584

Open
vitality411 opened this issue Mar 18, 2024 · 0 comments
Labels

Comments

@vitality411
Copy link

Describe the bug

It is not possible to use ako-tenant role with READ_ACCESS to resource PERMISSION_CONTROLLER for user creation:
│ Error: Encountered an error on POST request to URL https://nsx-alb.tld.de/api/user: HTTP code: 400; error from Controller: map[error:Cannot use Role ako-tenant with access to Controller, Role, Tenant or User in non-admin tenant]

This is required by AKO:
ako-0 ako 2024-03-01T10:23:20.483Z WARN lib/avi_api.go:65 msg: Unable to fetch data from uri /api/cluster Encountered an error on GET request to URL https://nsx-alb.tld.de/api/cluster: HTTP code: 403; error from Avi: map[error:User 'ako-test' is not authorized to read on resource System in tenant AKOTEST]

Reproduction steps

  1. Create ako-tenant role according to https://github.com/vmware/load-balancer-and-ingress-services-for-kubernetes/blob/master/docs/roles/ako-tenant.json
  2. Try to create avi_user with individuel tenants and role refs according to https://github.com/vmware/load-balancer-and-ingress-services-for-kubernetes/blob/master/docs/ako_tenancy.md
resource "avi_user" "avi_user" {
  name = "ako-${var.tenant}"
  access {
    tenant_ref  = avi_tenant.tenant.id
    role_ref    = data.avi_role.ako_tenant.id
    all_tenants = false
  }
  access {
    tenant_ref  = data.avi_tenant.admin.id
    role_ref    = data.avi_role.ako_admin.id
    all_tenants = false
  }
  password           = "SuperSecretPassword!"
  default_tenant_ref = avi_tenant.tenant.id
}

Expected behavior

It is possible to use ako-tenant role with READ_ACCESS to resource PERMISSION_CONTROLLER.

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant