Documentation ¶
Index ¶
- type Registry
- func (r *Registry) CleanUpOrphanedExternalServices(ctx context.Context) error
- func (r *Registry) GetExternalServiceNames(ctx context.Context) ([]string, error)
- func (r *Registry) HasExternalService(ctx context.Context, name string) (bool, error)
- func (r *Registry) RemoveExternalService(ctx context.Context, name string) error
- func (r *Registry) SaveExternalService(ctx context.Context, cmd *extsvcauth.ExternalServiceRegistration) (*extsvcauth.ExternalService, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func ProvideExtSvcRegistry ¶
func ProvideExtSvcRegistry(saSvc *extsvcaccounts.ExtSvcAccountsService, serverLock *serverlock.ServerLockService, features featuremgmt.FeatureToggles) *Registry
func (*Registry) CleanUpOrphanedExternalServices ¶
CleanUpOrphanedExternalServices remove external services present in store that have not been registered on startup.
func (*Registry) GetExternalServiceNames ¶
GetExternalServiceNames returns the list of external services registered in store.
func (*Registry) HasExternalService ¶
HasExternalService returns whether an external service has been saved with that name.
func (*Registry) RemoveExternalService ¶
RemoveExternalService removes an external service and its associated resources from the database (ex: service account, token).
func (*Registry) SaveExternalService ¶
func (r *Registry) SaveExternalService(ctx context.Context, cmd *extsvcauth.ExternalServiceRegistration) (*extsvcauth.ExternalService, error)
SaveExternalService creates or updates an external service in the database. Based on the requested auth provider, it generates client_id, secrets and any additional provider specificities (ex: rsa keys). It also ensures that the associated service account has the correct permissions.