Limit namespaces display with authz

Hello community,

OPA noob here. With following rego policy

package flipt.authz.v1
import rego.v1

default allow := false

allow if {
  input.request.namespace in ["default", "my-team"]
}

I was hoping to only able to see only both namespaces in the UI. But instead all namespaces are displayed (GET /api/v1/namespaces returns all namespaces). Access is then denied when I click the other namespace not defined in the rego policy.

Is it possible that the unauthorized namespaces not to be displayed in the UI? So the team member can only see the namespaces they own.

Thanks!

Hey @andi4000,

Unfortunately, it isn’t implemented. Please create an issue in Github about it.

1 Like

Got it, will do. Thanks!

edit: created the issue here Restrict namespace listing based on user authorization · Issue #3686 · flipt-io/flipt · GitHub