Authentication with SCM

Authentication with SCM can utilize a password or client certificate and corresponding private key. Both authentication methods are mapped to a username for the SCM account.

The provider block provides the authentication variables. Terraform recommends using environment variables for sensitive information. The values of these variables could also be assigned in terraform.auto.tfvars or directly in main.tf.

This is an example of a provider block for username and password authentication, utilizing variables defined in variables.tf.

provider "sectigo" {
    username = var.SECTIGO_CM_LOGIN
    password = var.SECTIGO_CM_PWD
    customer_uri = var.SECTIGO_CM_CUSTOMERURI
}

This is an example of a provider block for username and client certificate authentication, utilizing variables defined in variables.tf. Client certificate authentication does not require the password, but does require the authentication type client_cert, with the client certificate associated with the user in SCM and the associated client certificate’s private key.

provider "sectigo" {
    username = var.SECTIGO_CM_LOGIN
    customer_uri = var.SECTIGO_CM_CUSTOMERURI
    auth_type    = var.SECTIGO_CM_AUTH_TYPE
    client_cert  = var.SECTIGO_CM_CLIENT_CERT
    private_key  = var.SECTIGO_CM_PRIVATE_KEY
}