secrets

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 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) 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) 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) 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