github.com/kbehouse/nsc@v0.0.6/docs/nsc_add_user.md (about)

     1  ## nsc add user
     2  
     3  Add an user to the account
     4  
     5  ### Synopsis
     6  
     7  Add an user to the account
     8  
     9  ```
    10  nsc add user [flags]
    11  ```
    12  
    13  ### Examples
    14  
    15  ```
    16  # Add user with a previously generated public key:
    17  nsc add user --name <n> --public-key <nkey>
    18  # Note: that unless you specify the seed, the key won't be stored in the keyring.'
    19  
    20  # Set permissions so that the user can publish and/or subscribe to the specified subjects or wildcards:
    21  nsc add user --name <n> --allow-pubsub <subject>,...
    22  nsc add user --name <n> --allow-pub <subject>,...
    23  nsc add user --name <n> --allow-sub <subject>,...
    24  
    25  # Set permissions so that the user cannot publish nor subscribe to the specified subjects or wildcards:
    26  nsc add user --name <n> --deny-pubsub <subject>,...
    27  nsc add user --name <n> --deny-pub <subject>,...
    28  nsc add user --name <n> --deny-sub <subject>,...
    29  
    30  # Set subscribe permissions with queue names (separated from subject by space)
    31  # When added this way, the corresponding remove command needs to be presented with the exact same string
    32  nsc add user --name <n> --deny-sub "<subject> <queue>,..."
    33  nsc add user --name <n> --allow-sub "<subject> <queue>,..."
    34  
    35  # To dynamically allow publishing to reply subjects, this works well for service responders:
    36  nsc add user --name <n> --allow-pub-response
    37  
    38  # A permission to publish a response can be removed after a duration from when 
    39  # the message was received:
    40  nsc add user --name <n> --allow-pub-response --response-ttl 5s
    41  
    42  # If the service publishes multiple response messages, you can specify:
    43  nsc add user --name <n> --allow-pub-response=5
    44  # See 'nsc edit export --response-type --help' to enable multiple
    45  # responses between accounts
    46  
    47  ```
    48  
    49  ### Options
    50  
    51  ```
    52    -a, --account string               account name
    53        --allow-pub strings            add publish permissions - comma separated list or option can be specified multiple times
    54        --allow-pub-response int[=1]   permissions to limit how often a client can publish to reply subjects [with an optional count, --allow-pub-response=n] (global)
    55        --allow-pubsub strings         add publish and subscribe permissions - comma separated list or option can be specified multiple times
    56        --allow-sub strings            add subscribe permissions - comma separated list or option can be specified multiple times
    57        --bearer                       no connect challenge required for user
    58        --deny-pub strings             add deny publish permissions - comma separated list or option can be specified multiple times
    59        --deny-pubsub strings          add deny publish and subscribe permissions - comma separated list or option can be specified multiple times
    60        --deny-sub strings             add deny subscribe permissions - comma separated list or option can be specified multiple times
    61        --expiry string                valid until ('0' is always, '2M' is two months) - yyyy-mm-dd, #m(inutes), #h(ours), #d(ays), #w(eeks), #M(onths), #y(ears) (default "0")
    62    -h, --help                         help for user
    63    -n, --name string                  name to assign the user
    64    -k, --public-key string            public key identifying the user
    65        --response-ttl string          the amount of time the permissions is valid (global) - [#ms(millis) | #s(econds) | m(inutes) | h(ours)] - Default is no time limit.
    66        --source-network strings       source network for connection - comma separated list or option can be specified multiple times
    67        --start string                 valid from ('0' is always, '3d' is three days) - yyyy-mm-dd, #m(inutes), #h(ours), #d(ays), #w(eeks), #M(onths), #y(ears) (default "0")
    68        --tag strings                  tags for user - comma separated list or option can be specified multiple times
    69  ```
    70  
    71  ### Options inherited from parent commands
    72  
    73  ```
    74    -i, --interactive          ask questions for various settings
    75    -K, --private-key string   private key
    76  ```
    77  
    78  ### SEE ALSO
    79  
    80  * [nsc add](nsc_add.md)	 - Add assets such as accounts, imports, users
    81  
    82  ###### Auto generated by spf13/cobra on 18-Mar-2021