Azure / azure-iot-cli-extension

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

Update dps enrollment to accept certificate for various file extension #600

Closed Elsie4ever closed 1 year ago

Elsie4ever commented 1 year ago

This is to improve the user experience when creating/update dps enrollment, user should be able to upload certificate in various file extension. However I added a content validator before the service call is made. Now the validator will throw exception when any of these conditions fail:

  1. start with -----BEGIN CERTIFICATE----- (prefix)
  2. end with -----END CERTIFICATE----- (suffix)
  3. content should be valid base64 string without prefix and suffix

ran related unit test and all passed

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).

digimaun commented 1 year ago

/azp run

azure-pipelines[bot] commented 1 year ago
Azure Pipelines successfully started running 1 pipeline(s).
digimaun commented 1 year ago

/azp run

azure-pipelines[bot] commented 1 year ago
Azure Pipelines successfully started running 1 pipeline(s).
Elsie4ever commented 1 year ago

local unit test snapshot image pipline unit & int test https://dev.azure.com/azureiotdevxp/aziotcli/_build/results?buildId=7126&view=results