Documentation ¶
Overview ¶
Copyright 2024 BeyondTrust. All rights reserved. Package secrets implements Get secret logic for Secrets Safe (cred, text, file)
Index ¶
- type SecretObj
- func (secretObj *SecretObj) CreateSecretFlow(folderTarget string, secretDetails interface{}) (entities.CreateSecretResponse, error)
- func (secretObj *SecretObj) GetSecret(secretPath string, separator string) (string, error)
- func (secretObj *SecretObj) GetSecretFlow(secretsToRetrieve []string, separator string) (map[string]string, error)
- func (secretObj *SecretObj) GetSecrets(secretPaths []string, separator string) (map[string]string, error)
- func (secretObj *SecretObj) SecretCreateSecret(folderId string, secretDetails interface{}) (entities.CreateSecretResponse, error)
- func (secretObj *SecretObj) SecretGetFileSecret(secretId string, endpointPath string) (string, error)
- func (secretObj *SecretObj) SecretGetFolders(endpointPath string) ([]entities.FolderResponse, error)
- func (secretObj *SecretObj) SecretGetSecretByPath(secretPath string, secretTitle string, separator string, endpointPath string) (entities.Secret, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SecretObj ¶
type SecretObj struct {
// contains filtered or unexported fields
}
SecretObj responsible for session requests.
func NewSecretObj ¶
func NewSecretObj(authentication authentication.AuthenticationObj, logger logging.Logger, maxFileSecretSizeBytes int) (*SecretObj, error)
NewSecretObj creates secret obj
func (*SecretObj) CreateSecretFlow ¶
func (secretObj *SecretObj) CreateSecretFlow(folderTarget string, secretDetails interface{}) (entities.CreateSecretResponse, error)
CreateSecretCredentialFlow is responsible for creating secrets in Password Safe.
func (*SecretObj) GetSecretFlow ¶
func (secretObj *SecretObj) GetSecretFlow(secretsToRetrieve []string, separator string) (map[string]string, error)
GetSecretFlow is responsible for creating a dictionary of secrets safe secret paths and secret key-value pairs.
func (*SecretObj) GetSecrets ¶
func (secretObj *SecretObj) GetSecrets(secretPaths []string, separator string) (map[string]string, error)
GetSecrets returns secret value for a path and title list.
func (*SecretObj) SecretCreateSecret ¶
func (secretObj *SecretObj) SecretCreateSecret(folderId string, secretDetails interface{}) (entities.CreateSecretResponse, error)
SecretCreateSecret calls Secret Safe API Requests enpoint to create secrets in Password Safe.
func (*SecretObj) SecretGetFileSecret ¶
func (secretObj *SecretObj) SecretGetFileSecret(secretId string, endpointPath string) (string, error)
SecretGetFileSecret call secrets-safe/secrets/<secret_id>/file/download enpoint and returns file secret value.
func (*SecretObj) SecretGetFolders ¶
func (secretObj *SecretObj) SecretGetFolders(endpointPath string) ([]entities.FolderResponse, error)
SecretGetFolders call secrets-safe/folders/ enpoint and returns folder list