utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package utils implements various functions about the system environment.

Index

Constants

View Source
const (
	AgentStatusUnknown      = "unknown"
	AgentStatusConnected    = "connected"
	AgentStatusDisconnected = "disconnected"
	AgentStatusStopped      = "stopped"
	AgentStatusStarting     = "starting"
	AgentStatusDisabled     = "disabled"
)

Centrify Client Status

View Source
const ExitCodeNotEnrolled = 10

ExitCodeNotEnrolled means system is not enrolled

Variables

View Source
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

func GetCClientStatus() (string, error)

GetCClientStatus returns the status of Centrify Client

func GetCClientVersion

func GetCClientVersion() (string, error)

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

func GetEnrolledTenant() (string, error)

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

func IsCClientInstalled() (bool, error)

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

func RunByPrivilegedUser() (bool, error)

RunByPrivilegedUser returns true if the program is run by privileged user (root in Linux)

func VerifyCClientVersionReq

func VerifyCClientVersionReq(req string) (bool, error)

VerifyCClientVersionReq verifies if the version of Centrify Client meets the version requirement

Types

This section is empty.

Jump to

Keyboard shortcuts

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