Documentation ¶
Index ¶
- func ApplyServiceDefinitionOverAZSchema(serviceDef *schema.ServiceDefinition, ...) ([]*azcore.NamespaceDefinition, error)
- func BuildServiceDefinitionFromAZSchema(azDefinitions []*azcore.NamespaceDefinition, serviceFilter ...string) (schema.ServiceDefinition, error)
- func GetBaseAZSchema() []*azcore.NamespaceDefinition
- func PrepareSchemaAsAZSource(authzedDefinitions []*azcore.NamespaceDefinition) (string, error)
- func ValidatePreparedAZSchema(ctx context.Context, azSchemaSource string) error
- type AdminConfig
- type AuthzEngine
- type FileService
- type NamespaceService
- type PermissionService
- type RoleService
- type Service
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyServiceDefinitionOverAZSchema ¶
func ApplyServiceDefinitionOverAZSchema(serviceDef *schema.ServiceDefinition, existingDefinitions []*azcore.NamespaceDefinition) ([]*azcore.NamespaceDefinition, error)
ApplyServiceDefinitionOverAZSchema applies the provided user defined service over existing schema and returns the updated schema
func BuildServiceDefinitionFromAZSchema ¶
func BuildServiceDefinitionFromAZSchema(azDefinitions []*azcore.NamespaceDefinition, serviceFilter ...string) (schema.ServiceDefinition, error)
BuildServiceDefinitionFromAZSchema converts authzed schema to frontier service definition. This conversion is lossy, and it only keeps list of permissions used in the schema per resource
func GetBaseAZSchema ¶
func GetBaseAZSchema() []*azcore.NamespaceDefinition
func PrepareSchemaAsAZSource ¶
func PrepareSchemaAsAZSource(authzedDefinitions []*azcore.NamespaceDefinition) (string, error)
Types ¶
type AdminConfig ¶
type AdminConfig struct { // Users are a list of email-ids/uuids which needs to be promoted as superusers // if email is provided and user doesn't exist, user is created by default Users []string `yaml:"users" mapstructure:"users"` }
AdminConfig is platform administration configuration
type AuthzEngine ¶
type FileService ¶
type FileService interface {
GetDefinition(ctx context.Context) (*schema.ServiceDefinition, error)
}
type NamespaceService ¶
type PermissionService ¶
type PermissionService interface { List(ctx context.Context, flt permission.Filter) ([]permission.Permission, error) Upsert(ctx context.Context, action permission.Permission) (permission.Permission, error) }
type RoleService ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewBootstrapService ¶
func NewBootstrapService( config AdminConfig, schemaConfig FileService, namespaceService NamespaceService, roleService RoleService, actionService PermissionService, userService UserService, authzEngine AuthzEngine) *Service
func (Service) AppendSchema ¶
func (Service) MakeSuperUsers ¶
MakeSuperUsers promote ordinary users to superuser
func (Service) MigrateRoles ¶
MigrateRoles migrate predefined roles to org
Click to show internal directories.
Click to hide internal directories.