credentialinfomanager

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

View Source
const KEY_COLUMN_NAME = "credential_name"

====================================================================

View Source
const PROVIDER_NAME_COLUMN = "provider_name"

Variables

View Source
var SPIDER_KEY = []byte("cloud-barista-cb-spider-cloud-ba") // 32 bytes

####################################################################### @todo get from Env file. by powerkim, 2020.06.01.

Functions

func Decrypt added in v0.7.6

func Decrypt(spider_key, contents []byte) (string, error)

decryption with spider key

func Encrypt added in v0.7.6

func Encrypt(spider_key, contents []byte) (string, error)

encription with spider key

func UnRegisterCredential

func UnRegisterCredential(credentialName string) (bool, error)

Types

type CredentialInfo

type CredentialInfo struct {
	CredentialName   string           `json:"CredentialName" gorm:"primaryKey" validate:"required" example:"credential01"` // The name of the credential, used as a unique identifier.
	ProviderName     string           `json:"ProviderName" validate:"required" example:"AWS"`                              // The name of the cloud provider (e.g., AWS, Azure, GCP).
	KeyValueInfoList infostore.KVList `json:"KeyValueInfoList" gorm:"type:blob" validate:"required"`                       // Key-value pairs for credential authentication.
}

CredentialInfo represents the information of a cloud credential. @Description Information about a specific cloud credential used for authentication.

func GetCredential

func GetCredential(credentialName string) (*CredentialInfo, error)

1. check params 2. get CredentialInfo from info-store

func GetCredentialDecrypt added in v0.2.1

func GetCredentialDecrypt(credentialName string) (*CredentialInfo, error)

1. check params 2. get CredentialInfo from info-store 3. decrypt CrednetialInfo

func ListCredential

func ListCredential() ([]*CredentialInfo, error)

func ListCredentialByProvider added in v0.9.1

func ListCredentialByProvider(providerName string) ([]*CredentialInfo, error)

func RegisterCredential

func RegisterCredential(credentialName string, providerName string, keyValueInfoList []icdrs.KeyValue) (*CredentialInfo, error)

func RegisterCredentialInfo

func RegisterCredentialInfo(crdInfo CredentialInfo) (*CredentialInfo, error)

1. check params 2. insert them into info-store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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