From 6a9e63315a6421d1580579aabffdc76f33bde62b Mon Sep 17 00:00:00 2001 From: Byron Ruth Date: Thu, 31 Dec 2020 15:02:48 -0500 Subject: [PATCH 1/5] Add explicit account server URL to `nsc push` step --- nats-tools/nas/dir_store.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nats-tools/nas/dir_store.md b/nats-tools/nas/dir_store.md index 0647597..373fe65 100644 --- a/nats-tools/nas/dir_store.md +++ b/nats-tools/nas/dir_store.md @@ -63,7 +63,7 @@ Success! - added account "B" With the account and a couple of users in place, let's push all the accounts to the nats-account-server: ```text -> nsc push -A +> nsc push -u http://localhost:9090/jwt/v1/ -A successfully pushed all accounts [A,B] ``` From 5753a58e9950ba8c4b26b7d97b23119516b9febd Mon Sep 17 00:00:00 2001 From: Byron Ruth Date: Tue, 5 Jan 2021 14:19:32 -0500 Subject: [PATCH 2/5] Add section to set account server on operator --- nats-tools/nas/dir_store.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/nats-tools/nas/dir_store.md b/nats-tools/nas/dir_store.md index 373fe65..3e08a75 100644 --- a/nats-tools/nas/dir_store.md +++ b/nats-tools/nas/dir_store.md @@ -60,7 +60,23 @@ Generated account key - private key stored "~/.nkeys/AAA/accounts/B/B.nk" Success! - added account "B" ``` -With the account and a couple of users in place, let's push all the accounts to the nats-account-server: +With the account and a couple of users in place, let's push all the accounts to the nats-account-server. If this was not previously setup, ensure the account server is define on the operator: + +```text +❯ nsc edit operator -u http://localhost:9090/jwt/v1 + +[ OK ] set account jwt server url to "http://localhost:9090/jwt/v1" +[ OK ] edited operator "AAA" +``` + +Going forward all interactions on behalf of the operator will use this account server. Now we can push all accounts. + +```text +nsc push -A +successfully pushed all accounts [A,B] +``` + +Note that if the account server is not configured on the operator or there is a need to override temporarily, the `-u` option is availble on the `nsc push` command. ```text > nsc push -u http://localhost:9090/jwt/v1/ -A From 95715eaf546fbcc27f764c4d4e62766dcf449e39 Mon Sep 17 00:00:00 2001 From: Alberto Ricart Date: Tue, 5 Jan 2021 14:12:17 -0600 Subject: [PATCH 3/5] Update dir_store.md clarified the flags/and use of push command. --- nats-tools/nas/dir_store.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nats-tools/nas/dir_store.md b/nats-tools/nas/dir_store.md index 3e08a75..a1d9ec2 100644 --- a/nats-tools/nas/dir_store.md +++ b/nats-tools/nas/dir_store.md @@ -60,10 +60,10 @@ Generated account key - private key stored "~/.nkeys/AAA/accounts/B/B.nk" Success! - added account "B" ``` -With the account and a couple of users in place, let's push all the accounts to the nats-account-server. If this was not previously setup, ensure the account server is define on the operator: +With the account and a couple of users in place, let's push all the accounts to the nats-account-server. If the account jwt server url is not set on the operator, you may want to set it. Note that account servers typically require the path `/jwt/v1` in addition to the protocol and hostport (or you can specify the `--account-jwt-server-url` to nsc's `push` command). ```text -❯ nsc edit operator -u http://localhost:9090/jwt/v1 +❯ nsc edit operator --account-jwt-server-url http://localhost:9090/jwt/v1 [ OK ] set account jwt server url to "http://localhost:9090/jwt/v1" [ OK ] edited operator "AAA" From 3b868156b2184355def1583f327398e90a7fb9ef Mon Sep 17 00:00:00 2001 From: Alberto Ricart Date: Tue, 5 Jan 2021 14:13:30 -0600 Subject: [PATCH 4/5] Update dir_store.md fixed english --- nats-tools/nas/dir_store.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nats-tools/nas/dir_store.md b/nats-tools/nas/dir_store.md index a1d9ec2..cbf5d4a 100644 --- a/nats-tools/nas/dir_store.md +++ b/nats-tools/nas/dir_store.md @@ -60,7 +60,7 @@ Generated account key - private key stored "~/.nkeys/AAA/accounts/B/B.nk" Success! - added account "B" ``` -With the account and a couple of users in place, let's push all the accounts to the nats-account-server. If the account jwt server url is not set on the operator, you may want to set it. Note that account servers typically require the path `/jwt/v1` in addition to the protocol and hostport (or you can specify the `--account-jwt-server-url` to nsc's `push` command). +With the account and a couple of users in place, let's push all the accounts to the nats-account-server. If the account jwt server url is not set on the operator, you may want to set it. Note that account servers typically require the path `/jwt/v1` in addition to the protocol and hostport (or you can specify the `--account-jwt-server-url` flag to nsc's `push` command). ```text ❯ nsc edit operator --account-jwt-server-url http://localhost:9090/jwt/v1 From 53c37fbeb2d3aadc00842b334fff0f123dfa88dd Mon Sep 17 00:00:00 2001 From: Ginger Collison Date: Tue, 5 Jan 2021 15:00:53 -0600 Subject: [PATCH 5/5] update capitalization for consistency --- nats-tools/nas/dir_store.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nats-tools/nas/dir_store.md b/nats-tools/nas/dir_store.md index cbf5d4a..6d4ccd4 100644 --- a/nats-tools/nas/dir_store.md +++ b/nats-tools/nas/dir_store.md @@ -60,7 +60,7 @@ Generated account key - private key stored "~/.nkeys/AAA/accounts/B/B.nk" Success! - added account "B" ``` -With the account and a couple of users in place, let's push all the accounts to the nats-account-server. If the account jwt server url is not set on the operator, you may want to set it. Note that account servers typically require the path `/jwt/v1` in addition to the protocol and hostport (or you can specify the `--account-jwt-server-url` flag to nsc's `push` command). +With the account and a couple of users in place, let's push all the accounts to the nats-account-server. If the account JWT server URL is not set on the operator, you may want to set it. Note that account servers typically require the path `/jwt/v1` in addition to the protocol and hostport (or you can specify the `--account-jwt-server-url` flag to nsc's `push` command). ```text ❯ nsc edit operator --account-jwt-server-url http://localhost:9090/jwt/v1