api

package
v1.0.2-release Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRolePermissions

func GetRolePermissions(role string) (map[string]string, error)

GetRolePermissions assigns pre-defined safe permissions for new safe member

Types

type Client

type Client struct {
	BaseURL      string
	AuthType     string
	TenantID     string
	InsecureTLS  bool
	SessionToken string
	Logger       logger.Logger
}

Client contains the data necessary for requests to pass successfully

func GetConfig

func GetConfig() (Client, error)

GetConfig file from local filesystem and read

func GetConfigWithLogger

func GetConfigWithLogger(logger logger.Logger) (Client, error)

GetConfigWithLogger is the same as GetConfig except it also sets the logger

func (Client) AddAccount

func (c Client) AddAccount(account requests.AddAccount) (*responses.GetAccount, error)

AddAccount to cyberark

func (Client) AddApplication

func (c Client) AddApplication(application requests.AddApplication) error

AddApplication add an applications to PAS

func (Client) AddApplicationAuthenticationMethod

func (c Client) AddApplicationAuthenticationMethod(appID string, authenticationMethod requests.AddApplicationAuthentication) error

AddApplicationAuthenticationMethod add authentication method to an application

func (Client) AddSafe

func (c Client) AddSafe(body requests.AddSafe) error

AddSafe to Secure Digital Vault via PAS REST API

func (Client) AddSafeMember

func (c Client) AddSafeMember(safeName string, addMember requests.AddSafeMember) error

AddSafeMember Add a user or application as a member to a safe with specific permissions

func (Client) AddUser

func (c Client) AddUser(user requests.AddUser) (responses.AddUser, error)

AddUser to PAS

func (Client) ChangeAccountCredentials

func (c Client) ChangeAccountCredentials(accountID string, changeEntireGroup bool, changeScope string, newPassword string) error

ChangeAccountCredentials marks an account for immediate change

func (Client) CheckIn

func (c Client) CheckIn(accountID string) error

CheckIn checks in an account that is checked out by the user

func (Client) DeleteAccount

func (c Client) DeleteAccount(accountID string) error

DeleteAccount from cyberark

func (Client) DeleteApplication

func (c Client) DeleteApplication(appID string) error

DeleteApplication delete an applications to PAS

func (Client) DeleteApplicationAuthenticationMethod

func (c Client) DeleteApplicationAuthenticationMethod(appID string, authnMethodID string) error

DeleteApplicationAuthenticationMethod delete an applications authentication method

func (Client) DeleteSafe

func (c Client) DeleteSafe(safeName string) error

DeleteSafe will remove the safeName given to the function via PAS REST API

func (Client) DeleteUser

func (c Client) DeleteUser(userID int) error

DeleteUser from PAS

func (Client) FilterSafes

func (c Client) FilterSafes(filter string, search string) ([]string, error)

FilterSafes will return a list of safes that match the given filter, commonly used to filter by safe member

func (Client) GetAccount

func (c Client) GetAccount(accountID string) (*responses.GetAccount, error)

GetAccount details for specific account

func (Client) GetAccountPassword

func (c Client) GetAccountPassword(accountID string, request requests.GetAccountPassword) (string, error)

GetAccountPassword This method enables users to retrieve the password or SSH key of an existing account that is identified by its Account ID. It enables users to specify a reason and ticket ID, if required

func (Client) GetAccountSSHKey

func (c Client) GetAccountSSHKey(accountID string, request requests.GetAccountPassword) (string, error)

GetAccountSSHKey This method enables users to retrieve the password or SSH key of an existing account that is identified by its Account ID. It enables users to specify a reason and ticket ID, if required

func (Client) GetJITAccess

func (c Client) GetJITAccess(accountID string) error

GetJITAccess from a specific account

func (*Client) GetLogger

func (c *Client) GetLogger() logger.Logger

GetLogger retrieve Client logger

func (Client) GetPlatform

func (c Client) GetPlatform(platformID string) (*responses.GetPlatform, error)

GetPlatform details for specific platform

func (*Client) IsValid

func (c *Client) IsValid() error

IsValid checks to make sure that the authentication method chosen is valid

func (Client) ListAccounts

func (c Client) ListAccounts(query *queries.ListAccounts) (*responses.ListAccount, error)

ListAccounts CyberArk user has access to

func (Client) ListApplicationAuthenticationMethods

func (c Client) ListApplicationAuthenticationMethods(appID string) (*responses.ListApplicationAuthenticationMethods, error)

ListApplicationAuthenticationMethods returns all auth methods for a specific Application Identity

func (Client) ListApplications

func (c Client) ListApplications(location string) (*responses.ListApplications, error)

ListApplications returns all Application Identities setup in PAS

func (Client) ListPlatforms

func (c Client) ListPlatforms(query *queries.ListPlatforms) (*responses.ListPlatforms, error)

ListPlatforms available in CyberArk

func (Client) ListSafeMembers

func (c Client) ListSafeMembers(safeName string, query *queries.ListSafeMembers) (*responses.ListSafeMembers, error)

ListSafeMembers List all members of a safe

func (Client) ListSafes

func (c Client) ListSafes() (*responses.ListSafes, error)

ListSafes CyberArk user has access to

func (Client) ListUsers

func (c Client) ListUsers(query *queries.ListUsers) (responses.ListUsers, error)

ListUsers returns a list of all existing users in the Vault except for the Master and the Batch built-in users.

func (Client) Logoff

func (c Client) Logoff() error

Logoff the PAS REST API Web Service

func (*Client) Logon

func (c *Client) Logon(req requests.Logon) error

Logon to PAS REST API Web Service Because we're using concurrentSession capability, this is only supported on PAS REST API v11.3 and above

func (Client) ReconileAccountCredentials

func (c Client) ReconileAccountCredentials(accountID string) error

ReconileAccountCredentials marks an account for reconciliation

func (*Client) RemoveConfig

func (c *Client) RemoveConfig() error

RemoveConfig file on the local filesystem

func (Client) RemoveSafeMember

func (c Client) RemoveSafeMember(safeName string, member string) error

RemoveSafeMember Remove a member from a specific safe

func (Client) RevokeJITAccess

func (c Client) RevokeJITAccess(accountID string) error

RevokeJITAccess from a specific account

func (Client) ServerVerify

func (c Client) ServerVerify() (*responses.ServerVerify, error)

ServerVerify is an unauthenticated endpoint for testing Web Service availability

func (*Client) SetConfig

func (c *Client) SetConfig() error

SetConfig file on the local filesystem for use

func (Client) Unlock

func (c Client) Unlock(accountID string) error

Unlock removes a lock from an account

func (Client) UnsuspendUser

func (c Client) UnsuspendUser(userID int) error

UnsuspendUser activates a suspended user. It does not activate an inactive user.

func (Client) UpdateSafe

func (c Client) UpdateSafe(targetSafeName string, body requests.UpdateSafe) (*responses.UpdateSafe, error)

UpdateSafe will update the safe's properties that are given for modification

func (Client) VerifyAccountCredentials

func (c Client) VerifyAccountCredentials(accountID string) error

VerifyAccountCredentials marks an account for verification

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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