Documentation ¶
Index ¶
- Constants
- func GenerateCredentialsBySecret(secretData string) (*auth.SecretsManagerPluginCredentials, error)
- func GenerateSecretInfoByCredentials(securityCredentials *auth.SecretsManagerPluginCredentials, secretName string) (*cmodels.SecretInfo, error)
- func ParseTTL(secretInfo *cmodels.SecretInfo, defaultRotationInterval int64) int64
- type AKExpireHandler
- type CustomerTask
- type DefaultPluginCredentialsLoader
- type DefaultSecretExchange
- type DefaultSecretRecoveryStrategy
- type DefaultSecretsManagerPluginCacheHook
- func (dsmpch *DefaultSecretsManagerPluginCacheHook) Close() error
- func (dsmpch *DefaultSecretsManagerPluginCacheHook) CloseSecurityUpdaterAndClientByClient(secretName string, client interface{}) error
- func (dsmpch *DefaultSecretsManagerPluginCacheHook) CloseSecurityUpdaterAndClientByTypeName(updaterClasses map[string]struct{}) error
- func (dsmpch *DefaultSecretsManagerPluginCacheHook) Get(cacheSecretInfo *cmodels.CacheSecretInfo) (*cmodels.SecretInfo, error)
- func (dsmpch *DefaultSecretsManagerPluginCacheHook) Init() error
- func (dsmpch *DefaultSecretsManagerPluginCacheHook) Put(secretInfo *cmodels.SecretInfo) (*cmodels.CacheSecretInfo, error)
- func (dsmpch *DefaultSecretsManagerPluginCacheHook) RecoveryGetSecret(secretName string) (*cmodels.SecretInfo, error)
- func (dsmpch *DefaultSecretsManagerPluginCacheHook) RegisterSecretsManagerUpdater(secretName string, securityUpdater SecretsManagerPluginCredentialUpdater) error
- type MonitorCacheSecretStoreStrategy
- type MonitorMemoryCacheSecretStoreStrategy
- func (m *MonitorMemoryCacheSecretStoreStrategy) AddRefreshHook(secretCacheClient *secretsmanagerclient.SecretManagerCacheClient)
- func (m *MonitorMemoryCacheSecretStoreStrategy) Close() error
- func (m *MonitorMemoryCacheSecretStoreStrategy) GetCacheSecretInfo(secretName string) (*cmodels.CacheSecretInfo, error)
- func (m *MonitorMemoryCacheSecretStoreStrategy) Init() error
- func (m *MonitorMemoryCacheSecretStoreStrategy) StoreSecret(cacheSecretInfo *cmodels.CacheSecretInfo) error
- type MonitorTask
- type RotateAKSecretRefreshSecretStrategy
- func (rrs *RotateAKSecretRefreshSecretStrategy) Close() error
- func (rrs *RotateAKSecretRefreshSecretStrategy) GetNextExecuteTime(secretName string, ttl, offsetTimestamp int64) int64
- func (rrs *RotateAKSecretRefreshSecretStrategy) Init() error
- func (rrs *RotateAKSecretRefreshSecretStrategy) ParseNextExecuteTime(cacheSecretInfo *cmodels.CacheSecretInfo) int64
- func (rrs *RotateAKSecretRefreshSecretStrategy) ParseTTL(secretInfo *cmodels.SecretInfo) int64
- type SecretExchange
- type SecretRecoveryStrategy
- type SecretsManagerPluginCacheHook
- type SecretsManagerPluginCredentialUpdater
- type SecretsManagerPluginCredentialsLoader
- type SecretsManagerPluginCredentialsProvider
Constants ¶
View Source
const ( DefaultMonitorPeriod = 30 * 60 * 1000 DefaultSendPeriod = 120 * 60 * 1000 )
View Source
const ( DefaultDelayInterval = 5 * 60 * 1000 DefaultRandomDisturbanceRange = 10 * 60 * 1000 )
Variables ¶
This section is empty.
Functions ¶
func GenerateCredentialsBySecret ¶
func GenerateCredentialsBySecret(secretData string) (*auth.SecretsManagerPluginCredentials, error)
func GenerateSecretInfoByCredentials ¶
func GenerateSecretInfoByCredentials(securityCredentials *auth.SecretsManagerPluginCredentials, secretName string) (*cmodels.SecretInfo, error)
Types ¶
type AKExpireHandler ¶
type CustomerTask ¶
type CustomerTask struct {
// contains filtered or unexported fields
}
func NewCustomerTask ¶
func NewCustomerTask(blockingQueue *models.BlockingQueue) *CustomerTask
func (*CustomerTask) Run ¶
func (st *CustomerTask) Run()
type DefaultPluginCredentialsLoader ¶
type DefaultPluginCredentialsLoader struct { }
func (*DefaultPluginCredentialsLoader) Load ¶
func (loader *DefaultPluginCredentialsLoader) Load() (*SecretsManagerPluginCredentialsProvider, error)
type DefaultSecretExchange ¶
type DefaultSecretExchange struct { }
func NewDefaultSecretExchange ¶
func NewDefaultSecretExchange() *DefaultSecretExchange
func (*DefaultSecretExchange) ExchangeSecretName ¶
func (dse *DefaultSecretExchange) ExchangeSecretName(userSecretName string) (string, error)
type DefaultSecretRecoveryStrategy ¶
type DefaultSecretRecoveryStrategy struct { }
func NewDefaultSecretRecoveryStrategy ¶
func NewDefaultSecretRecoveryStrategy() *DefaultSecretRecoveryStrategy
func (*DefaultSecretRecoveryStrategy) RecoverGetSecret ¶
func (d *DefaultSecretRecoveryStrategy) RecoverGetSecret(secretName string) (*models.SecretInfo, error)
type DefaultSecretsManagerPluginCacheHook ¶
type DefaultSecretsManagerPluginCacheHook struct { PluginUpdaterMap map[string][]SecretsManagerPluginCredentialUpdater BlockingQueue *models.BlockingQueue SecretRecoveryStrategy SecretRecoveryStrategy // contains filtered or unexported fields }
func NewDefaultSecretsManagerPluginCacheHook ¶
func NewDefaultSecretsManagerPluginCacheHook(blockingQueue *models.BlockingQueue, secretRecoveryStrategy SecretRecoveryStrategy) *DefaultSecretsManagerPluginCacheHook
func (*DefaultSecretsManagerPluginCacheHook) Close ¶
func (dsmpch *DefaultSecretsManagerPluginCacheHook) Close() error
func (*DefaultSecretsManagerPluginCacheHook) CloseSecurityUpdaterAndClientByClient ¶
func (dsmpch *DefaultSecretsManagerPluginCacheHook) CloseSecurityUpdaterAndClientByClient(secretName string, client interface{}) error
func (*DefaultSecretsManagerPluginCacheHook) CloseSecurityUpdaterAndClientByTypeName ¶
func (dsmpch *DefaultSecretsManagerPluginCacheHook) CloseSecurityUpdaterAndClientByTypeName(updaterClasses map[string]struct{}) error
func (*DefaultSecretsManagerPluginCacheHook) Get ¶
func (dsmpch *DefaultSecretsManagerPluginCacheHook) Get(cacheSecretInfo *cmodels.CacheSecretInfo) (*cmodels.SecretInfo, error)
func (*DefaultSecretsManagerPluginCacheHook) Init ¶
func (dsmpch *DefaultSecretsManagerPluginCacheHook) Init() error
func (*DefaultSecretsManagerPluginCacheHook) Put ¶
func (dsmpch *DefaultSecretsManagerPluginCacheHook) Put(secretInfo *cmodels.SecretInfo) (*cmodels.CacheSecretInfo, error)
func (*DefaultSecretsManagerPluginCacheHook) RecoveryGetSecret ¶
func (dsmpch *DefaultSecretsManagerPluginCacheHook) RecoveryGetSecret(secretName string) (*cmodels.SecretInfo, error)
func (*DefaultSecretsManagerPluginCacheHook) RegisterSecretsManagerUpdater ¶
func (dsmpch *DefaultSecretsManagerPluginCacheHook) RegisterSecretsManagerUpdater(secretName string, securityUpdater SecretsManagerPluginCredentialUpdater) error
type MonitorCacheSecretStoreStrategy ¶
type MonitorCacheSecretStoreStrategy interface { cache.SecretCacheStoreStrategy AddRefreshHook(client *secretsmanagerclient.SecretManagerCacheClient) }
type MonitorMemoryCacheSecretStoreStrategy ¶
type MonitorMemoryCacheSecretStoreStrategy struct { BlockingQueue *models.BlockingQueue MonitorPeriodMilliseconds int64 MonitorCustomerMilliseconds int64 // contains filtered or unexported fields }
func NewMonitorMemoryCacheSecretStoreStrategy ¶
func NewMonitorMemoryCacheSecretStoreStrategy(blockingQueue *models.BlockingQueue, monitorPeriodMilliseconds, monitorCustomerMilliseconds int64) *MonitorMemoryCacheSecretStoreStrategy
func (*MonitorMemoryCacheSecretStoreStrategy) AddRefreshHook ¶
func (m *MonitorMemoryCacheSecretStoreStrategy) AddRefreshHook(secretCacheClient *secretsmanagerclient.SecretManagerCacheClient)
func (*MonitorMemoryCacheSecretStoreStrategy) Close ¶
func (m *MonitorMemoryCacheSecretStoreStrategy) Close() error
func (*MonitorMemoryCacheSecretStoreStrategy) GetCacheSecretInfo ¶
func (m *MonitorMemoryCacheSecretStoreStrategy) GetCacheSecretInfo(secretName string) (*cmodels.CacheSecretInfo, error)
func (*MonitorMemoryCacheSecretStoreStrategy) Init ¶
func (m *MonitorMemoryCacheSecretStoreStrategy) Init() error
func (*MonitorMemoryCacheSecretStoreStrategy) StoreSecret ¶
func (m *MonitorMemoryCacheSecretStoreStrategy) StoreSecret(cacheSecretInfo *cmodels.CacheSecretInfo) error
type MonitorTask ¶
type MonitorTask struct { *MonitorMemoryCacheSecretStoreStrategy // contains filtered or unexported fields }
func NewMonitorTask ¶
func NewMonitorTask(monitorMemoryCacheSecretStoreStrategy *MonitorMemoryCacheSecretStoreStrategy, monitorPeriod int64, blockingQueue *models.BlockingQueue) *MonitorTask
func (*MonitorTask) Run ¶
func (mt *MonitorTask) Run()
type RotateAKSecretRefreshSecretStrategy ¶
type RotateAKSecretRefreshSecretStrategy struct {
// contains filtered or unexported fields
}
func NewRotateAKSecretRefreshSecretStrategy ¶
func NewRotateAKSecretRefreshSecretStrategy(rotationInterval, delayInterval int64) *RotateAKSecretRefreshSecretStrategy
func (*RotateAKSecretRefreshSecretStrategy) Close ¶
func (rrs *RotateAKSecretRefreshSecretStrategy) Close() error
func (*RotateAKSecretRefreshSecretStrategy) GetNextExecuteTime ¶
func (rrs *RotateAKSecretRefreshSecretStrategy) GetNextExecuteTime(secretName string, ttl, offsetTimestamp int64) int64
func (*RotateAKSecretRefreshSecretStrategy) Init ¶
func (rrs *RotateAKSecretRefreshSecretStrategy) Init() error
func (*RotateAKSecretRefreshSecretStrategy) ParseNextExecuteTime ¶
func (rrs *RotateAKSecretRefreshSecretStrategy) ParseNextExecuteTime(cacheSecretInfo *cmodels.CacheSecretInfo) int64
func (*RotateAKSecretRefreshSecretStrategy) ParseTTL ¶
func (rrs *RotateAKSecretRefreshSecretStrategy) ParseTTL(secretInfo *cmodels.SecretInfo) int64
type SecretExchange ¶
type SecretRecoveryStrategy ¶
type SecretRecoveryStrategy interface {
RecoverGetSecret(secretName string) (*models.SecretInfo, error)
}
type SecretsManagerPluginCacheHook ¶
type SecretsManagerPluginCacheHook interface { cache.SecretCacheHook RegisterSecretsManagerUpdater(secretName string, securityUpdater SecretsManagerPluginCredentialUpdater) error CloseSecurityUpdaterAndClientByClient(secretName string, client interface{}) error CloseSecurityUpdaterAndClientByTypeName(updaterClasses map[string]struct{}) error }
type SecretsManagerPluginCredentialUpdater ¶
type SecretsManagerPluginCredentialUpdater interface { // 获取云产品Client GetClient() interface{} // 更新TmpAK信息 UpdateCredential(secretInfo *cmodels.SecretInfo) error // 获取类型名称 GetTypeName() string // 关闭,释放资源 Close() error }
type SecretsManagerPluginCredentialsLoader ¶
type SecretsManagerPluginCredentialsLoader interface {
Load() (*SecretsManagerPluginCredentialsProvider, error)
}
type SecretsManagerPluginCredentialsProvider ¶
type SecretsManagerPluginCredentialsProvider struct { Credentials auth.Credential RegionInfos []*cmodels.RegionInfo SecretNames []string SecretExchange SecretExchange CacheSecretStoreStrategy MonitorCacheSecretStoreStrategy CacheHook SecretsManagerPluginCacheHook BackOffStrategy cservice.BackoffStrategy RefreshSecretStrategy cservice.RefreshSecretStrategy DkmsConfigsMap map[*cmodels.RegionInfo]*cmodels.DkmsConfig }
func NewSecretsManagerPluginCredentialsProvider ¶
func NewSecretsManagerPluginCredentialsProvider(credentials auth.Credential, regionInfos []*cmodels.RegionInfo, secretNames []string, secretExchange SecretExchange, cacheSecretStoreStrategy MonitorCacheSecretStoreStrategy, cacheHook SecretsManagerPluginCacheHook, backOffStrategy cservice.BackoffStrategy, refreshSecretStrategy cservice.RefreshSecretStrategy, dkmsConfigsMap map[*cmodels.RegionInfo]*cmodels.DkmsConfig) *SecretsManagerPluginCredentialsProvider
Source Files ¶
- ak_expire_handler.go
- credentials_service.go
- default_plugin_credentials_loader.go
- default_secretsmanager_plugin_cache_hook.go
- monitor_cache_secret_store_strategy.go
- monitor_memory_cache_secret_store_strategy.go
- rotate_ak_secret_refresh_secret_strategy.go
- secret_exchange.go
- secret_recovery_strategy.go
- secretsmanager_plugin_cache_hook.go
- secretsmanager_plugin_credential_updater.go
- secretsmanager_plugin_credentials_loader.go
- secretsmanager_plugin_credentials_provider.go
Click to show internal directories.
Click to hide internal directories.