Azure / azure-iot-cli-extension

Azure IoT extension for Azure CLI
Other
83 stars 65 forks source link

Hub CA Certificate Migration #547

Closed vilit1 closed 1 year ago

vilit1 commented 2 years ago

Migrate the Certificate CA for IoT Hub from Baltimore to DigiCert.

Commands introduced:

Show has a default, since the service will return {} or None for that property. Set checks if the version chosen is already set before migration.

Note that this is a temporary command, will be removed after every hub has been migrated.

Note that this command will work only for some subscriptions and resource managers in the current state. Will update the pr as the feature becomes more avaliable.


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Thank you for contributing to the IoT extension!

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

Intent for Production

Basic expectations

Azure IoT CLI maintainers reserve the right to enforce any of the outlined expectations.

A PR is considered ready for review when all basic expectations have been met (or do not apply).

avagraw commented 2 years ago

Please post the pipeline run showing the testing evidence.

@digimaun Since, this is a temporary change, should we update history?

digimaun commented 2 years ago

Please add an entry to HISTORY.rst under 0.17.1 and we can increment the version of the extension in this PR to 0.17.1

https://github.com/Azure/azure-iot-cli-extension/blob/dev/azext_iot/constants.py#L10

vilit1 commented 2 years ago

Durations with a pre-created IoT Hub with the correct feature enabled: image

digimaun commented 2 years ago

Please post the pipeline run showing the testing evidence.

@digimaun Since, this is a temporary change, should we update history?

I would still because its user facing, even if temporary, in fact our release notes can use some kind of "limited period availability" nomenclature.

vilit1 commented 2 years ago

Added a fix for the initial root authority change

tests passing (local run, on a different sub, still in canary env): image

Note that for these tests, I modified the tests so that:

  1. the rbac "IoT Hub Data Contributor" role is not assigned (I do not have permissions in the test sub, and is not needed for this test)
  2. the dataplane actions (check for and delete any devices, configurations) during teardown are skipped. I will add back the dataplane actions once there is a fix on the service side.
vilit1 commented 1 year ago

image

digimaun commented 1 year ago

LGTM pending bash feedback, and successful IT run. +We discussed RBAC simplification strategies for tests offline.

vilit1 commented 1 year ago

https://dev.azure.com/azureiotdevxp/aziotcli/_build/results?buildId=6956&view=results

vilit1 commented 1 year ago

https://dev.azure.com/azureiotdevxp/aziotcli/_build/results?buildId=7077&view=results