Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3.01k forks source link

Documentation: Correct certificate file format for az eventgrid namespace ca-certificate create #30243

Open fardarter opened 3 weeks ago

fardarter commented 3 weeks ago

Related command

az eventgrid namespace ca-certificate create

Is your feature request related to a problem? Please describe.

The command only accepts the PEM certificate file in single line form, even though this is not the most spec compliant form (that's fine), but no guidance is given on the file format (not fine).

Describe the solution you'd like

Please can an example file be shown on the documentation pages (API docs, cli docs), so that people have an easy time getting the format right.

Alternatively, perhaps note the (bash) transform required to get it into the right shape.

cat ./intermediate-ca-input.pem | tr -d '\n' > ./intermediate-ca-output.pem

Describe alternatives you've considered The REST API response could be more informative about what is wrong with a specific upload attempt.

Additional context This cost me a couple hours yesterday and it's an obstacle to automation, which means it is an obstacle to good security practice. This genuinely could be made more usable for thousands of people with a couple lines of commentary about correct format.

yonzhan commented 3 weeks ago

Thank you for opening this issue, we will look into it.