Documentation ¶
Overview ¶
Package utils implements various functions about the system environment.
Index ¶
- Constants
- Variables
- func GetCClientStatus() (string, error)
- func GetCClientVersion() (string, error)
- func GetDMCEndPoint() string
- func GetEnrolledTenant() (string, error)
- func IsCClientInstalled() (bool, error)
- func RunByPrivilegedUser() (bool, error)
- func VerifyCClientVersionReq(req string) (bool, error)
Constants ¶
const ( AgentStatusUnknown = "unknown" AgentStatusConnected = "connected" AgentStatusDisconnected = "disconnected" AgentStatusStopped = "stopped" AgentStatusStarting = "starting" AgentStatusDisabled = "disabled" )
Centrify Client Status
const ExitCodeNotEnrolled = 10
ExitCodeNotEnrolled means system is not enrolled
Variables ¶
var ( ErrCannotGetToken = errors.New("Cannot obtain token") ErrCannotSetupConnection = errors.New("Cannot setup connection to Centrify Client") ErrCannotDecryptToken = errors.New("Cannot decrypt token") ErrClientNotInstalled = errors.New("Centrify client Not installed") ErrCommunicationError = errors.New("Communication error with Centrify Client") ErrExpiredPublicKey = errors.New("Expired public key") ErrGettingPublicKey = errors.New("Error in getting Centrify Client's public key") ErrGettingResourceOwner = errors.New("Cannot get resource owner credential") ErrInvalidCredential = errors.New("Invalid username or password") ErrNotEnrolled = errors.New("Not enrolled") )
Errors
Functions ¶
func GetCClientStatus ¶
GetCClientStatus returns the status of Centrify Client
func GetCClientVersion ¶
GetCClientVersion returns the version of Centrify Client
func GetDMCEndPoint ¶
func GetDMCEndPoint() string
GetDMCEndPoint returns the endpoint used by applications to request machine credential
func GetEnrolledTenant ¶
GetEnrolledTenant returns the tenant that the system is enrolled to. If the system is not enrolled to any tenant, ErrNotEnrolled is returned as error.
func IsCClientInstalled ¶
IsCClientInstalled returns a bool value that shows whether the Centrify Client is installed on the system by checking for the existence of cagent.
func RunByPrivilegedUser ¶
RunByPrivilegedUser returns true if the program is run by privileged user (root in Linux)
func VerifyCClientVersionReq ¶
VerifyCClientVersionReq verifies if the version of Centrify Client meets the version requirement
Types ¶
This section is empty.