Azure provisioning¶
Provisioning for Microsoft Azure¶
This script implements the “custom” Azure provisioning method, using self-generated root and signer certificates. It is intended to be invoked from iotprovison, but can also be run stand-alone.
- class iotprovision.azure.custom_provision.AzureCustomProvisioner(root_ca_cert_file, signer_ca_key_file, signer_ca_cert_file, device_csr_file, device_cert_file, force_new_device_certificate=False)¶
Bases:
object
Azure specific provisioning steps
- Parameters:
root_ca_cert_file (str (path)) – Path to file containing root Certificate Authority certificate file
signer_ca_key_file (str (path)) – Path to file containing signer Certificate Authority private key
signer_ca_cert_file (str (path)) – Path to file containing signer Certificate Authority certificate file
device_csr_file (str (path)) – Path to the file to write the generated Certificate Signer Request to
device_cert_file (str (path)) – Path to the file to write the generated device certificate to
force_new_device_certificate (boolean) – Force re-creating already existing device certificate
- provision(fwinterface)¶
Do the actual provisioning.
This will generate a device certificate, and save it along with the CA signer certificate in WINC flash Returns the “Thing name” (Subject Key Identifier) if successful. Generated certificates and thing name are saved to files as well.
- Parameters:
fwinterface (
ProvisioningFirmwareInterface
) – Firmware fwinterface driver- Returns:
“Thing name” (Subject Key Identifier) if successful, else None
- Return type:
str