A Go client for the cloud.redhat.com RBAC API
This client is an evolving work and generally implements functionality as needed.
- Get permitted access for a principal
- List principals
- List permissions
- View and manage groups
- View and manage policies
- View and manage roles
A client is created given a base URL and application name. A new http.Client
is generated, but can be overriden
if needed for a custom Transport, etc.
c := rbac.NewClient("https://foo.bar/api/rbac/v1", "app")
Most operations are a method of the client.
acl, err := c.GetAccess(identity, "")
An AccessList
contains a method for testing permissions.
if acl.IsAllowed("chipotle", "burrito_bowl", "order") {
fmt.Printf("yay!")
}
Apache 2.0
See LICENCE to see the full text.