Documentation ¶
Index ¶
- Constants
- func Main(ctx context.Context, cancel context.CancelFunc, _ *mux.Router, _ chan<- bool)
- type Bootstrap
- type CertCollect
- type CertPair
- type Certs
- type CmdRunner
- type Cred
- type CredCollect
- type CredentialGenerator
- type ExecRunner
- type ExecWrapper
- type GokeyGenerator
- type RevokeFunc
- type TokenMaintenance
- type TokenProvider
- type UserPasswordPair
Constants ¶
const ( VaultToken = "X-Vault-Token" TokenCreatorPolicyName = "privileged-token-creator" // This is an admin token policy that allow for creation of // per-service tokens and policies TokenCreatorPolicy = `` /* 394-byte string literal not displayed */ )
const OneShotProvider = "oneshot"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bootstrap ¶
type Bootstrap struct {
// contains filtered or unexported fields
}
func NewBootstrap ¶
type CertCollect ¶
type CertCollect struct {
Pair CertPair `json:"data"`
}
type Certs ¶
type Certs struct {
// contains filtered or unexported fields
}
func NewCerts ¶
func NewCerts( caller internal.HttpCaller, certPath string, rootToken string, secretServiceBaseURL string, lc logger.LoggingClient) Certs
func (*Certs) AlreadyinStore ¶
func (*Certs) UploadToStore ¶
type Cred ¶
type Cred struct {
// contains filtered or unexported fields
}
func NewCred ¶
func NewCred( caller internal.HttpCaller, rootToken string, generator CredentialGenerator, secretServiceBaseURL string, lc logger.LoggingClient) Cred
func (*Cred) UploadToStore ¶
func (cr *Cred) UploadToStore(pair *UserPasswordPair, path string) error
type CredCollect ¶
type CredCollect struct {
Pair UserPasswordPair `json:"data"`
}
type CredentialGenerator ¶
CredentialGenerator returns a credential generated with random algorithm for secret store
type ExecRunner ¶
type ExecWrapper ¶ added in v1.2.0
type ExecWrapper struct{}
func (ExecWrapper) CommandContext ¶ added in v1.2.0
type GokeyGenerator ¶ added in v1.2.0
type GokeyGenerator struct {
// contains filtered or unexported fields
}
GokeyGenerator implements the CredentialGenerator interface using the gokey library using tokenPath as the gokey master password and accepting the realm as the argument to the Generate method
func NewGokeyGenerator ¶ added in v1.2.0
func NewGokeyGenerator(masterPassword string) *GokeyGenerator
type RevokeFunc ¶
type RevokeFunc func()
type TokenMaintenance ¶
type TokenMaintenance struct {
// contains filtered or unexported fields
}
func NewTokenMaintenance ¶
func NewTokenMaintenance(logging logger.LoggingClient, secretClient secretstoreclient.SecretStoreClient) *TokenMaintenance
NewTokenMaintenance creates a new TokenProvider
func (*TokenMaintenance) CreateTokenIssuingToken ¶
func (tm *TokenMaintenance) CreateTokenIssuingToken(rootToken string) (map[string]interface{}, RevokeFunc, error)
CreateTokenIssuingToken creates an admin token that allows the holder to create per-service tokens an policies. Requires a root token, returns a function that, if called, with revoke the token
func (*TokenMaintenance) RevokeNonRootTokens ¶
func (tm *TokenMaintenance) RevokeNonRootTokens(privilegedToken string) error
RevokeNonRootTokens revokes non-root tokens that may have been issued in previous EdgeX runs. Should be called with a high-privileged token.
func (*TokenMaintenance) RevokeRootTokens ¶
func (tm *TokenMaintenance) RevokeRootTokens(privilegedToken string) error
RevokeRootTokens revokes any root tokens found in the secret store. Should be called with a high-privileged token.
type TokenProvider ¶
type TokenProvider struct {
// contains filtered or unexported fields
}
func NewTokenProvider ¶
func NewTokenProvider(ctx context.Context, lc logger.LoggingClient, execRunner ExecRunner) *TokenProvider
NewTokenProvider creates a new TokenProvider
func (*TokenProvider) Launch ¶
func (p *TokenProvider) Launch() error
Launch spawns the token provider function
func (*TokenProvider) SetConfiguration ¶
func (p *TokenProvider) SetConfiguration(config secretstoreclient.SecretServiceInfo) error
SetConfiguration parses token provider configuration and resolves paths specified therein