accessapi

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudletNodeHandler

type CloudletNodeHandler interface {
	CreateCloudletNodeReq(ctx context.Context, node *edgeproto.CloudletNode) (string, error)
	DeleteCloudletNodeReq(ctx context.Context, key *edgeproto.CloudletNodeKey) error
}

type ControllerHandler

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

Handles unmarshaling of data from ControllerClient. It then calls to the VaultClient to access data from Vault.

func NewControllerHandler

func NewControllerHandler(cloudletVerified *edgeproto.Cloudlet, vaultClient *VaultClient) *ControllerHandler

func (*ControllerHandler) GetAccessData

type TestHandler

type TestHandler struct {
	AccessVars   map[string]string
	RegistryAuth cloudcommon.RegistryAuth
}

func (*TestHandler) CreateCloudletNode

func (s *TestHandler) CreateCloudletNode(ctx context.Context, node *edgeproto.CloudletNode) (string, error)

func (*TestHandler) CreateOrUpdateDNSRecord

func (s *TestHandler) CreateOrUpdateDNSRecord(ctx context.Context, name, rtype, content string, ttl int, proxy bool) error

func (*TestHandler) DeleteCloudletNode

func (s *TestHandler) DeleteCloudletNode(ctx context.Context, nodeKey *edgeproto.CloudletNodeKey) error

func (*TestHandler) DeleteDNSRecord

func (s *TestHandler) DeleteDNSRecord(ctx context.Context, recordID string) error

func (*TestHandler) GetAppSecretVars

func (s *TestHandler) GetAppSecretVars(ctx context.Context, appKey *edgeproto.AppKey) (map[string]string, error)

func (*TestHandler) GetChefAuthKey

func (s *TestHandler) GetChefAuthKey(ctx context.Context) (*chefauth.ChefAuthKey, error)

func (*TestHandler) GetCloudletAccessVars

func (s *TestHandler) GetCloudletAccessVars(ctx context.Context) (map[string]string, error)

func (*TestHandler) GetDNSRecords

func (s *TestHandler) GetDNSRecords(ctx context.Context, fqdn string) ([]dnsapi.Record, error)

func (*TestHandler) GetFederationAPIKey

func (s *TestHandler) GetFederationAPIKey(ctx context.Context, fedKey *federationmgmt.FedKey) (*federationmgmt.ApiKey, error)

func (*TestHandler) GetKafkaCreds

func (s *TestHandler) GetKafkaCreds(ctx context.Context) (*node.KafkaCreds, error)

func (*TestHandler) GetOldSSHKey

func (s *TestHandler) GetOldSSHKey(ctx context.Context) (*vault.MEXKey, error)

func (*TestHandler) GetPublicCert

func (s *TestHandler) GetPublicCert(ctx context.Context, commonName string) (*vault.PublicCert, error)

func (*TestHandler) GetRegistryAuth

func (s *TestHandler) GetRegistryAuth(ctx context.Context, imgUrl string) (*cloudcommon.RegistryAuth, error)

func (*TestHandler) GetRegistryImageAuth

func (s *TestHandler) GetRegistryImageAuth(ctx context.Context, imgUrl string) (*cloudcommon.RegistryAuth, error)

func (*TestHandler) GetSSHPublicKey

func (s *TestHandler) GetSSHPublicKey(ctx context.Context) (string, error)

func (*TestHandler) GetSessionTokens

func (s *TestHandler) GetSessionTokens(ctx context.Context, secretName string) (string, error)

func (*TestHandler) SignSSHKey

func (s *TestHandler) SignSSHKey(ctx context.Context, publicKey string) (string, error)

type VaultClient

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

VaultClient implements platform.AccessApi for access from the Controller directly to Vault. In some cases it may require loading the platform specific plugin. VaultClient should only be used in the context of the Controller.

func NewVaultClient

func NewVaultClient(ctx context.Context, vaultConfig *vault.Config, cloudletNodeHandler CloudletNodeHandler, region string, dnsZones string, validDomains string) *VaultClient

func (*VaultClient) CloudletContext

func (s *VaultClient) CloudletContext(cloudlet *edgeproto.Cloudlet) *VaultClient

func (*VaultClient) CreateCloudletNode

func (s *VaultClient) CreateCloudletNode(ctx context.Context, node *edgeproto.CloudletNode) (string, error)

func (*VaultClient) CreateOrUpdateDNSRecord

func (s *VaultClient) CreateOrUpdateDNSRecord(ctx context.Context, name, rtype, content string, ttl int, proxy bool) error

func (*VaultClient) DeleteCloudletNode

func (s *VaultClient) DeleteCloudletNode(ctx context.Context, nodeKey *edgeproto.CloudletNodeKey) error

func (*VaultClient) DeleteDNSRecord

func (s *VaultClient) DeleteDNSRecord(ctx context.Context, recordID string) error

func (*VaultClient) GetAppSecretVars

func (s *VaultClient) GetAppSecretVars(ctx context.Context, appKey *edgeproto.AppKey) (map[string]string, error)

func (*VaultClient) GetChefAuthKey

func (s *VaultClient) GetChefAuthKey(ctx context.Context) (*chefauth.ChefAuthKey, error)

GetChefAuthKey is deprecated, it is kept for backwards compatibility with old crms

func (*VaultClient) GetCloudletAccessVars

func (s *VaultClient) GetCloudletAccessVars(ctx context.Context) (map[string]string, error)

func (*VaultClient) GetDNSRecords

func (s *VaultClient) GetDNSRecords(ctx context.Context, fqdn string) ([]dnsapi.Record, error)

func (*VaultClient) GetFederationAPIKey

func (s *VaultClient) GetFederationAPIKey(ctx context.Context, fedKey *federationmgmt.FedKey) (*federationmgmt.ApiKey, error)

func (*VaultClient) GetKafkaCreds

func (s *VaultClient) GetKafkaCreds(ctx context.Context) (*node.KafkaCreds, error)

func (*VaultClient) GetOldSSHKey

func (s *VaultClient) GetOldSSHKey(ctx context.Context) (*vault.MEXKey, error)

func (*VaultClient) GetPublicCert

func (s *VaultClient) GetPublicCert(ctx context.Context, commonName string) (*vault.PublicCert, error)

func (*VaultClient) GetRegistryAuth

func (s *VaultClient) GetRegistryAuth(ctx context.Context, hostOrURL string) (*cloudcommon.RegistryAuth, error)

func (*VaultClient) GetRegistryImageAuth

func (s *VaultClient) GetRegistryImageAuth(ctx context.Context, imgUrl string) (*cloudcommon.RegistryAuth, error)

func (*VaultClient) GetSSHPublicKey

func (s *VaultClient) GetSSHPublicKey(ctx context.Context) (string, error)

func (*VaultClient) GetSessionTokens

func (s *VaultClient) GetSessionTokens(ctx context.Context, secretName string) (string, error)

func (*VaultClient) SignSSHKey

func (s *VaultClient) SignSSHKey(ctx context.Context, publicKey string) (string, error)

Jump to

Keyboard shortcuts

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