core

package
v0.3.0-dev.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResourceConfigurationStructLevelValidation

func ResourceConfigurationStructLevelValidation(sl validator.StructLevel)

func ResourcesConfigStructLevelValidation

func ResourcesConfigStructLevelValidation(sl validator.StructLevel)

Types

type ConfigurationEmptyError

type ConfigurationEmptyError struct{}

func (*ConfigurationEmptyError) Error

func (m *ConfigurationEmptyError) Error() string

type GroupAssignmentScheduleCreate

type GroupAssignmentScheduleCreate struct {
	EndDateTime                    *time.Time
	PrincipalName                  string
	PrincipalType                  armauthorization.PrincipalType
	GroupAssignmentScheduleRequest *models.PrivilegedAccessGroupAssignmentScheduleRequest
	ManagedGroupName               string
	RoleName                       string
	StartDateTime                  *time.Time
}

type GroupAssignmentScheduleDelete

type GroupAssignmentScheduleDelete struct {
	Cancel                         bool
	EndDateTime                    *time.Time
	PrincipalName                  string
	PrincipalType                  armauthorization.PrincipalType
	GroupAssignmentScheduleRequest *models.PrivilegedAccessGroupAssignmentScheduleRequest
	ManagedGroupName               string
	RoleName                       string
	StartDateTime                  *time.Time
}

type GroupAssignmentScheduleUpdate

type GroupAssignmentScheduleUpdate struct {
	EndDateTime                    *time.Time
	PrincipalName                  string
	PrincipalType                  armauthorization.PrincipalType
	GroupAssignmentScheduleRequest *models.PrivilegedAccessGroupAssignmentScheduleRequest
	ManagedGroupName               string
	RoleName                       string
	StartDateTime                  *time.Time
}

type GroupConfiguration

type GroupConfiguration struct {
	Active   []*Schedule `yaml:"active"`
	Eligible []*Schedule `yaml:"eligible"`
}

type GroupEligibilityScheduleCreate

type GroupEligibilityScheduleCreate struct {
	EndDateTime                     *time.Time
	PrincipalName                   string
	PrincipalType                   armauthorization.PrincipalType
	GroupEligibilityScheduleRequest *models.PrivilegedAccessGroupEligibilityScheduleRequest
	ManagedGroupName                string
	RoleName                        string
	StartDateTime                   *time.Time
}

type GroupEligibilityScheduleDelete

type GroupEligibilityScheduleDelete struct {
	Cancel                          bool
	EndDateTime                     *time.Time
	PrincipalName                   string
	PrincipalType                   armauthorization.PrincipalType
	GroupEligibilityScheduleRequest *models.PrivilegedAccessGroupEligibilityScheduleRequest
	ManagedGroupName                string
	RoleName                        string
	StartDateTime                   *time.Time
}

type GroupEligibilityScheduleUpdate

type GroupEligibilityScheduleUpdate struct {
	EndDateTime                     *time.Time
	PrincipalName                   string
	PrincipalType                   armauthorization.PrincipalType
	GroupEligibilityScheduleRequest *models.PrivilegedAccessGroupEligibilityScheduleRequest
	ManagedGroupName                string
	RoleName                        string
	StartDateTime                   *time.Time
}

type GroupPolicy

type GroupPolicy struct {
	Default       []*RulesetReference `yaml:"default"`
	Name          string
	ManagedGroups map[string][]*RulesetReference `yaml:"managedGroups"`
}

func (*GroupPolicy) GetRulesetReferencesForGroup

func (p *GroupPolicy) GetRulesetReferencesForGroup(groupName string) []*RulesetReference

type GroupPrincipal

type GroupPrincipal struct {
	Name          string
	ManagedGroups map[string]*GroupConfiguration `yaml:"managedGroups"`
}

type GroupRoleManagementPolicyUpdate

type GroupRoleManagementPolicyUpdate struct {
	Changes              []string
	ManagedGroupName     string
	RoleManagementPolicy models.UnifiedRoleManagementPolicyable
	RoleName             string
}

type GroupsConfig

type GroupsConfig struct {
	Groups   []*GroupPrincipal              `validate:"dive"`
	Policies []*GroupPolicy                 `validate:"dive"`
	Rulesets []*RoleManagementPolicyRuleset `validate:"dive"`
	Users    []*GroupPrincipal              `validate:"dive"`
}

func (*GroupsConfig) GetGroupAssignmentSchedules

func (c *GroupsConfig) GetGroupAssignmentSchedules() []*Schedule

func (*GroupsConfig) GetGroupEligibilitySchedules

func (c *GroupsConfig) GetGroupEligibilitySchedules() []*Schedule

func (*GroupsConfig) GetGroupNameRoleNameCombinations

func (c *GroupsConfig) GetGroupNameRoleNameCombinations() []*TargetRoleNameCombination

func (*GroupsConfig) GetPolicyByRoleName

func (c *GroupsConfig) GetPolicyByRoleName(roleName string) *GroupPolicy

func (*GroupsConfig) GetUserAssignmentSchedules

func (c *GroupsConfig) GetUserAssignmentSchedules() []*Schedule

func (*GroupsConfig) GetUserEligibilitySchedules

func (c *GroupsConfig) GetUserEligibilitySchedules() []*Schedule

func (*GroupsConfig) Validate

func (c *GroupsConfig) Validate() error

type PrincipalType

type PrincipalType string
const (
	PrincipalTypeGroup PrincipalType = "Group"
	PrincipalTypeUser  PrincipalType = "User"
)

func PossiblePrincipalTypeValues

func PossiblePrincipalTypeValues() []PrincipalType

type ResourceConfiguration

type ResourceConfiguration struct {
	Active   []*Schedule `yaml:"active"`
	Eligible []*Schedule `yaml:"eligible"`
}

type ResourcePolicy

type ResourcePolicy struct {
	Default        []*RulesetReference `yaml:"default"`
	Name           string
	Subscription   []*RulesetReference            `yaml:"subscription"`
	ResourceGroups map[string][]*RulesetReference `yaml:"resourceGroups"`
	Resources      map[string][]*RulesetReference `yaml:"resources"`
}

func (*ResourcePolicy) GetRulesetReferencesForScope

func (p *ResourcePolicy) GetRulesetReferencesForScope(scope string, subscriptionId string) []*RulesetReference

type ResourcePrincipal

type ResourcePrincipal struct {
	Name           string
	Subscription   *ResourceConfiguration            `yaml:"subscription"`
	ResourceGroups map[string]*ResourceConfiguration `yaml:"resourceGroups"`
	Resources      map[string]*ResourceConfiguration `yaml:"resources"`
}

type ResourceRoleManagementPolicyUpdate

type ResourceRoleManagementPolicyUpdate struct {
	Changes              []string
	RoleManagementPolicy *armauthorization.RoleManagementPolicy
	RoleName             string
	Scope                string
}

type ResourcesConfig

type ResourcesConfig struct {
	Groups   []*ResourcePrincipal           `validate:"dive"`
	Policies []*ResourcePolicy              `validate:"dive"`
	Rulesets []*RoleManagementPolicyRuleset `validate:"dive"`
	Users    []*ResourcePrincipal           `validate:"dive"`
}

func (*ResourcesConfig) GetGroupAssignmentSchedules

func (c *ResourcesConfig) GetGroupAssignmentSchedules(subscriptionId string) []*Schedule

func (*ResourcesConfig) GetGroupEligibilitySchedules

func (c *ResourcesConfig) GetGroupEligibilitySchedules(subscriptionId string) []*Schedule

func (*ResourcesConfig) GetPolicyByRoleName

func (c *ResourcesConfig) GetPolicyByRoleName(roleName string) *ResourcePolicy

func (*ResourcesConfig) GetScopeRoleNameCombinations

func (c *ResourcesConfig) GetScopeRoleNameCombinations(subscriptionId string) []*TargetRoleNameCombination

func (*ResourcesConfig) GetUserAssignmentSchedules

func (c *ResourcesConfig) GetUserAssignmentSchedules(subscriptionId string) []*Schedule

func (*ResourcesConfig) GetUserEligibilitySchedules

func (c *ResourcesConfig) GetUserEligibilitySchedules(subscriptionId string) []*Schedule

func (*ResourcesConfig) Validate

func (c *ResourcesConfig) Validate() error

type RoleAssignmentScheduleCreate added in v0.1.0

type RoleAssignmentScheduleCreate struct {
	EndDateTime                       *time.Time
	PrincipalName                     string
	PrincipalType                     armauthorization.PrincipalType
	RoleAssignmentScheduleRequest     *armauthorization.RoleAssignmentScheduleRequest
	RoleAssignmentScheduleRequestName string
	RoleName                          string
	Scope                             string
	StartDateTime                     *time.Time
}

type RoleAssignmentScheduleDelete added in v0.1.0

type RoleAssignmentScheduleDelete struct {
	Cancel                            bool
	EndDateTime                       *time.Time
	PrincipalName                     string
	PrincipalType                     armauthorization.PrincipalType
	RoleAssignmentScheduleRequest     *armauthorization.RoleAssignmentScheduleRequest
	RoleAssignmentScheduleRequestName string
	RoleName                          string
	Scope                             string
	StartDateTime                     *time.Time
}

type RoleAssignmentScheduleUpdate added in v0.1.0

type RoleAssignmentScheduleUpdate struct {
	EndDateTime                       *time.Time
	PrincipalName                     string
	PrincipalType                     armauthorization.PrincipalType
	RoleAssignmentScheduleRequest     *armauthorization.RoleAssignmentScheduleRequest
	RoleAssignmentScheduleRequestName string
	RoleName                          string
	Scope                             string
	StartDateTime                     *time.Time
}

type RoleEligibilityScheduleCreate

type RoleEligibilityScheduleCreate struct {
	EndDateTime                        *time.Time
	PrincipalName                      string
	PrincipalType                      armauthorization.PrincipalType
	RoleEligibilityScheduleRequest     *armauthorization.RoleEligibilityScheduleRequest
	RoleEligibilityScheduleRequestName string
	RoleName                           string
	Scope                              string
	StartDateTime                      *time.Time
}

type RoleEligibilityScheduleDelete

type RoleEligibilityScheduleDelete struct {
	Cancel                             bool
	EndDateTime                        *time.Time
	PrincipalName                      string
	PrincipalType                      armauthorization.PrincipalType
	RoleEligibilityScheduleRequest     *armauthorization.RoleEligibilityScheduleRequest
	RoleEligibilityScheduleRequestName string
	RoleName                           string
	Scope                              string
	StartDateTime                      *time.Time
}

type RoleEligibilityScheduleUpdate

type RoleEligibilityScheduleUpdate struct {
	EndDateTime                        *time.Time
	PrincipalName                      string
	PrincipalType                      armauthorization.PrincipalType
	RoleEligibilityScheduleRequest     *armauthorization.RoleEligibilityScheduleRequest
	RoleEligibilityScheduleRequestName string
	RoleName                           string
	Scope                              string
	StartDateTime                      *time.Time
}

type RoleManagementPolicyRule

type RoleManagementPolicyRule struct {
	ID    string      `yaml:"id" validate:"required"`
	Patch interface{} `yaml:"patch" validate:"required"`
}

type RoleManagementPolicyRuleset

type RoleManagementPolicyRuleset struct {
	Name  string
	Rules []*RoleManagementPolicyRule `yaml:"rules"`
}

type RulesetReference added in v0.1.0

type RulesetReference struct {
	RulesetName string `yaml:"rulesetName" validate:"required"`
}

type Schedule added in v0.1.0

type Schedule struct {
	EndDateTime   *time.Time `yaml:"endDateTime"`
	PrincipalName string
	PrincipalType PrincipalType
	RoleName      string `yaml:"roleName" validate:"required"`
	ScheduleType  ScheduleType
	StartDateTime *time.Time `yaml:"startDateTime"`
	Target        string
}

type ScheduleType

type ScheduleType string
const (
	ScheduleTypeActive   ScheduleType = "Active"
	ScheduleTypeEligible ScheduleType = "Eligible"
)

func PossibleScheduleTypeValues

func PossibleScheduleTypeValues() []ScheduleType

type TargetRoleNameCombination

type TargetRoleNameCombination struct {
	RoleName string
	Target   string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL