domain

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAuthorizationRequestDenied = errors.New("Authorization_RequestDenied: insufficient Azure AD / Microsoft Graph API privileges. " +
	"These permissions require admin consent or Global Administrator role and cannot be automatically discovered by MPF. " +
	"See https://learn.microsoft.com/en-us/graph/permissions-reference for Microsoft Graph permissions " +
	"and https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/guides/service_principal_configuration for Terraform AzureAD provider setup")

ErrAuthorizationRequestDenied is returned when an Authorization_RequestDenied error is detected from Microsoft Graph / Azure AD and no other parseable Azure RBAC authorization errors can be extracted from the error message. Callers can use errors.Is to detect this case programmatically.

Functions

func GetDeleteActionFromInvalidActionOrNotActionError

func GetDeleteActionFromInvalidActionOrNotActionError(invalidActionErrMesg string) ([]string, error)

func GetInvalidActionFromInvalidActionOrNotActionError added in v0.15.0

func GetInvalidActionFromInvalidActionOrNotActionError(invalidActionErrMesg string) ([]string, error)

func GetScopePermissionsFromAuthError

func GetScopePermissionsFromAuthError(authErrMesg string) (map[string][]string, error)

Types

type MPFConfig

type MPFConfig struct {
	ResourceGroup  ResourceGroup
	SubscriptionID string
	TenantID       string
	SP             ServicePrincipal
	Role           Role
}

type MPFResult

type MPFResult struct {
	// The map from which the minimum permissions will be calculated
	RequiredPermissions map[string][]string
	// IterationCount is the number of iterations MPF took to discover all permissions.
	// A value of 0 means all required permissions were provided upfront via initialPermissions.
	IterationCount int
}

func GetMPFResult

func GetMPFResult(requiredPermissions map[string][]string) MPFResult

func GetMPFResultWithIterationCount added in v0.16.0

func GetMPFResultWithIterationCount(requiredPermissions map[string][]string, iterationCount int) MPFResult

type PermissionErrorDetails added in v0.13.0

type PermissionErrorDetails struct {
	MissingPermissions string
	Scope              string
}

type ResourceGroup

type ResourceGroup struct {
	ResourceGroupName       string
	ResourceGroupResourceID string
	Location                string
}

type Role

type Role struct {
	RoleDefinitionID          string
	RoleDefinitionName        string
	RoleDefinitionDescription string
	RoleDefinitionResourceID  string
}

type ServicePrincipal

type ServicePrincipal struct {
	SPClientID     string
	SPObjectID     string
	SPClientSecret string
}

Jump to

Keyboard shortcuts

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