Skip to content

Add X.509 certificate rotation support#25

Open
sw-ms-ankitsangani wants to merge 4 commits into
std-21-kinesis-video-streamfrom
kvs-get-credential-from-certificate
Open

Add X.509 certificate rotation support#25
sw-ms-ankitsangani wants to merge 4 commits into
std-21-kinesis-video-streamfrom
kvs-get-credential-from-certificate

Conversation

@sw-ms-ankitsangani
Copy link
Copy Markdown
Collaborator

Add automatic X.509 certificate rotation to the Python SDK and provide documentation and a sample callback. Key changes:

  • Add CERTIFICATE_ROTATION.md documenting renewal flows (With CSR and Without CSR), APIs, signing rules, firmware callback, and troubleshooting.
  • IoTConnectSDK: enable ANSI on Windows, extract company GUID from discovery response, add debug colorized logs, and new members for cert rotation.
  • Implement certificate rotation logic: _get_device_cert_hex, _call_auth_challenge, _call_cert_sign, _call_cert_ack, _install_new_certificate, _install_new_private_key, and _handle_cert_renewal_csr. These handle both direct (server-provided pk+dc) and CSR-based flows (firmware-provided CSR+signature), perform reconnect, ACK, and re-sync.
  • Register firmware callback via onCertSignedRequest(callback) and trigger rotation in background when ce=1 is detected in sync responses.
  • mqttclient: colorize MQTT debug/error logs.
  • Update sample firmware: enable ANSI on Windows, add fw_print/fw_error helpers, adjust sample config/IDs/paths and add an OnCertSignedRequestCallback stub to demonstrate CSR signing.

These changes enable automated certificate renewal for AWS-managed and custom CA scenarios and provide documentation and a firmware example to implement CSR-based renewals.

Add automatic X.509 certificate rotation to the Python SDK and provide documentation and a sample callback. Key changes:

- Add CERTIFICATE_ROTATION.md documenting renewal flows (With CSR and Without CSR), APIs, signing rules, firmware callback, and troubleshooting.
- IoTConnectSDK: enable ANSI on Windows, extract company GUID from discovery response, add debug colorized logs, and new members for cert rotation.
- Implement certificate rotation logic: _get_device_cert_hex, _call_auth_challenge, _call_cert_sign, _call_cert_ack, _install_new_certificate, _install_new_private_key, and _handle_cert_renewal_csr. These handle both direct (server-provided pk+dc) and CSR-based flows (firmware-provided CSR+signature), perform reconnect, ACK, and re-sync.
- Register firmware callback via onCertSignedRequest(callback) and trigger rotation in background when ce=1 is detected in sync responses.
- mqttclient: colorize MQTT debug/error logs.
- Update sample firmware: enable ANSI on Windows, add fw_print/fw_error helpers, adjust sample config/IDs/paths and add an OnCertSignedRequestCallback stub to demonstrate CSR signing.

These changes enable automated certificate renewal for AWS-managed and custom CA scenarios and provide documentation and a firmware example to implement CSR-based renewals.
Remove hardcoded KVS channel ARN and credential endpoint and disable manual WebRTC startup. The firmware now relies on the SDK device-sync VS object (vs.as and vs.carn) to auto-start WebRTC or PutMedia; start_webrtc helper and related imports were removed. Update device identity, certificate paths, cpid and env settings, clarify cloud-command docs and auto-start behavior, and simplify the main loop. Also update the packaged SDK archive (binary) in sample-webrtc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant