blob: 06c7f188c3a013d0755f1da42b69a4c07cc2c68d [file] [log] [blame]
Jiri Simsa3f4e92d2015-03-24 21:26:37 -07001// Copyright 2015 The Vanadium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -08005// This file was auto-generated via go generate.
6// DO NOT UPDATE MANUALLY
7
8/*
Todd Wang6ed3b6c2015-04-08 14:37:04 -07009Command principal creates and manages Vanadium principals and blessings.
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -080010
11All objects are printed using base64-VOM-encoding.
12
13Usage:
14 principal <command>
15
16The principal commands are:
17 create Create a new principal and persist it into a directory
18 fork Fork a new principal from the principal that this tool is
19 running as and persist it into a directory
Suharsh Sivakumard1cc6e02015-03-16 13:58:49 -070020 seekblessings Seek blessings from a web-based Vanadium blessing service
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -080021 recvblessings Receive blessings sent by another principal and use them as the
22 default
23 dump Dump out information about the principal
24 dumpblessings Dump out information about the provided blessings
25 blessself Generate a self-signed blessing
26 bless Bless another principal
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -070027 set Mutate the principal's blessings.
28 get Read the principal's blessings.
Asim Shankar562b2302015-04-27 13:52:43 -070029 recognize Add to the set of identity providers recognized by this
30 principal
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -080031 help Display help for commands or topics
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -080032
33The global flags are:
34 -alsologtostderr=true
35 log to standard error as well as files
36 -log_backtrace_at=:0
37 when logging hits line file:N, emit a stack trace
38 -log_dir=
39 if non-empty, write log files to this directory
40 -logtostderr=false
41 log to standard error instead of files
42 -max_stack_buf_size=4292608
43 max size in bytes of the buffer to use for logging stack traces
Jiri Simsa26f1c4d2015-08-09 17:49:40 -070044 -metadata=<just specify -metadata to activate>
45 Displays metadata for the program and exits.
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -080046 -stderrthreshold=2
47 logs at or above this threshold go to stderr
48 -v=0
49 log level for V logs
Asim Shankarf32d24d2015-04-01 16:34:26 -070050 -v23.credentials=
51 directory to use for storing security credentials
52 -v23.i18n-catalogue=
53 18n catalogue files to load, comma separated
Asim Shankar8196c1e2015-04-08 22:42:18 -070054 -v23.namespace.root=[/(dev.v.io/role/vprod/service/mounttabled)@ns.dev.v.io:8101]
Asim Shankarf32d24d2015-04-01 16:34:26 -070055 local namespace root; can be repeated to provided multiple roots
56 -v23.permissions.file=map[]
Adam Sadovskya4d4a692015-04-20 11:36:49 -070057 specify a perms file as <name>:<permsfile>
Asim Shankarf32d24d2015-04-01 16:34:26 -070058 -v23.permissions.literal=
Adam Sadovskya4d4a692015-04-20 11:36:49 -070059 explicitly specify the runtime perms as a JSON-encoded access.Permissions.
Asim Shankarf32d24d2015-04-01 16:34:26 -070060 Overrides all --v23.permissions.file flags.
61 -v23.proxy=
62 object name of proxy service to use to export services across network
63 boundaries
64 -v23.tcp.address=
65 address to listen on
66 -v23.tcp.protocol=wsh
67 protocol to listen with
68 -v23.vtrace.cache-size=1024
69 The number of vtrace traces to store in memory.
70 -v23.vtrace.collect-regexp=
71 Spans and annotations that match this regular expression will trigger trace
72 collection.
73 -v23.vtrace.dump-on-shutdown=true
74 If true, dump all stored traces on runtime shutdown.
75 -v23.vtrace.sample-rate=0
76 Rate (from 0.0 to 1.0) to sample vtrace traces.
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -080077 -vmodule=
Cosmos Nicolaou6c363882015-06-02 11:51:27 -070078 comma-separated list of pattern=N settings for filename-filtered logging
79 -vpath=
80 comma-separated list of pattern=N settings for file pathname-filtered logging
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -080081
Todd Wang11440452015-05-29 18:05:29 -070082Principal create - Create a new principal and persist it into a directory
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -080083
84Creates a new principal with a single self-blessed blessing and writes it out to
85the provided directory. The same directory can then be used to set the
Asim Shankar59b8b692015-03-30 01:23:36 -070086V23_CREDENTIALS environment variable for other vanadium applications.
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -080087
88The operation fails if the directory already contains a principal. In this case
89the --overwrite flag can be provided to clear the directory and write out the
90new principal.
91
92Usage:
93 principal create [flags] <directory> <blessing>
94
Todd Wangf1550cf2015-05-11 10:58:41 -070095<directory> is the directory to which the new principal will be persisted.
96
97<blessing> is the self-blessed blessing that the principal will be setup to use
98by default.
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -080099
100The principal create flags are:
101 -overwrite=false
102 If true, any existing principal data in the directory will be overwritten
103
Todd Wang11440452015-05-29 18:05:29 -0700104Principal fork - Fork a new principal from the principal that this tool is running as and persist it into a directory
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800105
106Creates a new principal with a blessing from the principal specified by the
107environment that this tool is running in, and writes it out to the provided
108directory. The blessing that will be extended is the default one from the
109blesser's store, or specified by the --with flag. Expiration on the blessing are
110controlled via the --for flag. Additional caveats on the blessing are controlled
111with the --caveat flag. The blessing is marked as default and shareable with all
112peers on the new principal's blessing store.
113
114The operation fails if the directory already contains a principal. In this case
115the --overwrite flag can be provided to clear the directory and write out the
116forked principal.
117
118Usage:
119 principal fork [flags] <directory> <extension>
120
Todd Wangf1550cf2015-05-11 10:58:41 -0700121<directory> is the directory to which the forked principal will be persisted.
122
123<extension> is the extension under which the forked principal is blessed.
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800124
125The principal fork flags are:
126 -caveat=[]
127 "package/path".CaveatName:VDLExpressionParam to attach to this blessing
Asim Shankara0bba462015-02-20 22:50:51 -0800128 -for=0
129 Duration of blessing validity (zero implies no expiration caveat)
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800130 -overwrite=false
131 If true, any existing principal data in the directory will be overwritten
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700132 -require-caveats=true
Asim Shankara0bba462015-02-20 22:50:51 -0800133 If false, allow blessing without any caveats. This is typically not advised
134 as the principal wielding the blessing will be almost as powerful as its
135 blesser
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800136 -with=
137 Path to file containing blessing to extend
138
Todd Wang11440452015-05-29 18:05:29 -0700139Principal seekblessings - Seek blessings from a web-based Vanadium blessing service
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800140
Suharsh Sivakumard1cc6e02015-03-16 13:58:49 -0700141Seeks blessings from a web-based Vanadium blesser which requires the caller to
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800142first authenticate with Google using OAuth. Simply run the command to see what
143happens.
144
145The blessings are sought for the principal specified by the environment that
146this tool is running in.
147
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700148The blessings obtained are set as default, unless the --set-default flag is set
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800149to true, and are also set for sharing with all peers, unless a more specific
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700150peer pattern is provided using the --for-peer flag.
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800151
152Usage:
153 principal seekblessings [flags]
154
155The principal seekblessings flags are:
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700156 -add-to-roots=true
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800157 If true, the root certificate of the blessing will be added to the
158 principal's set of recognized root certificates
159 -browser=true
160 If false, the seekblessings command will not open the browser and only print
161 the url to visit.
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700162 -for-peer=...
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800163 If non-empty, the blessings obtained will be marked for peers matching this
164 pattern in the store
Suharsh Sivakumar33884012015-03-25 13:27:55 -0700165 -from=https://dev.v.io/auth/google
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800166 URL to use to begin the seek blessings process
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700167 -set-default=true
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800168 If true, the blessings obtained will be set as the default blessing in the
169 store
170
Todd Wang11440452015-05-29 18:05:29 -0700171Principal recvblessings - Receive blessings sent by another principal and use them as the default
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800172
173Allow another principal (likely a remote process) to bless this one.
174
175This command sets up the invoker (this process) to wait for a blessing from
176another invocation of this tool (remote process) and prints out the command to
177be run as the remote principal.
178
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700179The received blessings are set as default, unless the --set-default flag is set
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800180to true, and are also set for sharing with all peers, unless a more specific
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700181peer pattern is provided using the --for-peer flag.
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800182
183TODO(ashankar,cnicolaou): Make this next paragraph possible! Requires the
184ability to obtain the proxied endpoint.
185
186Typically, this command should require no arguments. However, if the sender and
187receiver are on different network domains, it may make sense to use the
Asim Shankarf32d24d2015-04-01 16:34:26 -0700188--v23.proxy flag:
189 principal --v23.proxy=proxy recvblessings
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800190
191The command to be run at the sender is of the form:
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700192 principal bless --remote-key=KEY --remote-token=TOKEN ADDRESS EXTENSION
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800193
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700194The --remote-key flag is used to by the sender to "authenticate" the receiver,
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800195ensuring it blesses the intended recipient and not any attacker that may have
196taken over the address.
197
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700198The --remote-token flag is used by the sender to authenticate itself to the
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800199receiver. This helps ensure that the receiver rejects blessings from senders who
200just happened to guess the network address of the 'recvblessings' invocation.
201
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700202If the --remote-arg-file flag is provided to recvblessings, the remote key,
Suharsh Sivakumarab21eb02015-04-01 12:58:20 -0700203remote token and object address of this principal will be written to the
204specified location. This file can be supplied to bless:
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700205 principal bless --remote-arg-file FILE EXTENSION
Suharsh Sivakumarab21eb02015-04-01 12:58:20 -0700206
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800207Usage:
208 principal recvblessings [flags]
209
210The principal recvblessings flags are:
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700211 -for-peer=...
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800212 If non-empty, the blessings received will be marked for peers matching this
213 pattern in the store
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700214 -remote-arg-file=
Suharsh Sivakumarab21eb02015-04-01 12:58:20 -0700215 If non-empty, the remote key, remote token, and principal will be written to
216 the specified file in a JSON object. This can be provided to 'principal bless
Suharsh Sivakumar4bbe8ed2015-04-09 14:21:44 -0700217 --remote-arg-file FILE EXTENSION'
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700218 -set-default=true
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800219 If true, the blessings received will be set as the default blessing in the
220 store
221
Todd Wang11440452015-05-29 18:05:29 -0700222Principal dump - Dump out information about the principal
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800223
224Prints out information about the principal specified by the environment that
225this tool is running in.
226
227Usage:
Robin Thellend5396eae2015-04-13 09:57:06 -0700228 principal dump [flags]
229
230The principal dump flags are:
231 -s=false
Suharsh Sivakumar2b22fc12015-04-15 19:38:04 -0700232 If true, show only the default blessing names
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800233
Todd Wang11440452015-05-29 18:05:29 -0700234Principal dumpblessings - Dump out information about the provided blessings
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800235
236Prints out information about the blessings (typically obtained from this tool)
237encoded in the provided file.
238
239Usage:
240 principal dumpblessings <file>
241
242<file> is the path to a file containing blessings typically obtained from this
243tool. - is used for STDIN.
244
Todd Wang11440452015-05-29 18:05:29 -0700245Principal blessself - Generate a self-signed blessing
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800246
247Returns a blessing with name <name> and self-signed by the principal specified
248by the environment that this tool is running in. Optionally, the blessing can be
249restricted with an expiry caveat specified using the --for flag. Additional
250caveats can be added with the --caveat flag.
251
252Usage:
253 principal blessself [flags] [<name>]
254
255<name> is the name used to create the self-signed blessing. If not specified, a
256name will be generated based on the hostname of the machine and the name of the
257user running this command.
258
259The principal blessself flags are:
260 -caveat=[]
261 "package/path".CaveatName:VDLExpressionParam to attach to this blessing
262 -for=0
Asim Shankara0bba462015-02-20 22:50:51 -0800263 Duration of blessing validity (zero implies no expiration)
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800264
Todd Wang11440452015-05-29 18:05:29 -0700265Principal bless - Bless another principal
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800266
267Bless another principal.
268
269The blesser is obtained from the runtime this tool is using. The blessing that
270will be extended is the default one from the blesser's store, or specified by
271the --with flag. Expiration on the blessing are controlled via the --for flag.
272Additional caveats are controlled with the --caveat flag.
273
274For example, let's say a principal "alice" wants to bless another principal
275"bob" as "alice/friend", the invocation would be:
Asim Shankar59b8b692015-03-30 01:23:36 -0700276 V23_CREDENTIALS=<path to alice> principal bless <path to bob> friend
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800277and this will dump the blessing to STDOUT.
278
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700279With the --remote-key and --remote-token flags, this command can be used to
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800280bless a principal on a remote machine as well. In this case, the blessing is not
281dumped to STDOUT but sent to the remote end. Use 'principal help recvblessings'
282for more details on that.
283
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700284When --remote-arg-file is specified, only the blessing extension is required, as
Suharsh Sivakumarab21eb02015-04-01 12:58:20 -0700285all other arguments will be extracted from the specified file.
286
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800287Usage:
Asim Shankar2a32dd22015-05-29 15:45:22 -0700288 principal bless [flags] [<principal to bless>] [<extension>]
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800289
290<principal to bless> represents the principal to be blessed (i.e., whose public
291key will be provided with a name). This can be either: (a) The directory
292containing credentials for that principal, OR (b) The filename (- for STDIN)
293containing any other blessings of that
294 principal,
295OR (c) The object name produced by the 'recvblessings' command of this tool
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700296 running on behalf of another principal (if the --remote-key and
297 --remote-token flags are specified).
298OR (d) None (if the --remote-arg-file flag is specified, only <extension> should
Suharsh Sivakumarab21eb02015-04-01 12:58:20 -0700299be provided
300 to bless).
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800301
302<extension> is the string extension that will be applied to create the blessing.
303
304The principal bless flags are:
305 -caveat=[]
306 "package/path".CaveatName:VDLExpressionParam to attach to this blessing
Asim Shankara0bba462015-02-20 22:50:51 -0800307 -for=0
308 Duration of blessing validity (zero implies no expiration caveat)
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700309 -remote-arg-file=
Suharsh Sivakumarab21eb02015-04-01 12:58:20 -0700310 File containing bless arguments written by 'principal recvblessings
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700311 -remote-arg-file FILE EXTENSION' command. This can be provided to bless in
Suharsh Sivakumar4bbe8ed2015-04-09 14:21:44 -0700312 place of --remote-key, --remote-token, and <principal>
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700313 -remote-key=
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800314 Public key of the remote principal to bless (obtained from the
315 'recvblessings' command run by the remote principal
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700316 -remote-token=
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800317 Token provided by principal running the 'recvblessings' command
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700318 -require-caveats=true
Asim Shankara0bba462015-02-20 22:50:51 -0800319 If false, allow blessing without any caveats. This is typically not advised
320 as the principal wielding the blessing will be almost as powerful as its
321 blesser
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800322 -with=
323 Path to file containing blessing to extend
324
Todd Wang1624bf92015-04-22 16:53:57 -0700325Principal set
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800326
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700327Commands to mutate the blessings of the principal.
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800328
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700329All input blessings are expected to be serialized using base64-VOM-encoding. See
330'principal get'.
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800331
332Usage:
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700333 principal set <command>
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800334
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700335The principal set commands are:
336 default Set provided blessings as default
337 forpeer Set provided blessings for peer
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800338
Todd Wang11440452015-05-29 18:05:29 -0700339Principal set default - Set provided blessings as default
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800340
341Sets the provided blessings as default in the BlessingStore specified by the
342environment that this tool is running in.
343
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700344It is an error to call 'set default' with blessings whose public key does not
345match the public key of the principal specified by the environment.
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800346
347Usage:
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700348 principal set default [flags] <file>
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800349
350<file> is the path to a file containing a blessing typically obtained from this
351tool. - is used for STDIN.
352
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700353The principal set default flags are:
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700354 -add-to-roots=true
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800355 If true, the root certificate of the blessing will be added to the
356 principal's set of recognized root certificates
357
Todd Wang11440452015-05-29 18:05:29 -0700358Principal set forpeer - Set provided blessings for peer
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800359
360Marks the provided blessings to be shared with the provided peers on the
361BlessingStore specified by the environment that this tool is running in.
362
363'set b pattern' marks the intention to reveal b to peers who present blessings
364of their own matching 'pattern'.
365
366'set nil pattern' can be used to remove the blessings previously associated with
367the pattern (by a prior 'set' command).
368
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700369It is an error to call 'set forpeer' with blessings whose public key does not
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800370match the public key of this principal specified by the environment.
371
372Usage:
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700373 principal set forpeer [flags] <file> <pattern>
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800374
375<file> is the path to a file containing a blessing typically obtained from this
376tool. - is used for STDIN.
377
378<pattern> is the BlessingPattern used to identify peers with whom this blessing
379can be shared with.
380
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700381The principal set forpeer flags are:
Suharsh Sivakumared5be1d2015-04-01 17:45:35 -0700382 -add-to-roots=true
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800383 If true, the root certificate of the blessing will be added to the
384 principal's set of recognized root certificates
385
Todd Wang1624bf92015-04-22 16:53:57 -0700386Principal get
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700387
388Commands to inspect the blessings of the principal.
389
390All blessings are printed to stdout using base64-VOM-encoding.
391
392Usage:
393 principal get <command>
394
395The principal get commands are:
Suharsh Sivakumar4bbe8ed2015-04-09 14:21:44 -0700396 default Return blessings marked as default
397 forpeer Return blessings marked for the provided peer
Suharsh Sivakumar2b22fc12015-04-15 19:38:04 -0700398 publickey Prints the public key of the principal.
Suharsh Sivakumar4bbe8ed2015-04-09 14:21:44 -0700399 recognizedroots Return recognized blessings, and their associated public key.
400 peermap Shows the map from peer pattern to which blessing name to
401 present.
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700402
Todd Wang11440452015-05-29 18:05:29 -0700403Principal get default - Return blessings marked as default
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700404
405Returns blessings that are marked as default in the BlessingStore specified by
Suharsh Sivakumar2b22fc12015-04-15 19:38:04 -0700406the environment that this tool is running in. Providing --names will print the
407default blessings' chain names. Providing --rootkey <chain_name> will print the
408root key of the certificate chain with chain_name. Providing --caveats
409<chain_name> will print the caveats on the certificate chain with chain_name.
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700410
411Usage:
Suharsh Sivakumar4bbe8ed2015-04-09 14:21:44 -0700412 principal get default [flags]
413
414The principal get default flags are:
Suharsh Sivakumar2b22fc12015-04-15 19:38:04 -0700415 -caveats=
416 Shows the caveats on the provided certificate chain name.
417 -names=false
Suharsh Sivakumar4bbe8ed2015-04-09 14:21:44 -0700418 If true, shows the value of the blessing name to be presented to the peer
Suharsh Sivakumar2b22fc12015-04-15 19:38:04 -0700419 -rootkey=
420 Shows the value of the root key of the provided certificate chain name.
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700421
Todd Wang11440452015-05-29 18:05:29 -0700422Principal get forpeer - Return blessings marked for the provided peer
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700423
424Returns blessings that are marked for the provided peer in the BlessingStore
Suharsh Sivakumar2b22fc12015-04-15 19:38:04 -0700425specified by the environment that this tool is running in. Providing --names
426will print the blessings' chain names. Providing --rootkey <chain_name> will
427print the root key of the certificate chain with chain_name. Providing --caveats
428<chain_name> will print the caveats on the certificate chain with chain_name.
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700429
430Usage:
Suharsh Sivakumar4bbe8ed2015-04-09 14:21:44 -0700431 principal get forpeer [flags] [<peer_1> ... <peer_k>]
Suharsh Sivakumar32c8e752015-03-31 19:26:28 -0700432
433<peer_1> ... <peer_k> are the (human-readable string) blessings bound to the
434peer. The returned blessings are marked with a pattern that is matched by at
435least one of these. If no arguments are specified, store.forpeer returns the
436blessings that are marked for all peers (i.e., blessings set on the store with
437the "..." pattern).
438
Suharsh Sivakumar4bbe8ed2015-04-09 14:21:44 -0700439The principal get forpeer flags are:
Suharsh Sivakumar2b22fc12015-04-15 19:38:04 -0700440 -caveats=
441 Shows the caveats on the provided certificate chain name.
442 -names=false
Suharsh Sivakumar4bbe8ed2015-04-09 14:21:44 -0700443 If true, shows the value of the blessing name to be presented to the peer
Suharsh Sivakumar2b22fc12015-04-15 19:38:04 -0700444 -rootkey=
445 Shows the value of the root key of the provided certificate chain name.
446
Todd Wang1624bf92015-04-22 16:53:57 -0700447Principal get publickey
Suharsh Sivakumar2b22fc12015-04-15 19:38:04 -0700448
449Prints out the public key of the principal specified by the environment that
450this tool is running in.
451
Asim Shankarde6fda52015-04-22 21:20:24 -0700452The key is printed as a base64 encoded bytes of the DER-format representation of
Asim Shankar562b2302015-04-27 13:52:43 -0700453the key (suitable to be provided as an argument to the 'recognize' command for
Asim Shankar1213ab22015-04-23 10:11:07 -0700454example).
Asim Shankarde6fda52015-04-22 21:20:24 -0700455
Asim Shankar1213ab22015-04-23 10:11:07 -0700456With --pretty, a 16-byte fingerprint of the key instead. This format is easier
457for humans to read and is used in output of other commands in this program, but
Asim Shankar562b2302015-04-27 13:52:43 -0700458is not suitable as an argument to the 'recognize' command.
Asim Shankarde6fda52015-04-22 21:20:24 -0700459
Suharsh Sivakumar2b22fc12015-04-15 19:38:04 -0700460Usage:
Asim Shankarde6fda52015-04-22 21:20:24 -0700461 principal get publickey [flags]
462
463The principal get publickey flags are:
464 -pretty=false
465 If true, print the key out in a more human-readable but lossy representation.
Suharsh Sivakumar4bbe8ed2015-04-09 14:21:44 -0700466
Todd Wang1624bf92015-04-22 16:53:57 -0700467Principal get recognizedroots
Suharsh Sivakumar4bbe8ed2015-04-09 14:21:44 -0700468
469Shows list of blessing names that the principal recognizes, and their associated
470public key. If the principal is operating as a client, contacted servers must
471appear on this list. If the principal is operating as a server, clients must
472present blessings derived from this list.
473
474Usage:
475 principal get recognizedroots
476
Todd Wang1624bf92015-04-22 16:53:57 -0700477Principal get peermap
Suharsh Sivakumar4bbe8ed2015-04-09 14:21:44 -0700478
479Shows the map from peer pattern to which blessing name to present. If the
480principal operates as a server, it presents its default blessing to all peers.
481If the principal operates as a client, it presents the map value associated with
482the peer it contacts.
483
484Usage:
485 principal get peermap
486
Todd Wang11440452015-05-29 18:05:29 -0700487Principal recognize - Add to the set of identity providers recognized by this principal
Asim Shankar562b2302015-04-27 13:52:43 -0700488
489Adds an identity provider to the set of recognized roots public keys for this
490principal.
491
492It accepts either a single argument (which points to a file containing a
493blessing) or two arguments (a name and a base64-encoded DER-encoded public key).
494
495For example, to make the principal in credentials directory A recognize the root
496of the default blessing in credentials directory B:
497 principal -v23.credentials=B bless A some_extension |
498 principal -v23.credentials=A recognize -
499The extension 'some_extension' has no effect in the command above.
500
501Or to make the principal in credentials directory A recognize the base64-encoded
502public key KEY for blessing pattern P:
503 principal -v23.credentials=A recognize P KEY
504
505Usage:
506 principal recognize <key|blessing> [<blessing pattern>]
507
508<blessing> is the path to a file containing a blessing typically obtained from
509this tool. - is used for STDIN.
510
511<key> is a base64-encoded, DER-encoded public key.
512
513<blessing pattern> is the blessing pattern for which <key> should be recognized.
514
Todd Wang11440452015-05-29 18:05:29 -0700515Principal help - Display help for commands or topics
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800516
517Help with no args displays the usage of the parent command.
518
519Help with args displays the usage of the specified sub-command or help topic.
520
521"help ..." recursively displays help for all commands and topics.
522
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800523Usage:
524 principal help [flags] [command/topic ...]
525
526[command/topic ...] optionally identifies a specific sub-command or help topic.
527
528The principal help flags are:
Todd Wang1624bf92015-04-22 16:53:57 -0700529 -style=compact
530 The formatting style for help output:
531 compact - Good for compact cmdline output.
532 full - Good for cmdline output, shows all global flags.
533 godoc - Good for godoc processing.
534 Override the default by setting the CMDLINE_STYLE environment variable.
Todd Wangf1550cf2015-05-11 10:58:41 -0700535 -width=<terminal width>
536 Format output to this target width in runes, or unlimited if width < 0.
537 Defaults to the terminal width if available. Override the default by setting
538 the CMDLINE_WIDTH environment variable.
Suharsh Sivakumar1d61f642015-02-17 20:56:14 -0800539*/
540package main