helpers: Helper functions for key vault objects

Description Usage Arguments Details

Description

Helper functions for key vault objects

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
cert_key_properties(
  type = c("RSA", "EC"),
  hardware = FALSE,
  ec_curve = NULL,
  rsa_key_size = NULL,
  key_exportable = TRUE,
  reuse_key = FALSE
)

cert_x509_properties(
  dns_names = character(),
  emails = character(),
  upns = character(),
  key_usages = c("digitalSignature", "keyEncipherment"),
  enhanced_key_usages = c("1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.2"),
  validity_months = NULL
)

cert_issuer_properties(issuer = "self", cert_type = NULL, transparent = NULL)

cert_expiry_action(remaining = 0.1, action = c("AutoRenew", "EmailContacts"))

vault_object_attrs(
  enabled = TRUE,
  expiry_date = NULL,
  activation_date = NULL,
  recovery_level = NULL
)

Arguments

type

For cert_key_properties, the type of key to create: RSA or elliptic curve (EC). Note that for keys backing a certificate, only RSA is allowed.

hardware

For cert_key_properties, whether to use a hardware key or software key. The former requires a premium key vault.

ec_curve

For an EC key, the type of elliptic curve.

rsa_key_size

For an RSA key, the key size, either 2048, 3072 or 4096.

key_exportable

For a key used in a certificate, whether it should be exportable.

reuse_key

For a key used in a certificate, whether it should be reused when renewing the certificate.

dns_names, emails, upns

For cert_x509_properties, the possible subject alternative names (SANs) for a certificate. These should be character vectors.

key_usages

For cert_x509_properties, a character vector of key usages.

enhanced_key_usages

For cert_x509_properties, a character vector of enhanced key usages (EKUs).

validity_months

For cert_x509_properties, the number of months the certificate should be valid for.

issuer

For cert_issuer_properties, the name of the issuer. Defaults to "self" for a self-signed certificate.

cert_type

For cert_issuer_properties, the type of certificate to issue, eg "OV-SSL", "DV-SSL" or "EV-SSL".

transparent

For cert_issuer_properties, whether the certificate should be transparent.

remaining

For cert_expiry_action, The remaining certificate lifetime at which to take action. If this is a number between 0 and 1, it is interpreted as the percentage of life remaining; otherwise, the number of days remaining. To disable expiry actions, set this to NULL.

action

For cert_expiry_action, what action to take when a certificate is about to expire. Can be either "AutoRenew" or "EmailContacts". Ignored if remaining == NULL.

enabled

For vault_object_attrs, whether this stored object (key, secret, certificate, storage account) is enabled.

expiry_date, activation_date

For vault_object_attrs, the optional expiry date and activation date of the stored object. Can be any R object that can be coerced to POSIXct format.

recovery_level

For vault_object_attrs, the recovery level for the stored object.

Details

These are convenience functions for specifying the properties of objects stored in a key vault. They return lists of fields to pass to the REST API.


cloudyr/AzureKeyVault documentation built on Sept. 19, 2021, 8:49 a.m.