gardenerconfig

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 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 (
	RepositoryType   = "GardenerConfig"
	RepositoryTypeV1 = RepositoryType + runtime.VersionSeparator + "v1"
	CONSUMER_TYPE    = "Buildcredentials" + common.OCM_TYPE_GROUP_SUFFIX
)
View Source
const ATTR_REPOS = "github.com/open-component-model/ocm/pkg/contexts/credentials/repositories/gardenerconfig"

Variables

This section is empty.

Functions

func IdentityMatcher

func IdentityMatcher(pattern, cur, id cpi.ConsumerIdentity) bool

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) 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"`
}

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) 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