gardenerconfig

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

README

Gardener Config Credential Repository

The gardener config credential repository implements the retrieval of secrets in a data format specified by the gardener concourse utils (https://github.com/gardener/cc-utils/tree/master/model). It supports either handing in the data via a local json file or retrieve it from a secret server (as defined in https://github.com/gardener/cc-utils/blob/master/ccc/secrets_server.py#L29).

Documentation

Index

Constants

View Source
const (
	Type   = "GardenerConfig"
	TypeV1 = Type + runtime.VersionSeparator + "v1"
)
View Source
const ATTR_REPOS = "github.com/open-component-model/ocm/pkg/contexts/credentials/repositories/gardenerconfig"

Variables

This section is empty.

Functions

This section is empty.

Types

type Cipher

type Cipher string
const (
	Plaintext Cipher = "PLAINTEXT"
	AESECB    Cipher = "AES.ECB"
)

type Repositories

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

func (*Repositories) GetRepository

func (r *Repositories) GetRepository(ctx cpi.Context, url string, configType gardenercfgcpi.ConfigType, cipher Cipher, key []byte, propagateConsumerIdentity bool) (*Repository, error)

type Repository

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

func NewRepository

func NewRepository(ctx cpi.Context, url string, configType gardenercfgcpi.ConfigType, cipher Cipher, key []byte, propagateConsumerIdentity bool) (*Repository, error)

func (*Repository) ExistsCredentials

func (r *Repository) ExistsCredentials(name string) (bool, error)

func (*Repository) GetConsumerId added in v0.6.0

func (r *Repository) GetConsumerId(uctx ...internal.UsageContext) internal.ConsumerIdentity

func (*Repository) GetIdentityMatcher added in v0.6.0

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"`
	URL                         string                    `json:"url"`
	ConfigType                  gardenercfgcpi.ConfigType `json:"configType"`
	Cipher                      Cipher                    `json:"cipher"`
	PropagateConsumerIdentity   *bool                     `json:"propagateConsumerIdentity,omitempty"`
}

RepositorySpec describes a secret server based credential repository interface.

func NewRepositorySpec

func NewRepositorySpec(url string, configType gardenercfgcpi.ConfigType, cipher Cipher, propagateConsumerIdentity ...bool) *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) GetType

func (a *RepositorySpec) GetType() string

func (*RepositorySpec) Repository

func (a *RepositorySpec) Repository(ctx cpi.Context, creds cpi.Credentials) (cpi.Repository, error)

Directories

Path Synopsis
handler

Jump to

Keyboard shortcuts

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