Whamcloud - gitweb
LU-17705 ptlrpc: replace synchronize_rcu() with rcu_barrier()
[fs/lustre-release.git] / lustre / doc / lgss_sk.8
1 .TH lgss_sk 8 "2016 Jan 12" Lustre "configuration utilities"
2 .SH NAME
3 lgss_sk \- Lustre GSS Shared-Key tool
4 .SH SYNOPSIS
5 .B "lgss_sk [OPTIONS] {-r|-w|-m|-l} <keyfile>"
6 .br
7 .SH DESCRIPTION
8 .B lgss_sk
9 can be used to read, write, modify, and load the contents of a shared-key keyfile.
10 .SH OPTIONS
11 .B lgss_sk
12 accepts the following options:
13 .TP
14 .I "-l, --load <keyfile>"
15 Load key from file into user's session keyring.
16 .TP
17 .I "-m, --modify <keyfile>"
18 Modify a file's key attributes.
19 .TP
20 .I "-r, --read <keyfile>"
21 Show file's key attributes.
22 .TP
23 .I "-w, --write <keyfile>"
24 Generate key file.
25 .HP
26 Modify/Write Options:
27 .TP
28 .I "-c, --crypt <num>"
29 Cipher for encryption (Default: AES-256-CTR)
30 .RS
31 AES-256-CTR
32 .RE
33 .TP
34 .I "-i, --hmac <num>"
35 Hash algorithm for integrity (Default: SHA256)
36 .RS
37 SHA256
38 .br
39 SHA512
40 .RE
41 .TP
42 .I "-e, --expire <num>"
43 Seconds before session contexts generated from key expire and are regenerated
44 (Default: 604800 seconds (7 days)).
45 .TP
46 .I "-f, --fsname <name>"
47 File system name for key.
48 .TP
49 .I "-g, --mgsnids <nids>"
50 Comma seperated list of MGS NIDs.  Only required when mgssec is used (Default: "").
51 .TP
52 .I "-n, --nodemap <name>"
53 Nodemap name for key (Default: "default").
54 .TP
55 .I "-p, --prime-bits <len>"
56 Length of prime (p) in bits used for the DHKE (Default: 2048).  This is
57 generated only for client keys and can take a while to generate.  For server
58 and MGS keys this value also sets the minimum acceptable prime length from a
59 client.  If a client attempts to connect with a smaller prime it will reject
60 the connection.  In this way servers can "guarantee" the minimum encryption
61 level acceptable.
62 .TP
63 .I "-t, --type <type>"
64 The type is a mandatory parameter for writing a key and optional for modifying.
65 Valid key types:
66 .nf
67 mgs    - is used for the MGS where --mgssec is used
68 server - for MDS or OSS servers
69 client - For clients as well as servers who communicate with other servers in a
70          client context (e.g. MDS communication with OSTs)
71 .fi
72 .TP
73 .I "-k, --shared <len>"
74 Shared key length in bits (Default: 256).
75 .TP
76 .I "-d, --data <file>"
77 Shared key entopy data source (default: /dev/random).  It is possible to
78 use /dev/urandom for testing, but this may provide less security in some
79 cases.  You may need to press keys on the keyboard or move the mouse
80 (if directly attached to the system) or cause disk IO (if system is remote),
81 in order to generate entropy for the key if there is not a hardware random
82 number generator on the system.
83 .HP
84 Other Options:
85 .TP
86 .I "-v, --verbose"
87 Increase verbosity for errors.
88 .SH NOTES
89 The key file is generally the same for client and servers with a few exceptions:
90 .IP
91 .nf
92 1. Types can differ
93 2. Both have the prime length but only client keys will have the actual prime
94    value populated.
95 .fi
96 .LP
97 Therefore a
98 .B server
99 or
100 .B mgs
101 key can be distributed to a client but the clients
102 must change the type to generate a prime.
103 .HP
104 .SH EXAMPLES
105 Create a key for file system
106 .B tank
107 for nodemap
108 .B biology
109 with type server.
110 Once on the client the file should be modified to reflect that it is of type
111 .B client
112 and will also generate a prime for the key.
113 .IP
114 .nf
115 [root@server ~]# lgss_sk -f tank -n biology -t server -w tank.server.biology.key
116 [root@server ~]# scp tank.server.biology.key user@client:tank.client.biology.key
117
118 [root@client ~]# lgss_sk -t client -m tank.client.biology.key
119 .fi
120 .LP
121 Add MGS NIDs to existing key:
122 .IP
123 .nf
124 [root@server ~]# lgss_sk -g 192.168.1.101@tcp,10.10.0.101@o2ib \\
125 -m tank.server.biology.key
126
127 [root@client ~]# lgss_sk -g 192.168.1.101@tcp,10.10.0.101@o2ib \\
128 -m tank.client.biology.key
129 .fi
130 .LP
131 Show key attributes:
132 .IP
133 .nf
134 [root@server ~]# lgss_sk -r tank.server.biology.key
135 Version:        1
136 Type:           server
137 HMAC alg:       SHA256
138 Crypto alg:     AES-256-CTR
139 Ctx Expiration: 604800 seconds
140 Shared keylen:  256 bits
141 Prime length:   2048 bits
142 File system:    tank
143 MGS NIDs:       192.168.1.101@tcp 10.10.0.101@o2ib
144 Nodemap name:   biology
145 Shared key:
146   0000: c160 00c6 e5ba 11df 50cb c420 ae61 c1b3  .`......P.. .a..
147   0010: c76e 5a82 ce48 fde9 d319 ce26 cfc4 b91e  .nZ..H.....&....
148
149 [root@client ~]# lgss_sk -r tank.client.biology.key
150 Version:        1
151 Type:           client
152 HMAC alg:       SHA256
153 Crypto alg:     AES-256-CTR
154 Ctx Expiration: 604800 seconds
155 Shared keylen:  256 bits
156 Prime length:   2048 bits
157 File system:    tank
158 MGS NIDs:       192.168.1.101@tcp 10.10.0.101@o2ib
159 Nodemap name:   biology
160 Shared key:
161   0000: c160 00c6 e5ba 11df 50cb c420 ae61 c1b3  .`......P.. .a..
162   0010: c76e 5a82 ce48 fde9 d319 ce26 cfc4 b91e  .nZ..H.....&....
163 Prime (p) :
164   0000: be19 9412 a4c5 3355 9963 ebdf 3fce a5d8  ......3U.c..?...
165   0010: 9776 50db 70b1 1ad4 a22b 3b68 2ae6 fb7a  .vP.p....+;h*..z
166   0020: 803b 2f67 e6ee cd55 3df1 afbd 4e3a b620  .;/g...U=...N:. 
167   0030: 1d86 4182 bb03 d9b5 9605 658e 4dfb 6d39  ..A.......e.M.m9
168   0040: 0394 b789 437f d30b 3fc0 2c7f 42bb 1987  ....C...?.,.B...
169   0050: 0837 bae1 5332 4992 3a0c 9d01 d350 c2bb  .7..S2I.:....P..
170   0060: ed25 27e9 5439 f295 4c04 08cd bcfe 7e0b  .%'.T9..L.....~.
171   0070: 542b e80b 2fb5 eed0 9ca8 f9bc a792 baf1  T+../...........
172   0080: db1a af08 cee7 7b7f f3e4 7f14 71ca b7c9  ......{.....q...
173   0090: 9d07 c24b 8f04 65e3 4c8c fdd5 6e70 641d  ...K..e.L...npd.
174   00a0: af24 a48a b1c7 d2ff 9fee 158e 7025 6d81  .$..........p%m.
175   00b0: a54f 48f9 712f cac3 28fb 426c 330b 07ff  .OH.q/..(.Bl3...
176   00c0: c4a4 cb67 a46b cc57 1846 dc9d 4ce4 fa65  ...g.k.W.F..L..e
177   00d0: 7fc6 e77d 1220 b807 6c7c 5660 b703 39d2  ...}. ..l|V`..9.
178   00e0: 1d99 bd89 e2f1 3e40 74a1 709c 6e6c 6624  ......>@t.p.nlf$
179   00f0: fad6 97bf c3e0 b0d4 cefc 3596 dd69 5223  ..........5..iR#
180
181 .fi
182 .br
183 .SH "SEE ALSO"
184 .BR nids (5)