Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAuthMethod(m AuthMethod)
- type AuthMethod
- type AuthMethods
- type ConsumerProvider
- func (c *ConsumerProvider) ExistsCredentials(name string) (bool, error)
- func (p *ConsumerProvider) Get(req cpi.ConsumerIdentity) (cpi.CredentialsSource, bool)
- func (p *ConsumerProvider) GetConsumerId(uctx ...internal.UsageContext) internal.ConsumerIdentity
- func (p *ConsumerProvider) GetIdentityMatcher() string
- func (c *ConsumerProvider) LookupCredentials(name string) (cpi.Credentials, error)
- func (p *ConsumerProvider) Match(ectx cpi.EvaluationContext, req cpi.ConsumerIdentity, cur cpi.ConsumerIdentity, ...) (cpi.CredentialsSource, cpi.ConsumerIdentity)
- func (p *ConsumerProvider) String() string
- func (p *ConsumerProvider) Unregister(id cpi.ProviderIdentity)
- type Option
- type Options
- type Repositories
- type Repository
- func (r *Repository) ExistsCredentials(name string) (bool, error)
- func (r *Repository) GetConsumerId(uctx ...internal.UsageContext) internal.ConsumerIdentity
- func (r *Repository) GetIdentityMatcher() string
- func (r *Repository) LookupCredentials(name string) (cpi.Credentials, error)
- func (r *Repository) WriteCredentials(name string, creds cpi.Credentials) (cpi.Credentials, error)
- type RepositorySpec
- func (a *RepositorySpec) GetConsumerId(uctx ...internal.UsageContext) internal.ConsumerIdentity
- func (a *RepositorySpec) GetIdentityMatcher() string
- func (a *RepositorySpec) GetKey() cpi.ProviderIdentity
- func (a *RepositorySpec) GetType() string
- func (a *RepositorySpec) Repository(ctx cpi.Context, creds cpi.Credentials) (cpi.Repository, error)
Constants ¶
View Source
const ( CUSTOM_SECRETS = "secrets" CUSTOM_CONSUMERID = "consumerId" )
View Source
const ( Type = "HashiCorpVault" TypeV1 = Type + runtime.VersionSeparator + "v1" )
View Source
const ATTR_REPOS = "github.com/open-component-model/ocm/pkg/contexts/credentials/repositories/vault"
View Source
const PROVIDER = "ocm.software/credentialprovider/" + Type
Variables ¶
View Source
var (
REALM = ocmlog.DefineSubRealm("HashiCorp Vault Access", "credentials", "vault")
)
Functions ¶
func RegisterAuthMethod ¶
func RegisterAuthMethod(m AuthMethod)
Types ¶
type AuthMethod ¶
type AuthMethods ¶
type AuthMethods struct {
// contains filtered or unexported fields
}
func NewAuthMethods ¶
func NewAuthMethods() *AuthMethods
func (*AuthMethods) Get ¶
func (r *AuthMethods) Get(name string) AuthMethod
func (*AuthMethods) Names ¶
func (r *AuthMethods) Names() []string
func (*AuthMethods) Register ¶
func (r *AuthMethods) Register(m AuthMethod)
type ConsumerProvider ¶
type ConsumerProvider struct {
// contains filtered or unexported fields
}
func NewConsumerProvider ¶
func NewConsumerProvider(repo *Repository) (*ConsumerProvider, error)
func (*ConsumerProvider) ExistsCredentials ¶
func (c *ConsumerProvider) ExistsCredentials(name string) (bool, error)
func (*ConsumerProvider) Get ¶
func (p *ConsumerProvider) Get(req cpi.ConsumerIdentity) (cpi.CredentialsSource, bool)
func (*ConsumerProvider) GetConsumerId ¶ added in v0.11.0
func (p *ConsumerProvider) GetConsumerId(uctx ...internal.UsageContext) internal.ConsumerIdentity
func (*ConsumerProvider) GetIdentityMatcher ¶ added in v0.11.0
func (p *ConsumerProvider) GetIdentityMatcher() string
func (*ConsumerProvider) LookupCredentials ¶
func (c *ConsumerProvider) LookupCredentials(name string) (cpi.Credentials, error)
func (*ConsumerProvider) Match ¶
func (p *ConsumerProvider) Match(ectx cpi.EvaluationContext, req cpi.ConsumerIdentity, cur cpi.ConsumerIdentity, m cpi.IdentityMatcher) (cpi.CredentialsSource, cpi.ConsumerIdentity)
func (*ConsumerProvider) String ¶ added in v0.11.0
func (p *ConsumerProvider) String() string
func (*ConsumerProvider) Unregister ¶
func (p *ConsumerProvider) Unregister(id cpi.ProviderIdentity)
type Option ¶
type Option = optionutils.Option[*Options]
func WithMountPath ¶ added in v0.11.0
func WithNamespace ¶
func WithPropagation ¶
func WithSecrets ¶
type Options ¶
type Repositories ¶
type Repositories struct {
// contains filtered or unexported fields
}
func (*Repositories) GetRepository ¶
func (r *Repositories) GetRepository(ctx cpi.Context, spec *RepositorySpec) (*Repository, error)
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(ctx cpi.Context, spec *RepositorySpec) (*Repository, error)
func (*Repository) ExistsCredentials ¶
func (r *Repository) ExistsCredentials(name string) (bool, error)
func (*Repository) GetConsumerId ¶
func (r *Repository) GetConsumerId(uctx ...internal.UsageContext) internal.ConsumerIdentity
func (*Repository) GetIdentityMatcher ¶
func (r *Repository) GetIdentityMatcher() string
func (*Repository) LookupCredentials ¶
func (r *Repository) LookupCredentials(name string) (cpi.Credentials, error)
func (*Repository) WriteCredentials ¶
func (r *Repository) WriteCredentials(name string, creds cpi.Credentials) (cpi.Credentials, error)
type RepositorySpec ¶
type RepositorySpec struct { runtime.ObjectVersionedType `json:",inline"` ServerURL string `json:"serverURL"` Options `json:",inline"` }
RepositorySpec describes a docker config based credential repository interface.
func NewRepositorySpec ¶
func NewRepositorySpec(url string, opts ...Option) *RepositorySpec
NewRepositorySpec creates a new memory RepositorySpec.
func (*RepositorySpec) GetConsumerId ¶ added in v0.6.0
func (a *RepositorySpec) GetConsumerId(uctx ...internal.UsageContext) internal.ConsumerIdentity
func (*RepositorySpec) GetIdentityMatcher ¶ added in v0.6.0
func (a *RepositorySpec) GetIdentityMatcher() string
func (*RepositorySpec) GetKey ¶
func (a *RepositorySpec) GetKey() cpi.ProviderIdentity
func (*RepositorySpec) GetType ¶
func (a *RepositorySpec) GetType() string
func (*RepositorySpec) Repository ¶
func (a *RepositorySpec) Repository(ctx cpi.Context, creds cpi.Credentials) (cpi.Repository, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.