secrets

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 13 Imported by: 3

Documentation

Overview

Copyright 2024 BeyondTrust. All rights reserved. Package secrets implements Get secret logic for Secrets Safe (cred, text, file)

Index

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) CreateFolderFlow added in v0.11.0

func (secretObj *SecretObj) CreateFolderFlow(folderTarget string, folderDetails entities.FolderDetails) (entities.CreateFolderResponse, error)

CreateFolderFlow is responsible for creating folder in Password Safe.

func (*SecretObj) CreateSecretFlow added in v0.10.0

func (secretObj *SecretObj) CreateSecretFlow(folderTarget string, secretDetails interface{}) (entities.CreateSecretResponse, error)

CreateSecretCredentialFlow is responsible for creating secrets in Password Safe.

func (*SecretObj) GetSecret

func (secretObj *SecretObj) GetSecret(secretPath string, separator string) (string, error)

GetSecret returns secret value for a specific path and title.

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) SecretCreateFolder added in v0.11.0

func (secretObj *SecretObj) SecretCreateFolder(folderDetails entities.FolderDetails) (entities.CreateFolderResponse, error)

SecretCreateFolder calls Secret Safe API Requests enpoint to create folders in Password Safe.

func (*SecretObj) SecretCreateSecret added in v0.10.0

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 added in v0.10.0

func (secretObj *SecretObj) SecretGetFolders(endpointPath string) ([]entities.FolderResponse, error)

SecretGetFolders call secrets-safe/folders/ enpoint and returns folder list

func (*SecretObj) SecretGetSecretByPath

func (secretObj *SecretObj) SecretGetSecretByPath(secretPath string, secretTitle string, separator string, endpointPath string) (entities.Secret, error)

SecretGetSecretByPath returns secret object for a specific path, title.

Jump to

Keyboard shortcuts

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