Whamcloud - gitweb
current branches now use lnet from HEAD
[fs/lustre-release.git] / lustre / sec / doc / remote_ugid_HLD.lyx
1 #LyX 1.3 created this file. For more info see http://www.lyx.org/
2 \lyxformat 221
3 \textclass article
4 \language english
5 \inputencoding auto
6 \fontscheme times
7 \graphics default
8 \paperfontsize 12
9 \spacing single 
10 \papersize Default
11 \paperpackage a4
12 \use_geometry 0
13 \use_amsmath 0
14 \use_natbib 0
15 \use_numerical_citations 0
16 \paperorientation portrait
17 \secnumdepth 3
18 \tocdepth 3
19 \paragraph_separation skip
20 \defskip medskip
21 \quotes_language english
22 \quotes_times 2
23 \papercolumns 1
24 \papersides 1
25 \paperpagestyle default
26
27 \layout Title
28
29 High Level Design of Remote UID/GID Handling
30 \layout Author
31
32 Peter Braam, Eric Mei
33 \layout Date
34
35 Jan 27, 2005
36 \layout Section
37
38 From the ERS (Engineering Requirements Spec, formerly Architecture)
39 \layout Itemize
40
41 Perform uid/gid translation between remote clients and local user database.
42 \layout Itemize
43
44 Handling client program calling setuid/setgid/setgroups syscalls to get
45  unusual previlege .
46 \layout Itemize
47
48 Handling supplementary groups membership.
49 \layout Itemize
50
51 Various security policies in situations with/without strong authentication
52  like Kerberos V5.
53 \layout Paragraph
54
55 NOTE:
56 \layout Itemize
57
58 remote clients may have different user database from that of MDS's.
59 \layout Itemize
60
61 The remote ACL issues is addressed by a separate module.
62 \layout Itemize
63
64 Most content of this document has been described in Lustre Book.
65 \layout Standard
66
67 The architecture prescribes a translation mechanism at the MDS: the MDS
68  will translate a locally found uid/gid, which is obtained through the kerberos
69  principal.
70 \layout Section
71
72 Functional Specification
73 \layout Subsection
74
75 Determine local/remote clients
76 \layout Itemize
77
78
79 \begin_inset Quotes eld
80 \end_inset 
81
82 local
83 \begin_inset Quotes erd
84 \end_inset 
85
86  client is the client node which is supposed to share the same user database
87  with MDS's.
88  
89 \layout Itemize
90
91
92 \begin_inset Quotes eld
93 \end_inset 
94
95 remote
96 \begin_inset Quotes erd
97 \end_inset 
98
99  client is the client node which is supposed to have different user database
100  from MDS's.
101  
102 \layout Standard
103
104 The MDS's will be able to determine that a client node is a local or remote
105  one, upon the client's first connection time to the MDS, and reply back
106  it's decision to client.
107  Later both MDS and client will make different operation decision according
108  to this flag.
109  This remote flag is per-client, not per user.
110  Once MDS made the decision, it will keep unchanged until client leave the
111  cluster membership (umount or so).
112 \layout Standard
113
114 MDS will do many conversion (mostly uid/gid mapping) for users on remote
115  clients because of the user database mismatch, and due to the nature of
116  this mismatch we have to put some limitation on users of remote clients,
117  compare to local clients.
118  Following sections have the details description.
119 \layout Subsection
120
121 Mapping uid/gid from clients
122 \layout Standard
123
124 For local client, obviously we don't need do any uid/gid mapping.
125  For remote clients, we need translate uid/gid in each request into one
126  which lives in local user database; and vice versa: translate uid/gid in
127  reply into the one in remote user database.
128  This translation affects the uid/gid's found in the inode as owner/group,
129  the security context which describes under what uid the MDS is executing
130  and in some cases (chown is a good example) the arguments of calls.
131 \layout Standard
132
133 Each MDS will have to access a uid-mapping database, which prescribed that:
134  which principal from which nid/netid should be mapped to which local uid.
135  The mapping database must be the same to every MDS to get consistent result.
136  During runtime, the a remote user authenticated with the MDS, the corresponding
137  mapping entry will be read from the on-disk database and cached in the
138  kernel via an upcall.
139  Note the same principal from different clients might be mapped to different
140  local user, according to the mapping database.
141  So on each MDS there's a per-client structure which maintained the uid
142  mapping cache.
143 \layout Standard
144
145 Each remote client must have nllu/nllg installed.
146  'nllu' is for 
147 \begin_inset Quotes eld
148 \end_inset 
149
150 Non Local Lustre User
151 \begin_inset Quotes erd
152 \end_inset 
153
154 , while 'nllg' for 
155 \begin_inset Quotes eld
156 \end_inset 
157
158 Non Local Lustre Group
159 \begin_inset Quotes erd
160 \end_inset 
161
162 .
163  When client firstly mount a lustre fileset, it should notify MDS which
164  local uid/gid act as nllu/nllg.
165  MDS will translate those unrecognized uid/gid to this before send reply
166  to client.
167  Thus from client's perspect of view, those files which belong to unauthorized
168  users will be shown as belonging to nllu/nllg.
169 \layout Subsection
170
171 Lustre security description (LSD)
172 \layout Standard
173
174 There's a security configure database on each MDS, which describes who(uid)
175  from where(nid/netid) have permission to setuid/setgid/setgroups.
176  Later we might add more into it.
177  the database must be the same to every MDS to get consistent result.
178 \layout Standard
179
180 LSD refers to the in-kernel data structure which describe an user's security
181  property on the MDS.
182  It roughly be defined as:
183 \layout LyX-Code
184
185 struct lustre_sec_desc {
186 \layout LyX-Code
187
188     uid_t            uid;
189 \layout LyX-Code
190
191     gid_t            gid;
192 \layout LyX-Code
193
194     supp_grp_t       supp_grp;
195 \layout LyX-Code
196
197     setxid_desc      setxid;
198 \layout LyX-Code
199
200     /* more security tags added here */
201 \layout LyX-Code
202
203 };
204 \layout Standard
205
206 In the future we'll add more special security tag into it.
207  Each LSD entry correspond to an user in the local user database.
208  the 'setxid_desc' must have the ability to describe setuid/setgid/setgroups
209  permission for different clients respectively.
210 \layout Standard
211
212 LSD cache is populated via an upcall during runtime.
213  The user-level helper will be feed in uid as a parameter, and found out
214  this uid's principal gid and supplementary groups from local user database,
215  and find setxid permission bits and other security tags from on-disk security
216  database.
217 \layout Standard
218
219 Each LSD entry have limited expiration time, and will be flushed out when
220  expired.
221  Next request come from this user will result in the LSD be populated again,
222  with the uptodate security settings if changed.
223  System administrator also could choose to flush certain user's LSD forcely.
224 \layout Standard
225
226 Every filesystem access request from client need go through checking of
227  LSD.
228  This checking is uid based, for those request coming from remote client,
229  uid will be mapped at first as described above, and then go to LSD.
230 \layout Subsection
231
232 The MDS security context 
233 \layout Standard
234
235 All kernel-level service threads running on MDS are running as root, waiting
236  request from other nodes, and provide services.
237  But for those request to access filesystem for certain user, those threads
238  must act as the user, running as its identities.
239  Thus such a request comes in, we firstly collect the identity information
240  for this user as above described, include uid, gid, etc., then switch the
241  identity in the process context before really execute the filesystem operation;
242  we also need switch the root directory of process to the root of MDS's
243  backend filesystem.
244  after it finished, we switch back to the original context, prepare to the
245  next service.
246 \layout Standard
247
248 For some request for special service like llog handling, special interaction
249  between MDSs, which don't represent any certain user, and require keeping
250  the root privilege.
251  In those situation we don't need do such context switch, also user identity
252  preparation.
253 \layout Subsection
254
255 Remote client cache flushing
256 \layout Standard
257
258 For a remote client, it should realize that those locally cached file's
259  owner information, e.g.
260  owner, group, is ever translated by server side, some mapping might be
261  stale as time goes on.
262  for example: a user newly authenticated, while some cached file which should
263  be owned by him still shows owner is 
264 \begin_inset Quotes eld
265 \end_inset 
266
267 nllu
268 \begin_inset Quotes erd
269 \end_inset 
270
271 .
272  client must choose the proper time to flush those stale owner informations,
273  to give user a consistent view.
274  All attribute locks held by clients must be given a revocation callback
275  when a new user connects.
276 \layout Section
277
278 Use Cases
279 \layout Subsection
280
281 Connect rpc from local realm (case 1)
282 \layout Enumerate
283
284 Alice doing 'mount'
285 \layout Enumerate
286
287 Alice sends the first ptlrpc request (MDS_CONNECT) without GSS security
288  to MDS;
289 \layout Enumerate
290
291 mds_handle() will initialize per-client structure, clear the remote flag
292  in it;
293 \layout Enumerate
294
295 After successful connection done, the MDS send the remote flag back to client
296  for future usage in client side.
297 \layout Subsection
298
299 Connect rpc from local realm (case 2)
300 \layout Enumerate
301
302 Alice doing 'mount'
303 \layout Enumerate
304
305 Alice from a MDS local realm sends the first ptlrpc request (MDS_CONNECT)
306  with GSS security to MDS;
307 \layout Enumerate
308
309 MDS svcgssd will determine it's from a local realm client;
310 \layout Enumerate
311
312 mds_handle() will initialize per-client structure, clear the remote flag
313  in it;
314 \layout Enumerate
315
316 After successful connection done, MDS will send the remote flag back to
317  client for future usage in client side.
318 \layout Subsection
319
320 Connect rpc from remote realm
321 \layout Enumerate
322
323 Alice from a MDS remote realm sends the first ptlrpc request (MDS_CONNECT)
324  with GSS security to MDS, along with its nllu/nllg id number;
325 \layout Enumerate
326
327 MDS svcgssd will determine it's from a remote realm client;
328 \layout Enumerate
329
330 mds_handle() logic will initialize per-client structure:
331 \begin_deeper 
332 \layout Enumerate
333
334 Set the remote flag in it;
335 \layout Enumerate
336
337 Fill in the nllu/nllg ids obtained from client rpc request;
338 \end_deeper 
339 \layout Enumerate
340
341 After successful connection done, the MDS will send the remote flag back
342  to client for future usage in client side.
343 \layout Subsection
344
345 Filesystem access request
346 \layout Enumerate
347
348 Alice (from local or remote client) try to access a file in lustre
349 \layout Enumerate
350
351 If Alice is from remote client, MDS do uid/gid mapping; otherwise do nothing
352 \layout Enumerate
353
354 MDS obtain LSD item for Alice
355 \layout Enumerate
356
357 MDS perform permission check, based on LSD policies.
358 \layout Enumerate
359
360 MDS service process switch to this user's context
361 \layout Enumerate
362
363 MDS finish the file operation on behave of Alice.
364 \layout Enumerate
365
366 MDS service process switch back original context
367 \layout Enumerate
368
369 If Alice is from remote client, MDS do uid/gid reserve mapping if needed.
370 \layout Enumerate
371
372 MDS send reply.
373 \layout Subsection
374
375 Rpc after setuid/setgid/setgroups from local clients
376 \layout Enumerate
377
378 Alice calls setuid/setgid/setgroups to change her identity to Bob in local
379  client node X;
380 \layout Enumerate
381
382 Bob (Alice in fact) tries to access a lustre file which belongs to Bob;
383 \layout Enumerate
384
385 MDS will verify the permission of Bob through local cached LSD configuration;
386 \layout Enumerate
387
388 MDS turns down or accept the file access request;
389 \layout Subsection
390
391 Rpc after setuid/setgid/setgroups from remote clients
392 \layout Enumerate
393
394 Alice calls setuid/setgid/setgroups to change her identity to Bob in remote
395  client node Y;
396 \layout Enumerate
397
398 Bob (Alice in fact) tries to access a lustre file which belongs to Bob;
399 \layout Enumerate
400
401 MDS will find Bob is from the remote realm and in fact he is not real Bob;
402 \layout Enumerate
403
404 MDS turns down the file access request;
405 \layout Subsection
406
407 Update LSD configuration in MDS
408 \layout Enumerate
409
410 Lustre system administrator hopes to update current LSD option;
411 \layout Enumerate
412
413 The sysadmin uses the lsd update utility which will update the on-disk security
414  database, and notify the changes of the LSD configuration to MDS;
415 \layout Enumerate
416
417 MDS re-fresh the cached LSD info through an upcall.
418 \layout Subsection
419
420 Revoke a local user
421 \layout Enumerate
422
423 Bob is able to access lustre filesystem
424 \layout Enumerate
425
426 Sysadmin remove Bob from the MDS's local user database, and flush in-kernel
427  LSD cache for Bob.
428 \layout Enumerate
429
430 Bob will not be able to access MDS immediately
431 \layout Subsection
432
433 Revoke a remote user
434 \layout Enumerate
435
436 Alice of a remote client is mapped to MDS local user Bob.
437 \layout Enumerate
438
439 Alice is able to access lustre filesystem
440 \layout Enumerate
441
442 Sysadmin remove the mapping 
443 \begin_inset Quotes eld
444 \end_inset 
445
446 Alice->Bob
447 \begin_inset Quotes erd
448 \end_inset 
449
450  from mapping database, and flush in-kernel mapping entry.
451 \layout Enumerate
452
453 Alice will not be able to access MDS immediately.
454 \layout Enumerate
455
456 If the mapping 
457 \begin_inset Quotes eld
458 \end_inset 
459
460 anyone else -> Carol
461 \begin_inset Quotes erd
462 \end_inset 
463
464  exist in the mapping database, Alice could reconnect to MDS and then will
465  be mapped to Carol.
466 \layout Subsection
467
468 Revoke a remote user (2)
469 \layout Enumerate
470
471 Alice of a remote client is mapped to MDS local user Bob.
472 \layout Enumerate
473
474 Alice is able to access lustre filesystem
475 \layout Enumerate
476
477 Sysadmin remove Bob from the MDS's local user database, and flush in-kernel
478  LSD cache for Bob.
479 \layout Enumerate
480
481 Alice will not be able to access MDS immediately.
482 \layout Enumerate
483
484 If the mapping 
485 \begin_inset Quotes eld
486 \end_inset 
487
488 anyone else -> Carol
489 \begin_inset Quotes erd
490 \end_inset 
491
492  exist in the mapping database, Alice could reconnect to MDS and then will
493  be mapped to Carol.
494 \layout Subsection
495
496 'ls -l' on remote client
497 \layout Enumerate
498
499 Suppose on a remote client, Alice's pricinpal group is AliceGrp; Bob's principal
500  groups is BobGrp.
501 \layout Enumerate
502
503 there's several files on lustre: file_1 belongs to Alice:AliceGrp; file_2
504  belongs to Alice:BobGrp; file_3 belongs to Bob:AliceGrp; file_4 belongs
505  to Bob:BobGrp; file_5 belongs to Bob:nllg;
506 \layout Enumerate
507
508 Alice do 'ls -l', output like this: file_1 belongs to Alice:AliceGrp; file_2
509  belongs to Alice:nllg; file_3 belongs to nllu:AliceGrp; file_4 belongs
510  to nllu:nllg; file_5 belongs to nllu:nllg;
511 \layout Enumerate
512
513 Bob just login the client system, also do a 'ls -l', output like this: file_1
514  belongs to Alice:AliceGrp; file_2 belongs to Alice:Bobgrp; file_3 belongs
515  to Bob:AliceGrp; file_4 belongs to Bob:BobGrp; file_5 belongs to Bob:nllg;
516 \layout Enumerate
517
518 Alice do 'ls -l' again, output is the same as Bob's list.
519 \layout Enumerate
520
521 Alice logout, then Bob do a 'ls -l' again, output like this: file_1 belongs
522  to nllu:nllg; file_2 belongs to nllu:Bobgrp; file_3 belongs to Bob:nllg;
523  file_4 belongs to Bob:BogGrp; file_5 belongs to Bob:nllg;
524 \layout Subsection
525
526 Chown on remote client
527 \layout Enumerate
528
529 Root user on a remote client want to change the owner of a file to Bob,
530  while Bob didn't login(authenticated with lustre) yet.
531 \layout Enumerate
532
533 MDS can't find the mapping for the destinated uid, so return error.
534 \layout Enumerate
535
536 Bob login at that time.
537 \layout Enumerate
538
539 Root do the same chown again.
540 \layout Enumerate
541
542 MDS will grant the request, no matter what the original owner of this file
543  is.
544 \layout Subsection
545
546 Chgrp on remote client
547 \layout Enumerate
548
549 Triditional chgrp on remote client is not allowed, since there's no clear
550  group id mapping between local and remote database.
551  so the group id on the remote client is not meaningful on the MDS.
552 \layout Section
553
554 Logic Specification
555 \layout Subsection
556
557 Specify nllu/nllg
558 \layout Standard
559
560 When client do mount, in addition to other parameter, user need supply with
561  the IDs of nllu/nllg on this client, which will be sent to the MDS at connectin
562 g time.
563  If no nllu/nllg explicitly supplied, default values will be used.
564 \layout Subsection
565
566 Determine local or remote client
567 \layout Standard
568
569 Under GSS protection, user could explicitly supply the remote flag during
570  mount time.
571  MDS make decision as following order:
572 \layout Itemize
573
574 All permitted connections without GSS security are from local realm clients.
575 \layout Itemize
576
577 All connections with GSS security, if user supplied remote flag during mount,
578  MDS will grant the flag as requested.
579 \layout Itemize
580
581 All connections with GSS/local_realm_kerberos are from local realm clients.
582 \layout Itemize
583
584 All connections with GSS/remote_realm_kerberos are from remote realm clients.
585 \layout Standard
586
587 Here we made the assumption that: kerberos's local/remote realm == lustre's
588  local/remote realm.
589  Later we might bring in more factors into this dicision making.
590 \layout Standard
591
592 GSS/Kerberos module is responsible to provide the information that the initial
593  connect request whether has strong security; whether from remote kerberos
594  realm.
595 \layout Standard
596
597 On MDS's, the per-client export structure has a flag to indicate local/remote
598  of this client.
599  Accordingly, each client has a similar flag, which is send back by MDS's
600  after initial connection.
601 \layout Subsection
602
603 Handle local rpc request
604 \layout Standard
605
606 For each filesystem access request from client, we will get LSD for this
607  uid at first.
608  We then lookup in the cache, if not found or already invalid, issue a upcall
609  to get it.
610  If finally failed to get LSD(timeout or got an error), we simply deny this
611  request.
612 \layout Standard
613
614 After obtained LSD, we also check whether the client intend to do setuid/setgid/
615 setgroups.
616  If yes, check the permission bits in LSD, if not allow we also deny this
617  request.
618  The intention of setuid/setgid could be detected by compare the uid, gid,
619  fsuid, fsgid sent by client, and the local authorized uid/gid.
620 \layout Standard
621
622 If setgroups is permitted: for root we'll directly use the supplementary
623  groups array sent by client; for normal user we compare those sent by client
624  with those in LSD, guarantee client only could reduce the array (can't
625  add new ids which is not part of group array in LSD).
626 \layout Standard
627
628 If setgroups is not permitted, we simply use the supplementary group array
629  provided by LSD.
630 \layout Standard
631
632 After all security context prepared as above, we switch it into process
633  context, perform the actual filesystem operation.
634  after finished, switch back the original context.
635  send reply out to client.
636 \layout Standard
637
638 Later an special security policy is needed to allow RAW access by FID without
639  a capability.
640  This is used for analyzing audit logs, finding pathnames from fids (for
641  recovery) etc.
642 \layout Subsection
643
644 Remote user mapping database
645 \layout Standard
646
647 There will be a user mapping configuration file on MDS, already defined
648  in 
649 \begin_inset Quotes eld
650 \end_inset 
651
652 functional specification
653 \begin_inset Quotes erd
654 \end_inset 
655
656 .
657  MDS kernel will also maintain a cache of this mapping information.
658  It is populated by upcall to server side gss daemon, along with the gss
659  credential information.
660  
661 \layout Itemize
662
663 The on-disk mapping database only described how user(principal) is mapped
664  to an local uid, and don't need specify the gid mapping.
665 \layout Itemize
666
667 Both on-disk mapping database and kernel mapping cache should be able to
668  allow map all other remote users to a certain local user.
669 \layout Itemize
670
671 On the MDS, the per-client structure will maintain this mapping cache.
672  When a user from remote client get authenticated, we check the on-disk
673  mapping database.
674  If no mapping items for this user found, we'll deny this user.
675  otherwise we record the target uid.
676 \layout Itemize
677
678 When a fs access request come from remote client, it contains the user's
679  uid, gid on the remote client.
680  Here we can establish mapping for uid and target uid.
681  With target uid we can find the target gid from local user database (from
682  LSD), thus we can also establish the mapping for gid and target gid.
683 \layout Itemize
684
685 With mapping we established above, we now do the mapping: replace the uid/gid
686  in the rpc request with target uid/gid.
687  If it request chown we also check & map the new owner id.
688 \layout Itemize
689
690 When reply populated and about to send back, we again check the mapping
691  cache, and do the reverse mapping if in the case which return file attributes
692  to clients.
693  For those can't find the matched items, map them to nllu/nllg of this remote
694  client.
695 \layout Subsection
696
697 Handle remote rpc request
698 \layout Standard
699
700 The overall process of handle remote rpc request is the same as for local
701  user, except following:
702 \layout Itemize
703
704 For incoming request, firstly do the uid/gid mapping for the requestor;
705  and do reserve mapping for the reply, as described above.
706 \layout Itemize
707
708 No setuid/setgid/setgroups intention is permitted, except we explicitly
709  allow setuid-root in setxid database.
710  And so we ignore the supplementary groups sent by client(if any), and simply
711  use the one provided by LSD.
712 \layout Itemize
713
714 For chown request, we also do translation for the new owner id (already
715  described above) according to the in-kernel mapping cache.
716  It means the root user on remote client can't change owner of a file to
717  a user which is not login yet.
718 \layout Itemize
719
720 Deny all chgrp request, since the group on remote client has no clear mapping
721  on MDS's local user database (We also could choose allow this when the
722  new group id showup in the in-kernel mapping cache, but it seems dosen't
723  make much sense).
724  So we probably need a special tool like 
725 \begin_inset Quotes eld
726 \end_inset 
727
728 lfs chgrp
729 \begin_inset Quotes erd
730 \end_inset 
731
732  to perform chgrp on remote client, which will send out text name instead
733  of translate to id locally.
734 \layout Subsection
735
736 Remote client cache flushing
737 \layout Standard
738
739 Anytime there might be inodes cached and their owner belongs to nllu/nllg.
740  If a new user Alice get authenticated and she happens to be the owner of
741  those inodes, we need to refresh those inode even if it's cache status
742  is correct, otherwise Alice will find her files belong to others.
743  Since we don't know whether a inode with nllu/nllg belongs to Alice or
744  not, we must flush all of them.
745 \layout Standard
746
747 On MDS, a callback or similar event notification mechanism should be hooked
748  into gss module.
749  When a user authenticated at the first time, we should iterate through
750  all the granted lock corresponding to this client, and revoke them selectively.
751  Strictly speaking we only want to revoke those inodebits lock and the owner/gro
752 up of their resource (inode) not show up in the in-kernel mapping database,
753  but here we just flush all the inodebits locks, a cache is quickly re-populated
754  - there are a maximum of 20-100 cached locks on clients at the moment.
755 \layout Standard
756
757 When Alice logs out of the client system, we also do the similar things:
758  iterate through all the granted lock corresponding to this client, and
759  revoke them selectively.
760  Here we want to revoke those inodebits locks and the owner/group of their
761  resource(inode) is Alice.
762  We also could choose flush all of them like above case.
763 \layout Subsection
764
765 LSD upcall
766 \layout Standard
767
768 There is a general upcall-cache code which do upcall into user space, and
769  cache data passed down in kernel, and also implemented timeout invalidation.
770  Kernel LSD could simply be implemented as a instance of it.
771  So it will be quite simple.
772 \layout Standard
773
774 A user-space tools should provide following functionality:
775 \layout Itemize
776
777 Accept uid as parameter
778 \layout Itemize
779
780 Obtian gid and supplementary groups id array which the uid belongs to, if
781  failed just return error.
782 \layout Itemize
783
784 Obtian the setxid permission bits for this user on this NID from database.
785  If not found a default bitset will be applied: (1) for local client: setuid/set
786 gid is off, setgroups for root is off, setgroups for normal user is on;
787  (2) for remote client: all of setuid/setgid/setgroups is off.
788 \layout Itemize
789
790 Pass all the collected information back to kernel by /proc.
791 \layout Standard
792
793 Since the upcall could happen concurrently, and admin could modified it
794  at anytime, so a kind of read-write lock need to be done on the database
795  file.
796 \layout Subsection
797
798 Recovery consideration
799 \layout Standard
800
801 All the code here should have minimal effect on recovery.
802  After MDS's crash, security context will be established during connection
803  time in recovery; and uid-mapping cache and LSD actually are 
804 \begin_inset Quotes eld
805 \end_inset 
806
807 adaptive
808 \begin_inset Quotes erd
809 \end_inset 
810
811 , they will also be re-populated when handling related user's replay request
812  during/after recovery.
813 \layout Section
814
815 State Management
816 \layout Subsection
817
818 configuration states
819 \layout Itemize
820
821 Client has a remote flag at mount time.
822 \layout Itemize
823
824 Remote clients must have nllu:nllg installed.
825  it could simply be nobody:nobody.
826 \layout Itemize
827
828 MDS could have a remote-user mapping database which contains which principal
829  at with client should be mapped to which local user.
830  Without the database no remote client is allowed to connect.
831 \layout Itemize
832
833 MDS could have a security database which contains setxid permissions along
834  with other security setting for each affected user.
835  No such database then a default setting will be applied.
836 \layout Subsection
837
838 LSD entry states transition
839 \layout Enumerate
840
841 NEW: generated and submit to upcall
842 \layout Enumerate
843
844 READY: ready to serve
845 \layout Enumerate
846
847 INVALID: expired or error
848 \layout Standard
849
850 Requestor will initiate an NEW LSD entry; after upcall successfully fill
851  in data it change to READY; if timeout or some error happen (e.g.
852  not found in user database) during upcall it change to INVALID; a READY
853  LSD will change to INVALID when expired, or flushed forcely by sysadmin,
854  or MDS shutdown; an INVALID LSD will be soon destroied.
855 \layout Standard
856
857 No disk format changed.
858  When a large number of users access lustre from all kinds of local/remote
859  clients at the same time, MDS will have more CPU and memory overhead, especiall
860 y for remote users.
861  No special recovery consideration.
862  
863 \layout Section
864
865 Alternatives
866 \layout Subsection
867
868 NFSv4
869 \layout Standard
870
871 NFSv4 sends user and groups by name.
872 \layout Section
873
874 Focus of Inspection
875 \layout Itemize
876
877 Could this pass HP acceptance test?
878 \layout Itemize
879
880 Any is not reasonable? Any security hole?
881 \layout Itemize
882
883 Everything recoverable from MDS/client crash?
884 \the_end