forsyth20121205-174063a80cc13 years agoHistory
126 lines · 2.7 KB · Text
RawDownload
.TH KEYFS 4.SH NAMEkeyfs \- encrypted key storage.SH SYNOPSIS.B auth/keyfs[.B -D][.BI -m " mountpoint"] [.BI -n " nvram"] [.I keyfile].SH DESCRIPTION.I Keyfsserves a two-level name space for storing authentication data, specificallythe status and secrets of each user to whom.IR logind (8)can issue a certificate.The data is stored in.I keyfile(default:.BR /keydb/keys ),encrypted by a master key using AES(see.IR keyring-crypt (2))..I Keyfsshould be started only on the machine acting as authentication server (signer),before a listener is started for.IR signer (8).Note that.I signerand.I keyfsmust share the name space.Furthermore, no other application except the console should see that name space..PP.I Keyfsprompts for the master key, reads and decrypts.IR keyfile ,and serves files representing the contents at.I mountpointin the name space (default:.BR /mnt/keys )..PPEach.I userin.I keyfileis represented by a directory.IB mountpoint / user.Each such directory has the following files:.TF status.TP.B logA count of the number of failed authentications.Writing.B badto the file increments the count; writing.B goodresets it to 0.When the count reaches some implementation-defined limit,the account status is set to.B disabled(see the.B statusfile below)..TP.B expireThe time in seconds since the epoch when the account will expire,or the text.B neverif it has no expiration time.The string.B neveror a number can be written to the file to set a new expiry time..TP.B secretThe secret (supposedly) known only to the user and the authentication service.A secret is any sequence of bytes between 0 and 255 bytes long;it is initially empty.The length of the file returned by.IR sys-stat (2)is the length of the secret.If the account has expired or is disabled, an attempt to read the filewill give an error..TP.B statusThe current status of the user's account, either.B okor.BR disabled .Either string can be written to the file to change the state accordingly..PD.PPTo add a new account, make a directory with that name in.IR mountpoint .It must not already exist.To remove an account, remove the corresponding directory;to rename an account, rename the directory..PPAll changes made via file system operations in.I mountpointresult in appropriate changes to.IR keyfile ..PD.PPIf the.B -noption is given, instead of prompting for the master key,.I keyfswill read it from the file.IR nvram .Obviously that file should be well-protected from ordinary observers..PPThe.B -Doption enables tracing of the file service protocol, for debugging..SH SOURCE.B /appl/cmd/auth/keyfs.b.SH SEE ALSO.IR changelogin (8),.IR logind (8),.IR signer (8)