nsc
nsc copied to clipboard
nsc should provide template import and export
Similar to nats-cli for JS stream and consumer CRUD, nsc should provide an option to export the current grants, flags, and settings of an Account JWT as a JSON template and provide an nsc option to source a JSON template in lieu of command-line parameters or interactive prompts.
I think this would need some more attention.
Our use case is that we need to move accounts between different operators without also giving the users that where created under that previous account access under the newly imported account.
Say that we have an DEV
server with its operator, accounts and users. We make changes to the account along the way of development. Now we would like to import the fully configured account with all is imports and exports to the STAGE
server WITHOUT at the same time give all DEV
users that where created on DEV
access to STAGE
.
Adding all the users to a revocation list is not an option as we see it.
The only way that we currently see is to rerun all the nsc commands for imports, exports and other settings on the new account. This is really painful when we have lots of accounts. I REALLY hope that I just missed something and that there is a better way to do this.
So one way would be to be able to export all the settings/imports/exports of an account and then create a new account and import these settings again.