Documentation ¶
Index ¶
Constants ¶
View Source
const (
// CredentialConfigAnnotation is annotation key for credential configs
CredentialConfigAnnotation = "refunc.io/is-credential-config"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlatCreds ¶
type FlatCreds struct { // ns/name if it comes from a funcinst FuncinstID string `json:"funcinst,omitempty"` // meta ID string `json:"id,omitempty"` AccessKey string `json:"accessKey,omitempty"` SecretKey string `json:"secretKey,omitempty"` // storage Scope string `json:"scope,omitempty"` // network Permissions struct { Publish []string `json:"publish,omitempty"` Subscribe []string `json:"subscribe,omitempty"` } `json:"permissions"` }
FlatCreds is flat verison of creds and permission
type Provider ¶
type Provider interface { IssueKeyPair(fni *rfv1beta3.Funcinst) (accessKey, secretKey string, err error) IssueAccessToken(fni *rfv1beta3.Funcinst) (accessToken string, err error) }
Provider is interface for a vault to issue credentials
func NewGeneratedProvider ¶
NewGeneratedProvider creates a creds provider generate random keys, issues token using private key in current env
func NewSimpleProvider ¶
func NewSimpleProvider() Provider
NewSimpleProvider creates a creds provider simply forwarding keys and token in current env
type Syncer ¶
type Syncer interface {
Run(stopC <-chan struct{})
}
Syncer sync credentials from refunc and provide for storage layer
func NewCredSyncer ¶
func NewCredSyncer( namespace, prefix string, store Store, refuncInformers rfinformers.SharedInformerFactory, kubeInformers k8sinformers.SharedInformerFactory, ) (Syncer, error)
NewCredSyncer creates a credential provider
Click to show internal directories.
Click to hide internal directories.