Add X.509 certificate rotation support#25
Open
sw-ms-ankitsangani wants to merge 4 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add automatic X.509 certificate rotation to the Python SDK and provide documentation and a sample callback. Key changes:
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.