certificate.create¶
Create a new Certificate
Certificates are classified under following types and the necessary keywords to be passed for create_type attribute to create the respective type of certificate
Imported Certificate - CERTIFICATE_CREATE_IMPORTED
Certificate Signing Request - CERTIFICATE_CREATE_CSR
Imported Certificate Signing Request - CERTIFICATE_CREATE_IMPORTED_CSR
ACME Certificate - CERTIFICATE_CREATE_ACME
By default, created CSRs use RSA keys. If an Elliptic Curve Key is desired, it can be specified with the key_type attribute. If the ec_curve attribute is not specified for the Elliptic Curve Key, then default to using “SECP384R1” curve.
A type is selected by the Certificate Service based on create_type. The rest of the values in data are validated accordingly and finally a certificate is made based on the selected type.
cert_extensions can be specified to set X509v3 extensions.
No Additional Items
Tuple Validation
Parameter 1: certificate_create
certificate_create
Type: objectCertificateCreateArgs parameters.
No Additional PropertiesName
Type: stringCertificate name.
Must be at least 1
characters long
Must be at most 120
characters long
Create Type
Type: enum (of string)Type of certificate creation operation.
Must be one of:
- "CERTIFICATE_CREATE_IMPORTED"
- "CERTIFICATE_CREATE_CSR"
- "CERTIFICATE_CREATE_IMPORTED_CSR"
- "CERTIFICATE_CREATE_ACME"
Add To Trusted Store
Type: boolean Default: falseWhether to add this certificate to the trusted certificate store.
Certificate
Default: nullPEM-encoded certificate to import or null
.
Must be at least 1
characters long
Privatekey
Default: nullPEM-encoded private key to import or null
.
Must be at least 1
characters long
Csr
Default: nullPEM-encoded certificate signing request to import or null
.
Must be at least 1
characters long
Key Length
Default: nullRSA key length in bits or null
.
Must be one of:
- 2048
- 4096
Key Type
Type: enum (of string) Default: "RSA"Type of cryptographic key to generate.
Must be one of:
- "RSA"
- "EC"
Ec Curve
Type: enum (of string) Default: "SECP384R1"Elliptic curve to use for EC keys.
Must be one of:
- "SECP256R1"
- "SECP384R1"
- "SECP521R1"
- "ed25519"
Passphrase
Default: nullPassphrase to protect the private key or null
.
Must be at least 1
characters long
City
Default: nullCity or locality name for certificate subject or null
.
Must be at least 1
characters long
Common
Default: nullCommon name for certificate subject or null
.
Must be at least 1
characters long
Country
Default: nullCountry name for certificate subject or null
.
Must be at least 1
characters long
Email address for certificate subject or null
.
Organization
Default: nullOrganization name for certificate subject or null
.
Must be at least 1
characters long
Organizational Unit
Default: nullOrganizational unit for certificate subject or null
.
Must be at least 1
characters long
State
Default: nullState or province name for certificate subject or null
.
Must be at least 1
characters long
Digest Algorithm
Type: enum (of string) Default: "SHA256"Hash algorithm for certificate signing.
Must be one of:
- "SHA224"
- "SHA256"
- "SHA384"
- "SHA512"
San
Type: array of stringSubject alternative names for the certificate.
No Additional ItemsEach item of this array must be:
Must be at least 1
characters long
CertificateExtensions
Type: objectCertificate extensions configuration.
No Additional PropertiesBasicConstraintsModel
Type: objectBasic Constraints extension configuration for certificate authority capabilities.
No Additional PropertiesCa
Type: boolean Default: falseWhether this certificate is authorized to sign other certificates as a Certificate Authority (CA).
Enabled
Type: boolean Default: falseWhether the Basic Constraints X.509 extension is present in the certificate.
Path Length
Default: nullMaximum number of intermediate CA certificates that may follow this certificate in a valid certificate chain. null
indicates no path length constraint.
Extension Critical
Type: boolean Default: falseWhether the Basic Constraints extension is marked as critical. If true
, applications that do not understand this extension must reject the certificate.
ExtendedKeyUsageModel
Type: objectExtended Key Usage extension configuration specifying certificate purposes.
No Additional PropertiesUsages
Type: array of enum (of string)Array of Extended Key Usage (EKU) purposes that define what the certificate may be used for (e.g., 'SERVERAUTH', 'CLIENTAUTH', 'CODE_SIGNING').
No Additional ItemsEach item of this array must be:
Must be one of:
- "ANY_EXTENDED_KEY_USAGE"
- "CERTIFICATE_TRANSPARENCY"
- "CLIENT_AUTH"
- "CODE_SIGNING"
- "EMAIL_PROTECTION"
- "IPSEC_IKE"
- "KERBEROS_PKINIT_KDC"
- "OCSP_SIGNING"
- "SERVER_AUTH"
- "SMARTCARD_LOGON"
- "TIME_STAMPING"
Enabled
Type: boolean Default: falseWhether the Extended Key Usage X.509 extension is present in the certificate.
Extension Critical
Type: boolean Default: falseWhether the Extended Key Usage extension is marked as critical. If true
, applications that do not understand this extension must reject the certificate.
KeyUsageModel
Type: objectKey Usage extension configuration defining permitted cryptographic operations.
No Additional PropertiesEnabled
Type: boolean Default: falseWhether the Key Usage X.509 extension is present in the certificate.
Digital Signature
Type: boolean Default: falseWhether the certificate may be used for digital signatures to verify identity or integrity.
Content Commitment
Type: boolean Default: falseWhether the certificate may be used for non-repudiation (proving content commitment).
Key Encipherment
Type: boolean Default: falseWhether the certificate's public key may be used for encrypting symmetric keys.
Data Encipherment
Type: boolean Default: falseWhether the certificate's public key may be used for directly encrypting raw data.
Key Agreement
Type: boolean Default: falseWhether the certificate's public key may be used for key agreement protocols (e.g., Diffie-Hellman).
Key Cert Sign
Type: boolean Default: falseWhether the certificate may be used to sign other certificates (CA functionality).
Crl Sign
Type: boolean Default: falseWhether the certificate may be used to sign Certificate Revocation Lists (CRLs).
Encipher Only
Type: boolean Default: falseWhether the public key may only be used for encryption when key_agreement
is also set.
Decipher Only
Type: boolean Default: falseWhether the public key may only be used for decryption when key_agreement
is also set.
Extension Critical
Type: boolean Default: falseWhether the Key Usage extension is marked as critical. If true
, applications that do not understand this extension must reject the certificate.
Acme Directory Uri
Default: nullACME directory URI to be used for ACME certificate creation.
Must be at least 1
characters long
Csr Id
Default: nullCSR to be used for ACME certificate creation.
Tos
Default: nullSet this when creating an ACME certificate to accept terms of service of the ACME service.
Dns Mapping
Type: objectA mapping of domain to ACME DNS Authenticator ID for each domain listed in SAN or common name of the CSR.
Each additional property must conform to the following schema
Type: integerRenew Days
Type: integer Default: 10Number of days before the certificate expiration date to attempt certificate renewal. If certificate renewal fails, renewal will be reattempted every day until expiration.
Value must be greater or equal to 1
and lesser or equal to 30
CertificateEntry
Type: objectThe created certificate configuration.
No Additional PropertiesId
Type: integerUnique identifier for this certificate entry.
Type
Type: integerInternal certificate type identifier used to determine certificate capabilities.
Name
Type: stringHuman-readable name for this certificate. Must be unique and contain only alphanumeric characters, dashes, and underscores.
Must be at least 1
characters long
Certificate
PEM-encoded X.509 certificate data. null
for certificate signing requests (CSR) that have not yet been signed.
Privatekey
PEM-encoded private key corresponding to the certificate. null
if no private key is available or for imported certificates without keys.
Csr
PEM-encoded Certificate Signing Request (CSR) data. null
for imported certificates or completed ACME certificates.
Acme Uri
ACME directory server URI used for automated certificate management. null
for non-ACME certificates.
Domains Authenticators
Mapping of domain names to ACME DNS authenticator IDs for domain validation. null
for non-ACME certificates.
Renew Days
Number of days before expiration to attempt automatic renewal. Only applicable for ACME certificates. null
for non-renewable certificates.
Acme
ACME registration and account information used for certificate lifecycle management. null
for non-ACME certificates.
Add To Trusted Store
Type: booleanWhether this certificate should be added to the system's trusted certificate store.
Root Path
Type: stringFilesystem path where certificate-related files are stored.
Must be at least 1
characters long
Certificate Path
Filesystem path to the certificate file (.crt). null
if no certificate is available.
Must be at least 1
characters long
Privatekey Path
Filesystem path to the private key file (.key). null
if no private key is available.
Must be at least 1
characters long
Csr Path
Filesystem path to the certificate signing request file (.csr). null
if no CSR is available.
Must be at least 1
characters long
Cert Type
Type: stringHuman-readable certificate type, typically 'CERTIFICATE' for standard certificates.
Must be at least 1
characters long
Cert Type Existing
Type: booleanWhether this is an existing certificate (imported or generated).
Cert Type Csr
Type: booleanWhether this entry represents a Certificate Signing Request (CSR) rather than a signed certificate.
Cert Type Ca
Type: booleanWhether this certificate is a Certificate Authority (CA) certificate.
Chain List
Type: array of stringArray of PEM-encoded certificates in the certificate chain, starting with the leaf certificate.
No Additional ItemsEach item of this array must be:
Key Length
Size of the cryptographic key in bits. null
if key information is unavailable.
Key Type
Type of cryptographic key algorithm (e.g., 'RSA', 'EC', 'DSA'). null
if key information is unavailable.
Must be at least 1
characters long
Country
ISO 3166-1 alpha-2 country code from the certificate subject. null
if not specified.
State
State or province name from the certificate subject. null
if not specified.
City
City or locality name from the certificate subject. null
if not specified.
Organization
Organization name from the certificate subject. null
if not specified.
Organizational Unit
Organizational unit from the certificate subject. null
if not specified.
Common
Common name (CN) from the certificate subject. null
if not specified.
San
Subject Alternative Names (SAN) from the certificate extension. null
if no SAN extension is present.
No Additional Items
Each item of this array must be:
Email address from the certificate subject. null
if not specified.
Dn
Distinguished Name (DN) of the certificate subject in RFC 2253 format. null
if certificate parsing failed.
Subject Name Hash
Hash of the certificate subject name. null
if certificate parsing failed.
Extensions
Type: objectX.509 certificate extensions parsed into a dictionary structure.
Digest Algorithm
Cryptographic hash algorithm used for certificate signing (e.g., 'SHA256'). null
if unavailable.
Lifetime
Certificate validity period in seconds. null
if certificate parsing failed.
From
Certificate validity start date in ISO 8601 format. null
if certificate parsing failed.
Until
Certificate validity end date in ISO 8601 format. null
if certificate parsing failed.
Serial
Certificate serial number. null
if certificate parsing failed.
Chain
Whether this certificate has an associated certificate chain. null
if unavailable.
Fingerprint
SHA-256 fingerprint of the certificate in hexadecimal format. null
if certificate parsing failed.
Expired
Whether the certificate has expired. null
if certificate parsing failed.
Parsed
Type: booleanWhether the certificate data was successfully parsed and validated.
Required roles: CERTIFICATE_WRITE