Documentation
¶
Index ¶
- Constants
- Variables
- type ImportFromProviderCriteria
- type Option
- type Service
- func (s *Service) BulkRevoke(ctx context.Context, filter domain.RevokeGrantsFilter, actor, reason string) ([]*domain.Grant, error)
- func (s *Service) Create(ctx context.Context, grant *domain.Grant) error
- func (s *Service) DormancyCheck(ctx context.Context, criteria domain.DormancyCheckCriteria) error
- func (s *Service) GenerateExcludedGrantIDsForSmartInactiveGrants(ctx context.Context, filter domain.ListGrantsFilter) ([]string, error)
- func (s *Service) GenerateSummary(ctx context.Context, filter domain.ListGrantsFilter) (*domain.SummaryResult, error)
- func (s *Service) GenerateUserExcludedGrantIDsForSmartInactiveGrants(ctx context.Context, filter domain.ListGrantsFilter) ([]string, error)
- func (s *Service) GetByID(ctx context.Context, id string) (*domain.Grant, error)
- func (s *Service) GetGrantsTotalCount(ctx context.Context, filter domain.ListGrantsFilter) (int64, error)
- func (s *Service) GrantDriftCheck(ctx context.Context, req domain.GrantDriftCheckRequest) error
- func (s *Service) ImportFromProvider(ctx context.Context, criteria ImportFromProviderCriteria) ([]*domain.Grant, error)
- func (s *Service) List(ctx context.Context, filter domain.ListGrantsFilter) ([]domain.Grant, error)
- func (s *Service) ListUserRoles(ctx context.Context, owner string) ([]string, error)
- func (s *Service) Prepare(ctx context.Context, appeal domain.Appeal) (*domain.Grant, error)
- func (s *Service) Restore(ctx context.Context, id, actor, reason string) (*domain.Grant, error)
- func (s *Service) Revoke(ctx context.Context, id, actor, reason string, opts ...Option) (*domain.Grant, error)
- func (s *Service) SetAppealService(a appealService)
- func (s *Service) Update(ctx context.Context, payload *domain.GrantUpdate) (*domain.Grant, error)
- type ServiceDeps
Constants ¶
const ( AuditKeyRevoke = "grant.revoke" AuditKeyUpdate = "grant.update" AuditKeyRestore = "grant.restore" AuditKeyDriftRemediaton = "grant.drift_remediation" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*options)
func SkipNotifications ¶
func SkipNotifications() Option
func SkipRevokeAccessInProvider ¶
func SkipRevokeAccessInProvider() Option
type Service ¶
type Service struct {
AppealService appealService
// contains filtered or unexported fields
}
func NewService ¶
func NewService(deps ServiceDeps) *Service
func (*Service) BulkRevoke ¶
func (*Service) DormancyCheck ¶ added in v0.7.5
func (*Service) GenerateExcludedGrantIDsForSmartInactiveGrants ¶ added in v0.12.17
func (s *Service) GenerateExcludedGrantIDsForSmartInactiveGrants(ctx context.Context, filter domain.ListGrantsFilter) ([]string, error)
GenerateExcludedGrantIDsForSmartInactiveGrants handles the group/resource/provider-scoped smart inactive grant dedup triggered by InactiveGrantPolicy=SMART InactiveGrantFilterKeys must be non-empty (and each key must have a corresponding non-empty value in the filter) to prevent accidentally fetching all grants at once. Keys in ignoredInactiveGrantFilterKeys (offset, size, order_by, statuses) are silently skipped — they are always reset in the inner queries and do not count toward the non-empty requirement. Keys in invalidInactiveGrantFilterKeys are rejected with an explicit error.
func (*Service) GenerateSummary ¶ added in v0.12.15
func (s *Service) GenerateSummary(ctx context.Context, filter domain.ListGrantsFilter) (*domain.SummaryResult, error)
func (*Service) GenerateUserExcludedGrantIDsForSmartInactiveGrants ¶ added in v0.12.16
func (*Service) GetGrantsTotalCount ¶ added in v0.7.5
func (*Service) GrantDriftCheck ¶ added in v0.12.17
GrantDriftCheck orchestrates drift detection, remediation, and alerting for all managed bot accounts. A grant is "drifted" when Guardian records it as active but the provider no longer has the access. All findings are sent as a single summary alert to adminTeam.
func (*Service) ImportFromProvider ¶
func (*Service) ListUserRoles ¶ added in v0.7.6
func (*Service) SetAppealService ¶ added in v0.12.15
func (s *Service) SetAppealService(a appealService)