golioth / golioth-zephyr-sdk

Golioth SDK For Zephyr
https://www.golioth.io
Apache License 2.0
65 stars 20 forks source link

samples: refactor certificate generation script #404

Closed sam-golioth closed 11 months ago

sam-golioth commented 1 year ago
github-actions[bot] commented 1 year ago

Visit the preview URL for this PR (updated for commit 1fd2338):

https://golioth-zephyr-sdk-doxygen-dev--pr404-cert-generation-8rwrop40.web.app

(expires Thu, 10 Aug 2023 14:12:49 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a389eefadf4b4b68a539327b3459dd66c142cf49

mniestroj commented 1 year ago
  • Separate commands for root and device certificates
  • Don't require device to already exist in Golioth console
  • Move to samples/common/scripts

Can we split those 3 changes to separate commits to make is easier to review (and get back to it once needed with git log)?

sam-golioth commented 1 year ago
  • Separate commands for root and device certificates
  • Don't require device to already exist in Golioth console
  • Move to samples/common/scripts

Can we split those 3 changes to separate commits to make is easier to review (and get back to it once needed with git log)?

I split it into 2 commits, one for moving the file and another for the code changes, which should make the diff easier to use.

sam-golioth commented 11 months ago

Code changes look fine. However I would like to clarify the "device primary hardware id" vs "device name" thing. This is new to me, since I was 100% sure that so far a "hardware id" was used, not a "name".

It surprised me too. Here's the relevant part of the backend code: https://github.com/golioth/golioth/blob/main/internal/services/deviceauth/certificates_auth.go#L113