appsecret

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CREDENTIAL_URL = "https://{{env}}gears.comcast.com/v2/applications/{{app}}/credentials/{{key}}"
View Source
const SAT_URL = "https://sat-prod.codebig2.net/oauth/token"

Variables

This section is empty.

Functions

func NewConfigVault

func NewConfigVault(config config.Config) secret.Vault

func NewTenantConfigVault

func NewTenantConfigVault(tid tenant.Id, parentVault secret.Vault, tenantStorer tenant.TenantStorer) secret.Vault

Types

type Autobahn added in v1.1.2

type Autobahn struct {
	Basic
	AppRole    string `json:"appRole,omitempty"`
	PrivateKey string `json:"privateKey,omitempty"`
	PublicKey  string `json:"publicKey,omitempty"`
	SSHRole    string `json:"sshRole,omitempty"`
	Token      string `json:"token,omitempty"`
}

type Basic added in v1.1.2

type Basic struct {
	Id     string `json:"id"`
	Secret string `json:"secret"`
}

type ConfigVault

type ConfigVault struct {
	// contains filtered or unexported fields
}

ConfigVault provides secrets from ears app configuration

func (*ConfigVault) GetConfig added in v1.1.2

func (v *ConfigVault) GetConfig(ctx context.Context, key string) string

func (*ConfigVault) Secret

func (v *ConfigVault) Secret(ctx context.Context, key string) string

type Credential added in v1.1.2

type Credential struct {
	Name string `json:"name"`
	Type string `json:"type"`
	Data Data   `json:"data,omitempty"`
	Ttl  int32  `json:"ttl,omitempty"`
}

func (*Credential) GetGrantType added in v1.1.2

func (c *Credential) GetGrantType() (string, string)

func (*Credential) GetId added in v1.1.2

func (c *Credential) GetId() (string, string)

func (*Credential) GetIssuer added in v1.1.2

func (c *Credential) GetIssuer() (string, string)

func (*Credential) GetScope added in v1.1.2

func (c *Credential) GetScope() (string, string)

func (*Credential) GetSecret added in v1.1.2

func (c *Credential) GetSecret() (string, string)

type CredentialResponse added in v1.1.2

type CredentialResponse struct {
	Item Credential `json:"item"`
}

type Data added in v1.1.2

type Data struct {
	Autobahn *Autobahn `json:"autobahn,omitempty"`
	Basic    *Basic    `json:"basic,omitempty"`
	Generic  *Basic    `json:"generic,omitempty"`
	SSH      *Basic    `json:"ssh,omitempty"`
	OAuth1   *Oauth    `json:"oauth1,omitempty"`
	OAuth2   *Oauth    `json:"oauth2,omitempty"`
	SAT      *Oauth    `json:"sat,omitempty"`
}

type Oauth added in v1.1.2

type Oauth struct {
	Basic
	Issuer         string `json:"issuer"`
	GrantType      string `json:"grantType,omitempty"`
	Scope          string `json:"scope,omitempty"`
	Level          string `json:"level,omitempty"`
	SecretLocation int    `json:"secretLocation,omitempty"`
	TokenType      string `json:"tokenType,omitempty"`
}

type SatToken added in v1.1.2

type SatToken struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
	Scope       string `json:"scope"`
	TokenType   string `json:"token_type"`
	ExpiresAt   int64  `json:"timestamp"`
}

type TenantConfigVault

type TenantConfigVault struct {
	// contains filtered or unexported fields
}

func (*TenantConfigVault) GetConfig added in v1.1.2

func (v *TenantConfigVault) GetConfig(ctx context.Context, key string) string

func (*TenantConfigVault) Secret

func (v *TenantConfigVault) Secret(ctx context.Context, key string) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL