conjur

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: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConjurRc

func CreateConjurRc(account string, url string, selfSignedCert bool, authnLDAP string) error

CreateConjurRc creates a ~/.conjurrc file

func CreateNetRc

func CreateNetRc(username string, password string) error

CreateNetRc create a conjur netrc file

func EnableAuthenticator

func EnableAuthenticator(serviceID string) error

EnableAuthenticator enable a specific authenticator in conjur. e.g. serviceID: authn-iam/prod or authn-k8s/k8s-cluster-1

func GetAccountFromConjurRc

func GetAccountFromConjurRc(conjurrcFileName string) string

GetAccountFromConjurRc retrieve conjur account from the ~/.conjurrc file

func GetCertFromConjurRc

func GetCertFromConjurRc(conjurrcFileName string) string

GetCertFromConjurRc retrieve conjur certificate from the ~/.conjurrc file, is empty if no cert will be used

func GetConjurClient

func GetConjurClient() (*conjurapi.Client, *authn.LoginPair, error)

GetConjurClient creates a Conjur API client and login pair from environment variables, an authenticator, or .netrc & .conjurrc files

func GetConjurPemPath

func GetConjurPemPath(homeDir string, account string) string

GetConjurPemPath returns path to the ~/conjur-<account>.pem file os-agnostic

func GetConjurRcPath

func GetConjurRcPath(homeDir string) string

GetConjurRcPath returns path to the ~/.conjurrc file os-agnostic

func GetHomeDirectory

func GetHomeDirectory() (string, error)

GetHomeDirectory gets the proper user home directory regardless of GOOS

func GetNetRcPath

func GetNetRcPath(homeDir string) string

GetNetRcPath returns path to the ~/.conjurrc file os-agnostic

func GetURLFromConjurRc

func GetURLFromConjurRc(conjurrcFileName string) string

GetURLFromConjurRc retrieve conjur url from the ~/.conjurrc file

func Info

func Info() (map[string]interface{}, error)

Info get info of the conjur instance

func Login

func Login(authnURL string, account string, username string, password []byte, certPath string) ([]byte, error)

Login to conjur and return an api key in []byte format

func Whoami

func Whoami() (map[string]interface{}, error)

Whoami gets current user info logged in to Conjur

Types

This section is empty.

Directories

Path Synopsis
iam

Jump to

Keyboard shortcuts

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