baseca

package
v0.0.3-beta Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Env = Environment{
	Local:         "Local",
	Sandbox:       "Sandbox",
	Development:   "Development",
	Staging:       "Staging",
	PreProduction: "PreProduction",
	Production:    "Production",
}

Functions

func GenerateCSR

func GenerateCSR(csr CertificateRequest) (*types.SigningRequest, error)

func LoadDefaultConfiguration

func LoadDefaultConfiguration(configuration Configuration, attestation string, authentication Authentication) (*client, error)

Types

type Authentication

type Authentication struct {
	ClientId    string
	ClientToken string
}

type CertificateClient

type CertificateClient interface {
	SignCSR(ctx context.Context, in *apiv1.CertificateSigningRequest, opts ...grpc.CallOption) (*apiv1.SignedCertificate, error)
	OperationsSignCSR(ctx context.Context, in *apiv1.OperationsSignRequest, opts ...grpc.CallOption) (*apiv1.SignedCertificate, error)
	QueryCertificateMetadata(ctx context.Context, in *apiv1.QueryCertificateMetadataRequest, opts ...grpc.CallOption) (*apiv1.CertificatesParameter, error)
}

type CertificateRequest

type CertificateRequest struct {
	CommonName            string
	SubjectAlternateNames []string
	DistinguishedName     DistinguishedName
	SigningAlgorithm      x509.SignatureAlgorithm
	PublicKeyAlgorithm    x509.PublicKeyAlgorithm
	KeySize               int
	Output                Output
}

type Configuration

type Configuration struct {
	URL         string
	Environment string
}

type DistinguishedName

type DistinguishedName struct {
	Country            []string
	Province           []string
	Locality           []string
	Organization       []string
	OrganizationalUnit []string
}

type Environment

type Environment struct {
	Local         string
	Sandbox       string
	Development   string
	Staging       string
	PreProduction string
	Production    string
}

type Output

type Output struct {
	CertificateSigningRequest    string
	Certificate                  string
	IntermediateCertificateChain string
	RootCertificateChain         string
	PrivateKey                   string
}

type Provider

type Provider struct {
	Local string
	AWS   string
}
var Attestation Provider = Provider{
	Local: "NONE",
	AWS:   "AWS",
}

type ServiceClient

type ServiceClient interface {
	ProvisionServiceAccount(ctx context.Context, in *apiv1.ProvisionServiceAccountRequest, opts ...grpc.CallOption) (*apiv1.ProvisionServiceAccountResponse, error)
	GetServiceAccountByMetadata(ctx context.Context, in *apiv1.GetServiceAccountMetadataRequest, opts ...grpc.CallOption) (*apiv1.ServiceAccounts, error)
	DeleteProvisionedServiceAccount(ctx context.Context, in *apiv1.AccountId, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

Jump to

Keyboard shortcuts

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