astarte-platform / astarte

Core Astarte Repository
https://docs.astarte-platform.org/
Apache License 2.0
240 stars 50 forks source link

`astarte-dev-tool` Added generating private/public keys feature #992

Closed shinnokdisengir closed 2 months ago

shinnokdisengir commented 2 months ago

What this PR does / why we need it:

This PR introduces the feature for generating public and private keys using the mix astarte_dev_tool.auth.keys task. This task allows the creation of both private and public keys, as well as the option to derive a public key from a provided private key using arg.

The feature enhances key management within the development tooling, enabling easy and streamlined keypair generation for authentication and security purposes.

Examples

 $ mix astarte_dev_tool.auth.key
 $ mix astarte_dev_tool.auth.key "-----BEGIN EC PRIVATE KEY-----Base64-----END EC PRIVATE KEY-----"
 $ mix astarte_dev_tool.auth.key "$(mix astarte_dev_tool.auth.key)"

Which issue(s) this PR fixes:

Nothing

Special notes for your reviewer:

The feature includes two main functionalities: