secrets

package
v0.10.0-beta Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 12 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) CreateSecretFlow

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) 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

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