Documentation
¶
Overview ¶
Package deferred resolves Atmos authentication at the first credential request.
Package deferred is a generated GoMock package.
Index ¶
- func AuthDisabled(manager any) bool
- func ConfigureAuth(ac *schema.AtmosConfiguration, identity string) bool
- func Credentials(ac *schema.AtmosConfiguration, info *schema.ConfigAndStacksInfo, ...) deferred.Resolver[*schema.ConfigAndStacksInfo]
- func DefaultIdentity(ac *schema.AtmosConfiguration, info *schema.ConfigAndStacksInfo) (string, error)
- func IsDeferred(manager any) bool
- func ResolveAuth(ac *schema.AtmosConfiguration, info *schema.ConfigAndStacksInfo) error
- type AuthFactory
- type AuthOptions
- type Manager
- func (m *Manager) Authenticate(ctx context.Context, identityName string) (*types.WhoamiInfo, error)
- func (m *Manager) AuthenticateProvider(ctx context.Context, providerName string) (*types.WhoamiInfo, error)
- func (m *Manager) CredentialStoreType() string
- func (r *Manager) Disabled() bool
- func (m *Manager) EnsureIdentityEnvironment(ctx context.Context, identityName string) (map[string]string, error)
- func (m *Manager) ExecuteIdentityIntegrations(ctx context.Context, identityName string) error
- func (m *Manager) ExecuteIntegration(ctx context.Context, integrationName string) error
- func (m *Manager) GetCachedCredentials(ctx context.Context, identityName string) (*types.WhoamiInfo, error)
- func (m *Manager) GetChain() []string
- func (m *Manager) GetDefaultIdentity(forceSelect bool) (string, error)
- func (m *Manager) GetEnvironmentVariables(identityName string) (map[string]string, error)
- func (m *Manager) GetFilesDisplayPath(providerName string) string
- func (m *Manager) GetIdentities() map[string]schema.Identity
- func (m *Manager) GetIntegration(integrationName string) (*schema.Integration, error)
- func (m *Manager) GetProviderForIdentity(identityName string) string
- func (m *Manager) GetProviderKindForIdentity(identityName string) (string, error)
- func (m *Manager) GetProviders() map[string]schema.Provider
- func (m *Manager) GetRealm() realm.RealmInfo
- func (m *Manager) GetStackInfo() *schema.ConfigAndStacksInfo
- func (m *Manager) ListIdentities() []string
- func (m *Manager) ListProviders() []string
- func (m *Manager) Logout(ctx context.Context, identityName string, deleteKeychain bool) error
- func (m *Manager) LogoutAll(ctx context.Context, deleteKeychain bool) error
- func (m *Manager) LogoutProvider(ctx context.Context, providerName string, deleteKeychain bool) error
- func (m *Manager) MaybeOfferAnyProfileFallback(ctx context.Context) error
- func (m *Manager) PrepareShellEnvironment(ctx context.Context, identityName string, currentEnv []string) ([]string, error)
- func (r *Manager) Resolve(ac *schema.AtmosConfiguration, info *schema.ConfigAndStacksInfo) error
- func (m *Manager) ResolvePrincipalSetting(identityName, key string) (interface{}, bool)
- func (m *Manager) ResolveProviderConfig(identityName string) (*schema.Provider, bool)
- func (m *Manager) RevokeEphemeralIntegrations(ctx context.Context, identityName string, globalDefault *bool) error
- func (m *Manager) Validate() error
- func (m *Manager) Whoami(ctx context.Context, identityName string) (*types.WhoamiInfo, error)
- type MockAuthFactory
- type MockAuthFactoryMockRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthDisabled ¶
AuthDisabled distinguishes explicit disable from deferred credentials.
func ConfigureAuth ¶
func ConfigureAuth(ac *schema.AtmosConfiguration, identity string) bool
ConfigureAuth defers implicit authentication and records explicit disable. False means an explicit identity was requested and the caller must authenticate it.
func Credentials ¶
func Credentials(ac *schema.AtmosConfiguration, info *schema.ConfigAndStacksInfo, identity string) deferred.Resolver[*schema.ConfigAndStacksInfo]
Credentials defers identity selection and authentication until resolution. Configuration and stack info are copied so nested consumers cannot overwrite their caller's selected identity or populated credentials.
func DefaultIdentity ¶
func DefaultIdentity(ac *schema.AtmosConfiguration, info *schema.ConfigAndStacksInfo) (string, error)
DefaultIdentity selects a backend's default without authenticating it.
func IsDeferred ¶
IsDeferred reports the manager's evaluation policy, without resolving credentials.
func ResolveAuth ¶
func ResolveAuth(ac *schema.AtmosConfiguration, info *schema.ConfigAndStacksInfo) error
Types ¶
type AuthFactory ¶
type AuthFactory interface {
Create(*schema.AtmosConfiguration, *schema.AuthConfig, string) (auth.AuthManager, error)
}
AuthFactory authenticates when a list/describe value needs credentials.
type AuthOptions ¶
type AuthOptions struct {
Disabled bool
Factory AuthFactory
Config *schema.AtmosConfiguration
}
AuthOptions supplies invocation-local dependencies and the explicit disable policy.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Results are created on demand and memoize either an authenticated manager or a failure. Disabled remains an explicit policy, not an absent manager.
func NewManager ¶
func NewManager(opts AuthOptions) *Manager
NewManager creates an invocation-scoped resolver with an empty result cache.
func (*Manager) Authenticate ¶
Authenticate delegates an explicitly requested auth operation.
func (*Manager) AuthenticateProvider ¶
func (m *Manager) AuthenticateProvider(ctx context.Context, providerName string) (*types.WhoamiInfo, error)
AuthenticateProvider delegates an explicitly requested auth operation.
func (*Manager) CredentialStoreType ¶
CredentialStoreType delegates an explicitly requested auth operation.
func (*Manager) EnsureIdentityEnvironment ¶
func (m *Manager) EnsureIdentityEnvironment(ctx context.Context, identityName string) (map[string]string, error)
EnsureIdentityEnvironment delegates an explicitly requested auth operation.
func (*Manager) ExecuteIdentityIntegrations ¶
ExecuteIdentityIntegrations delegates an explicitly requested auth operation.
func (*Manager) ExecuteIntegration ¶
ExecuteIntegration delegates an explicitly requested auth operation.
func (*Manager) GetCachedCredentials ¶
func (m *Manager) GetCachedCredentials(ctx context.Context, identityName string) (*types.WhoamiInfo, error)
GetCachedCredentials delegates an explicitly requested auth operation.
func (*Manager) GetDefaultIdentity ¶
GetDefaultIdentity delegates an explicitly requested auth operation.
func (*Manager) GetEnvironmentVariables ¶
GetEnvironmentVariables delegates an explicitly requested auth operation.
func (*Manager) GetFilesDisplayPath ¶
GetFilesDisplayPath delegates an explicitly requested auth operation.
func (*Manager) GetIdentities ¶
GetIdentities delegates an explicitly requested auth operation.
func (*Manager) GetIntegration ¶
func (m *Manager) GetIntegration(integrationName string) (*schema.Integration, error)
GetIntegration delegates an explicitly requested auth operation.
func (*Manager) GetProviderForIdentity ¶
GetProviderForIdentity delegates an explicitly requested auth operation.
func (*Manager) GetProviderKindForIdentity ¶
GetProviderKindForIdentity delegates an explicitly requested auth operation.
func (*Manager) GetProviders ¶
GetProviders delegates an explicitly requested auth operation.
func (*Manager) GetStackInfo ¶
func (m *Manager) GetStackInfo() *schema.ConfigAndStacksInfo
GetStackInfo never initializes or authenticates an unused manager.
func (*Manager) ListIdentities ¶
ListIdentities delegates an explicitly requested auth operation.
func (*Manager) ListProviders ¶
ListProviders delegates an explicitly requested auth operation.
func (*Manager) LogoutProvider ¶
func (m *Manager) LogoutProvider(ctx context.Context, providerName string, deleteKeychain bool) error
LogoutProvider delegates an explicitly requested auth operation.
func (*Manager) MaybeOfferAnyProfileFallback ¶
MaybeOfferAnyProfileFallback delegates an explicitly requested auth operation.
func (*Manager) PrepareShellEnvironment ¶
func (m *Manager) PrepareShellEnvironment(ctx context.Context, identityName string, currentEnv []string) ([]string, error)
PrepareShellEnvironment delegates an explicitly requested auth operation.
func (*Manager) Resolve ¶
func (r *Manager) Resolve(ac *schema.AtmosConfiguration, info *schema.ConfigAndStacksInfo) error
func (*Manager) ResolvePrincipalSetting ¶
ResolvePrincipalSetting delegates an explicitly requested auth operation.
func (*Manager) ResolveProviderConfig ¶
ResolveProviderConfig delegates an explicitly requested auth operation.
func (*Manager) RevokeEphemeralIntegrations ¶
func (m *Manager) RevokeEphemeralIntegrations(ctx context.Context, identityName string, globalDefault *bool) error
RevokeEphemeralIntegrations delegates an explicitly requested auth operation.
type MockAuthFactory ¶
type MockAuthFactory struct {
// contains filtered or unexported fields
}
MockAuthFactory is a mock of AuthFactory interface.
func NewMockAuthFactory ¶
func NewMockAuthFactory(ctrl *gomock.Controller) *MockAuthFactory
NewMockAuthFactory creates a new mock instance.
func (*MockAuthFactory) Create ¶
func (m *MockAuthFactory) Create(arg0 *schema.AtmosConfiguration, arg1 *schema.AuthConfig, arg2 string) (auth.AuthManager, error)
Create mocks base method.
func (*MockAuthFactory) EXPECT ¶
func (m *MockAuthFactory) EXPECT() *MockAuthFactoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockAuthFactoryMockRecorder ¶
type MockAuthFactoryMockRecorder struct {
// contains filtered or unexported fields
}
MockAuthFactoryMockRecorder is the mock recorder for MockAuthFactory.