Implement option to not require a brand account login to generate auto-import #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As our organization was looking at what credentials/secrets we would need to expose to generate a system user, we noticed that the stock
make-system-userneeded both the signing key imported locally as well as have the brand account email/password. Ideally, we want to minimize access to the brand account because it has highly-privileged access to the Brand Store. We only want to provide access to the system-user signing private key and passphrase.With this pull request, we have added an option to allow generating an auto-import.assert without needing the brand store SSO account.
brand_idcomes from the requiredbrandoption on the command line; with login, it comes from theaccount_idof the signed-in account.sign-key-sha3-384comes from the SHA3-384 hash of the public part of the key name provided; it comes from the registered key part of the account information of the signed-in account.One thing that logging in with brand account provides is that it verifies that the brand is correct and the given key is in fact registered to the brand account. In the no-login case, we don't get the verification but then, if that information is not valid, the generating
auto-import.assertwill not work on a brand device so no harm.Sorry for the end-of-line whitespace trimming - hopefully it isn't important. I have it set by default on my editor to keep things clean.