Documentation ¶
Overview ¶
Package iamregistry provides data structures for resolving IAM roles and permissions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateRoles ¶
func ValidateRoles(roles *iamv1.Roles) *errdetails.BadRequest
ValidateRoles validates a set of predefined roles.
Types ¶
type ResourcePermissions ¶ added in v0.12.0
type ResourcePermissions struct {
// contains filtered or unexported fields
}
ResourcePermissions contain a mapping from resource types to permissions.
func NewResourcePermissions ¶ added in v0.12.0
func NewResourcePermissions( resourcePermissions *iamv1.ResourcePermissions, resources []*annotations.ResourceDescriptor, ) (*ResourcePermissions, error)
NewResourcePermissions creates a mapping of resource types to permissions.
func (*ResourcePermissions) FindPermissionByResourceName ¶ added in v0.12.0
func (r *ResourcePermissions) FindPermissionByResourceName(name string) (string, bool)
FindPermissionByResourceName looks up a permission by resource name.
type Roles ¶
type Roles struct {
// contains filtered or unexported fields
}
Roles are a set of roles.
func (*Roles) FindRoleByName ¶
FindRoleByName looks up a role by resource name.
func (*Roles) RangeRoles ¶
RangeRoles iterates over all registered roles while f returns true. The iteration order is undefined.
func (*Roles) RangeRolesByPermission ¶
RangeRolesByPermission iterates over all registered roles with the provided permission while f returns true. The iteration order is undefined, and permissions with wildcards are not allowed.
func (*Roles) RoleHasPermission ¶
RoleHasPermission checks whether the role with the provided name has the provided permission.