managed_accounts

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2024 BeyondTrust. All rights reserved. Package managed_accounts implements Get managed account logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ManagedAccountstObj

type ManagedAccountstObj struct {
	// contains filtered or unexported fields
}

ManagedAccountstObj responsible for session requests.

func NewManagedAccountObj

func NewManagedAccountObj(authentication authentication.AuthenticationObj, logger logging.Logger) (*ManagedAccountstObj, error)

NewManagedAccountObj creates managed account obj

func (*ManagedAccountstObj) CredentialByRequestId

func (managedAccounObj *ManagedAccountstObj) CredentialByRequestId(requestId string, url string) (string, error)

CredentialByRequestId calls Secret Safe API Credentials/<request_id> enpoint and returns secret value by request Id.

func (*ManagedAccountstObj) GetSecret

func (managedAccounObj *ManagedAccountstObj) GetSecret(secretPath string, separator string) (string, error)

GetSecret returns secret value for a specific System Name and Account Name.

func (*ManagedAccountstObj) GetSecrets

func (managedAccounObj *ManagedAccountstObj) GetSecrets(secretPaths []string, separator string) (map[string]string, error)

GetSecrets is responsible for getting a list of managed account secret values based on the list of systems and account names.

func (*ManagedAccountstObj) ManageAccountFlow

func (managedAccounObj *ManagedAccountstObj) ManageAccountFlow(secretsToRetrieve []string, separator string) (map[string]string, error)

ManageAccountFlow is responsible for creating a dictionary of managed account system/name and secret key-value pairs.

func (*ManagedAccountstObj) ManagedAccountCreateRequest

func (managedAccounObj *ManagedAccountstObj) ManagedAccountCreateRequest(systemName int, accountName int, url string) (string, error)

ManagedAccountCreateRequest calls Secret Safe API Requests enpoint and returns a request Id as string.

func (*ManagedAccountstObj) ManagedAccountGet

func (managedAccounObj *ManagedAccountstObj) ManagedAccountGet(systemName string, accountName string, url string) (entities.ManagedAccount, error)

ManagedAccountGet is responsible for retrieving a managed account secret based on the system and name.

func (*ManagedAccountstObj) ManagedAccountRequestCheckIn

func (managedAccounObj *ManagedAccountstObj) ManagedAccountRequestCheckIn(requestId string, url string) (string, error)

ManagedAccountRequestCheckIn calls Secret Safe API "Requests/<request_id>/checkin enpoint.

Jump to

Keyboard shortcuts

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