appviewx

package
v0.0.0-...-9d9a17d Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppViewXCA  = "AppViewX"
	MicrosoftCA = "Microsoft Enterprise"
	EJBCA       = "Ejbca"
)

Variables

Functions

func CSRBytesToPEMString

func CSRBytesToPEMString(ctx context.Context, input []byte) (output string)

func GetFirstCertificate

func GetFirstCertificate(ctx context.Context, certificateContents string) (certificate string)

Types

type ApViewXSigner

type ApViewXSigner struct {
	Log logr.Logger
}

func (*ApViewXSigner) CreateCertificate

func (signer *ApViewXSigner) CreateCertificate(ctx context.Context, appviewxEnv *AppViewXEnv, sessionID string, csrContent *string, isSync bool,
	externalRequestID string, isDownload bool) (resourceID, certificateContents *string, statusCode int, err error)

func (*ApViewXSigner) DownloadCertificate

func (signer *ApViewXSigner) DownloadCertificate(ctx context.Context, appviewxEnv *AppViewXEnv, sessionID, resourceID string, retryTimes int) (certificateContents string, err error)

func (*ApViewXSigner) LoginAndGetSessionID

func (signer *ApViewXSigner) LoginAndGetSessionID(ctx context.Context, appviewxEnv *AppViewXEnv) (output string, err error)

func (*ApViewXSigner) MakeCallToAppViewXAndGetCertificate

func (signer *ApViewXSigner) MakeCallToAppViewXAndGetCertificate(ctx context.Context, csr *string, serverOpts *common.ServerOpts,
	isSync bool, externalRequestID string, isDownload bool) (cert []byte, resourceID *string, err error)

MakeCallToAppViewXAndGetCertificate calls appviewx and handles sync or async mode of certificate enrollment

func (*ApViewXSigner) MakeGetCallAndReturnResponse

func (signer *ApViewXSigner) MakeGetCallAndReturnResponse(ctx context.Context, url string, additionalRequestHeaders map[string]string) (output []byte, err error)

func (*ApViewXSigner) MakePostCallAndReturnResponse

func (signer *ApViewXSigner) MakePostCallAndReturnResponse(ctx context.Context, url string, payload interface{}, additionalRequestHeaders map[string]string) (output []byte, statusCode int, err error)

type AppViewXEnv

type AppViewXEnv struct {
	AppViewXIsHTTPS                bool                   `json:"appviewxIsHTTPS"`
	AppViewXHost                   string                 `json:"appviewxHost"`
	AppViewXPort                   int                    `json:"appviewxPort"`
	AppViewXUserName               string                 `json:"appviewxUserName"`
	AppViewXPassword               string                 `json:"appviewxPassword"`
	CertificateAuthority           string                 `json:"certificateAuthority"`
	CaSettingName                  string                 `json:"caSettingName"`
	Name                           string                 `json:"name,omitempty"`
	ValidityInDays                 int                    `json:"validityInDays"`
	CertificateGroupName           string                 `json:"certificateGroupName"`
	Category                       string                 `json:"category"`
	VendorSpecificDetails          map[string]interface{} `json:"vendorSpecificDetails"`
	SessionID                      string
	SessionLastGenerationTime      *time.Time
	IsAppViewXCredentialsFromVault bool `json:"isAppViewXCredentialsFromVault"`
}

type CaConnectorInfo

type CaConnectorInfo struct {
	CertificateAuthority   string                 `json:"certificateAuthority"`
	CaSettingName          string                 `json:"caSettingName"`
	Name                   string                 `json:"name,omitempty"`
	GenericFields          interface{}            `json:"genericFields"`
	VendorSpecificDetails  map[string]interface{} `json:"vendorSpecificDetails"`
	CustomAttributes       interface{}            `json:"customAttributes"`
	CertAttributes         interface{}            `json:"certAttributes"`
	ValidityInDays         int                    `json:"validityInDays"`
	CertificateProfileName string                 `json:"certificateProfileName"`
	CsrParameters          interface{}            `json:"csrParameters"`
}

type CertificateFormat

type CertificateFormat struct {
	Format   string `json:"format"`
	Password string `json:"password"`
}

type CertificateGroup

type CertificateGroup struct {
	Name string `json:"name"`
}

type CreateCertificatePayload

type CreateCertificatePayload struct {
	WorkFlowType      string             `json:"workflowType"`
	UniqueCertificate bool               `json:"uniqueCertificate"`
	CaConnectorInfo   CaConnectorInfo    `json:"caConnectorInfo"`
	CertificateGroup  CertificateGroup   `json:"certificateGroup"`
	UploadCSRDetails  UploadCSRDetails   `json:"uploadCsrDetails"`
	CertificateFormat *CertificateFormat `json:"certificateFormat"`
}

type CreateCertificateResponse

type CreateCertificateResponse struct {
	Response      *CreateCertificateResponseInternal `json:"response"`
	Message       string                             `json:"message"`
	AppStatusCode interface{}                        `json:"appStatusCode"`
	Tags          interface{}                        `json:"tags"`
	Headers       interface{}                        `json:"headers"`
}

type CreateCertificateResponseInternal

type CreateCertificateResponseInternal struct {
	ResourceID         *string `json:"resourceId"`
	RequestId          *string `json:"requestId"`
	CertificateContent *string `json:"certificateContent"`
}

type DownloadCertificateResponse

type DownloadCertificateResponse struct {
	Response      DownloadCertificateResponseInternal `json:"response"`
	Message       string                              `json:"message"`
	AppStatusCode interface{}                         `json:"appStatusCode"`
	Tags          interface{}                         `json:"tags"`
	Headers       interface{}                         `json:"headers"`
}

type DownloadCertificateResponseInternal

type DownloadCertificateResponseInternal struct {
	CertificateContents string `json:"certificateContents"`
	PrivateKeyContent   string `json:"privateKeyContent"`
	CommonName          string `json:"commonName"`
	SerialNumber        string `json:"serialNumber"`
	Format              string `json:"format"`
	Success             bool   `json:"success"`
}

type SessionPayload

type SessionPayload struct{}

type SessionResponse

type SessionResponse struct {
	Response      SessionResponseInternal `json:"response"`
	Message       interface{}             `json:"message"`
	AppStatusCode interface{}             `json:"appStatusCode"`
	Tags          interface{}             `json:"tags"`
	Headers       interface{}             `json:"headers"`
}

type SessionResponseInternal

type SessionResponseInternal struct {
	Status                     string      `json:"status"`
	AppStatusCode              interface{} `json:"appStatusCode"`
	StatusDescription          interface{} `json:"statusDescription"`
	SessionId                  string      `json:"sessionId"`
	AvailableLoginAttemptCount string      `json:"availableLoginAttemptCount"`
}

type UploadCSRDetails

type UploadCSRDetails struct {
	CSRContent *string `json:"csrContent"`
	Category   string  `json:"category"`
}

Jump to

Keyboard shortcuts

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