cps

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LetsEncryptRA          RegistrationAuthority = "letsencrypt"
	SymantecRA             RegistrationAuthority = "symantec"
	ThirdPartyRA           RegistrationAuthority = "third-party"
	SanCertificate         CertificateType       = "san"
	SymantecCertificate    CertificateType       = "single"
	WildCardCertificate    CertificateType       = "wildcard"
	WildCardSanCertificate CertificateType       = "wildcard-san"
	ThirdPartyCertificate  CertificateType       = "third-party"
	AK2018Q3               AkamaiCipher          = "ak-akamai-2018q3"
	AK2017Q3               AkamaiCipher          = "ak-akamai-default-2017q3"
	AK2016Q3               AkamaiCipher          = "ak-akamai-default-2016q3"
	AKPCIDSS               AkamaiCipher          = "ak-pci-dss-3.2"
	AKDefault              AkamaiCipher          = "ak-akamai-default"
	AK2016Q1               AkamaiCipher          = "ak-akamai-default-2016q1"
	AKPFSSupported         AkamaiCipher          = "ak-akamai-pfs-supported"
	AKPFS                  AkamaiCipher          = "ak-akamai-pfs"
	AKRecommended          AkamaiCipher          = "ak-akamai-recommended"
	AKSoftErrors           AkamaiCipher          = "ak-soft-errors"
	AKSoftErrorsWithExport AkamaiCipher          = "ak-soft-errors-with-export"
	AKTLS                  AkamaiCipher          = "ak-akamai-tls-1.2"
	AKPCIDSSDefault        AkamaiCipher          = "ak-pci-dss"
	AKPCIDSS3              AkamaiCipher          = "ak-pci-dss-3.1"
	StandardWorldWide      NetworkType           = "standard-worldwide"
	WorldWideRussia        NetworkType           = "worldwide-russia"
	WorldWide              NetworkType           = "worldwide"
	StandardTLS            TLSType               = "standard-tls"
	EnhancedTLS            TLSType               = "enhanced-tls"
	SHA1                   SHA                   = "SHA-1"
	SHA256                 SHA                   = "SHA-256"
	DomainValidation       ValidationType        = "dv"
	OrganizationValidation ValidationType        = "ov"
	ExtendedValidation     ValidationType        = "ev"
	ThirdPartyValidation   ValidationType        = "third-party"
)

Variables

View Source
var (
	// Config contains the Akamai OPEN Edgegrid API credentials
	// for automatic signing of requests
	Config edgegrid.Config
)

Functions

func Init

func Init(config edgegrid.Config)

Init sets the CPS edgegrid Config

Types

type AkamaiCipher

type AkamaiCipher string

type CSR

type CSR struct {
	CommonName         string    `json:"cn"`
	AlternativeNames   *[]string `json:"sans"`
	City               *string   `json:"l"`
	State              *string   `json:"st"`
	CountryCode        *string   `json:"c"`
	Organization       *string   `json:"o"`
	OrganizationalUnit *string   `json:"ou"`
}

type CertificateType

type CertificateType string

type Contact

type Contact struct {
	FirstName      *string `json:"firstName"`
	LastName       *string `json:"lastName"`
	Title          *string `json:"title"`
	Organization   *string `json:"organizationName"`
	Email          *string `json:"email"`
	Phone          *string `json:"phone"`
	AddressLineOne *string `json:"addressLineOne"`
	AddressLineTwo *string `json:"addressLineTwo"`
	City           *string `json:"city"`
	Region         *string `json:"region"`
	PostalCode     *string `json:"postalCode"`
	Country        *string `json:"country"`
}

type CreateEnrollmentQueryParams

type CreateEnrollmentQueryParams struct {
	ContractID      string
	DeployNotAfter  *string
	DeployNotBefore *string
}

type CreateEnrollmentResponse

type CreateEnrollmentResponse struct {
	Location string   `json:"enrollment"`
	Changes  []string `json:"changes"`
}

func CreateEnrollment

func CreateEnrollment(data []byte, params CreateEnrollmentQueryParams) (*CreateEnrollmentResponse, error)

CreateEnrollment wraps enrollment.Create to accept json

type DomainNameSettings

type DomainNameSettings struct {
	CloneDomainNames bool      `json:"cloneDnsNames"`
	DomainNames      *[]string `json:"dnsNames"`
}

type Enrollment

type Enrollment struct {
	client.Resource
	AdminContact              *Contact              `json:"adminContact"`
	CertificateChainType      *string               `json:"certificateChainType"`
	CertificateType           CertificateType       `json:"certificateType"`
	CertificateSigningRequest *CSR                  `json:"csr"`
	ChangeManagement          bool                  `json:"changeManagement"`
	EnableMultiStacked        bool                  `json:"enableMultiStackedCertificates"`
	Location                  *string               `json:"location"`
	MaxAllowedSans            *int                  `json:"maxAllowedSanNames"`
	MaxAllowedWildcardSans    *int                  `json:"maxAllowedWildcardSanNames"`
	NetworkConfiguration      *NetworkConfiguration `json:"networkConfiguration"`
	Organization              *Organization         `json:"org"`
	PendingChanges            *[]string             `json:"pendingChanges"`
	RegistrationAuthority     RegistrationAuthority `json:"ra"`
	SignatureAuthority        *SHA                  `json:"signatureAlgorithm"`
	TechContact               *Contact              `json:"techContact"`
	ThirdParty                *ThirdParty           `json:"thirdParty"`
	ValidationType            ValidationType        `json:"validationType"`
}

Enrollments represents an enrollment

API Docs: https://developer.akamai.com/api/core_features/certificate_provisioning_system/v2.html#enrollments

func GetEnrollment

func GetEnrollment(location string) (*Enrollment, error)

Get an enrollment by location

API Docs: https://developer.akamai.com/api/core_features/certificate_provisioning_system/v2.html#getasingleenrollment Endpoint: POST /cps/v2/enrollments/{enrollmentId}

func ListEnrollments

func ListEnrollments(params ListEnrollmentsQueryParams) ([]Enrollment, error)

ListEnrollments lists the names of each enrollment for the given contractID.

API Docs: https://developer.akamai.com/api/core_features/certificate_provisioning_system/v2.html#getenrollments Endpoint: GET /cps/v2/enrollments{contractId}

func (*Enrollment) Create

Create an Enrollment on CPS

API Docs: https://developer.akamai.com/api/core_features/certificate_provisioning_system/v2.html#5aaa335c Endpoint: POST /cps/v2/enrollments{?contractId,deploy-not-after,deploy-not-before}

func (*Enrollment) Exists

func (enrollment *Enrollment) Exists(enrollments []Enrollment) bool

type ListEnrollmentsQueryParams

type ListEnrollmentsQueryParams struct {
	ContractID string
}

type NetworkConfiguration

type NetworkConfiguration struct {
	DisallowedTLSVersions *[]string           `json:"disallowedTlsVersions"`
	DomainNameSettings    *DomainNameSettings `json:"dnsNameSettings"`
	Geography             string              `json:"geography"`
	MustHaveCiphers       AkamaiCipher        `json:"mustHaveCiphers"`
	// NetworkType           *NetworkType        `json:"networkType"`
	OCSPStapling     *OCSPSetting `json:"ocspStapling"`
	PreferredCiphers AkamaiCipher `json:"preferredCiphers"`
	QUICEnabled      bool         `json:"quicEnabled"`
	SecureNetwork    TLSType      `json:"secureNetwork"`
	// ServerNameIndication  *DomainNameSettings `json:"sni"`
	SNIOnly bool `json:"sniOnly"`
}

type NetworkType

type NetworkType string

type OCSPSetting

type OCSPSetting string

type Organization

type Organization struct {
	Name           *string `json:"name"`
	Phone          *string `json:"phone"`
	AddressLineOne *string `json:"addressLineOne"`
	AddressLineTwo *string `json:"addressLineTwo"`
	City           *string `json:"city"`
	Region         *string `json:"region"`
	PostalCode     *string `json:"postalCode"`
	Country        *string `json:"country"`
}

type RegistrationAuthority

type RegistrationAuthority string

type SHA

type SHA string

type TLSType

type TLSType string

type ThirdParty

type ThirdParty struct {
	ExcludeSANS bool `json:"excludeSans"`
}

type ValidationType

type ValidationType string

Jump to

Keyboard shortcuts

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