Documentation ¶
Index ¶
- type APICapability
- type APIPassThroughCapability
- type HCPLinkTokenManager
- func (m *HCPLinkTokenManager) ForgetTokenPolicy()
- func (t *HCPLinkTokenManager) GetLastTokenExpiry() time.Time
- func (t *HCPLinkTokenManager) GetLatestToken() string
- func (t *HCPLinkTokenManager) GetPolicy() string
- func (m *HCPLinkTokenManager) HandleTokenPolicy(ctx context.Context, activeNode bool) string
- func (t *HCPLinkTokenManager) SetTokenTTL(ttl time.Duration) error
- func (m *HCPLinkTokenManager) Shutdown()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APICapability ¶
type APICapability struct {
// contains filtered or unexported fields
}
func NewAPICapability ¶
func NewAPICapability(scadaConfig *scada.Config, scadaProvider scada.SCADAProvider, core *vault.Core, logger hclog.Logger) (*APICapability, error)
func (*APICapability) PurgePolicy ¶
func (c *APICapability) PurgePolicy()
func (*APICapability) Start ¶
func (c *APICapability) Start() error
func (*APICapability) Stop ¶
func (c *APICapability) Stop() error
type APIPassThroughCapability ¶
type APIPassThroughCapability struct {
// contains filtered or unexported fields
}
func NewAPIPassThroughCapability ¶
func NewAPIPassThroughCapability(scadaProvider scada.SCADAProvider, core *vault.Core, logger hclog.Logger) (*APIPassThroughCapability, error)
func (*APIPassThroughCapability) Start ¶
func (p *APIPassThroughCapability) Start() error
func (*APIPassThroughCapability) Stop ¶
func (p *APIPassThroughCapability) Stop() error
type HCPLinkTokenManager ¶
type HCPLinkTokenManager struct {
// contains filtered or unexported fields
}
func NewHCPLinkTokenManager ¶
func (*HCPLinkTokenManager) ForgetTokenPolicy ¶
func (m *HCPLinkTokenManager) ForgetTokenPolicy()
ForgetTokenPolicy Forgets the current Batch token, its associated policy, and sets the lastTokenExpiry to Now such that the policy is forced to be refreshed by the next valid request.
func (*HCPLinkTokenManager) GetLastTokenExpiry ¶
func (t *HCPLinkTokenManager) GetLastTokenExpiry() time.Time
func (*HCPLinkTokenManager) GetLatestToken ¶
func (t *HCPLinkTokenManager) GetLatestToken() string
func (*HCPLinkTokenManager) GetPolicy ¶
func (t *HCPLinkTokenManager) GetPolicy() string
func (*HCPLinkTokenManager) HandleTokenPolicy ¶
func (m *HCPLinkTokenManager) HandleTokenPolicy(ctx context.Context, activeNode bool) string
HandleTokenPolicy checks if Vault is sealed or not an active node, then it removes both token and policy. And, if Vault is not sealed, and token needs to be refreshed it refreshes both policy and token
func (*HCPLinkTokenManager) SetTokenTTL ¶
func (t *HCPLinkTokenManager) SetTokenTTL(ttl time.Duration) error
func (*HCPLinkTokenManager) Shutdown ¶
func (m *HCPLinkTokenManager) Shutdown()
Click to show internal directories.
Click to hide internal directories.