| < wallet-backend Manual Page | Russ Allbery > Software > wallet | keytab-backend Manual Page > |
(Wallet server for storing and retrieving secure data)
wallet-backend [-q] command [args ...]
wallet-backend implements the interface between remctld and the wallet system. It is written to run under remctld and expects the authenticated identity of the remote user in the REMOTE_USER environment variable. It uses REMOTE_HOST or REMOTE_ADDR if REMOTE_HOST isn't set for additional trace information. It accepts the command from remctld on the command line, creates a Wallet::Server object, and calls the appropriate methods.
This program is a fairly thin wrapper around Wallet::Server that
translates command strings into method calls and returns the results. It
does check all arguments except for the <data> argument to the store
command and rejects any argument not matching
^[\w_/.-]+\z; in other words, only
alphanumerics, underscore (_), slash (/), period (.),
and hyphen (-) are permitted in arguments. This provides some
additional security over and above the checking already done by the rest
of the wallet code.
If this option is given, wallet-backend will not log its actions to syslog.
Most commands are only available to wallet administrators (users on the
ADMIN ACL). The exceptions are autocreate, get,
store, show, destroy, flag clear, flag
set, getattr, setattr, and history. All of those
commands have their own ACLs except getattr and history,
which use the show ACL, and setattr, which uses the
store ACL. If the appropriate ACL is set, it alone is checked to
see if the user has access. Otherwise, get, store,
show, getattr, setattr, and history access is
permitted if the user is authorized by the owner ACL of the object.
autocreate is permitted if the user is listed in the default ACL
for an object for that name.
Administrators can run any command on any object or ACL except for
get and store. For get and store, they must
still be authorized by either the appropriate specific ACL or the owner
ACL.
If the locked flag is set on an object, no commands can be run on that
object that change data except the flags commands, nor can the
get command be used on that object. show, history,
getacl, getattr, and owner or expires without
an argument can still be used on that object.
For more information on attributes, see ATTRIBUTES.
Adds an entry with <scheme> and <identifier> to the ACL <id>. <id> may be either the name of an ACL or its numeric identifier.
Create a new, empty ACL with name <name>. When setting an ACL on an
object with a set of entries that don't match an existing ACL, first
create a new ACL with acl create, add the appropriate entries to it
with acl add, and then set the ACL on an object with the
owner or setacl commands.
Destroy the ACL <id>. This ACL must no longer be referenced by any object
or the ACL destruction will fail. The special ACL named ADMIN
cannot be destroyed.
Display the history of the ACL <id>. Each change to the ACL (not including changes to the name of the ACL) will be represented by two lines. The first line will have a timestamp of the change followed by a description of the change, and the second line will give the user who made the change and the host from which the change was mde.
Remove the entry with <scheme> and <identifier> from the ACL <id>. <id>
may be either the name of an ACL or its numeric identifier. The last
entry in the special ACL ADMIN cannot be removed to protect against
accidental lockout, but administrators can remove themselves from the
ADMIN ACL and can leave only a non-functioning entry on the ACL.
Use caution when removing entries from the ADMIN ACL.
Display the name, numeric ID, and entries of the ACL <id>.
Create a new object of type <type> with name <name>. The user must be listed in the default ACL for an object with that type and name, and the object will be created with that default ACL set as the object owner.
Check whether an object of type <type> and name <name> already exists. If
it does, prints yes; if not, prints no.
Create a new object of type <type> with name <name>. With some backends,
this will trigger creation of an entry in an external system as well. The
new object will have no ACLs and no owner set, so usually the
administrator will want to then set an owner with owner so that the
object will be usable.
Destroy the object identified by <type> and <name>. With some backends, this will trigger destruction of an object in an external system as well.
If <date> is not given, displays the current expiration of the object
identified by <type> and <name>, or No expiration set if none is
set. The expiration will be displayed in seconds since epoch.
If <date> is given, sets the expiration on the object identified by <type>
and <name> to <date> and (if given) <time>. <date> must be in the format
YYYY-MM-DD and <time> in the format HH:MM:SS. If <date> is
the empty string, clears the expiration of the object.
Currently, the expiration of an object is not used.
Clears the flag <flag> on the object identified by <type> and <name>.
Sets the flag <flag> on the object identified by <type> and <name>.
Recognized flags are locked, which prevents all further actions on
that object until the flag is cleared, and unchanging, which tells
the object backend to not generate new data on get but instead return the
same data as previously returned. The unchanging flag is not
meaningful for objects that do not generate new data on the fly.
Prints to standard output the data associated with the object identified by <type> and <name>. This may trigger generation of new data and invalidate old data for that object depending on the object type.
Prints the ACL <acl>, which must be one of get, store,
show, destroy, or flags, for the object identified by
<type> and <name>. Prints No ACL set if that ACL isn't set on that
object. Remember that if the get, store, or show
ACLs aren't set, authorization falls back to checking the owner ACL. See
the owner command for displaying or setting it.
Prints the object attribute <attr> for the object identified by <type> and <name>. Attributes are used to store backend-specific information for a particular object type, and <attr> must be an attribute type known to the underlying object implementation. The attribute values, if any, are printed one per line. If the attribute is not set on this object, nothing is printed.
Displays the history for the object identified by <type> and <name>. This human-readable output will have two lines for each action that changes the object, plus for any get action. The first line has the timestamp of the action and the action, and the second line gives the user who performed the action and the host from which they performed it.
If <owner> is not given, displays the current owner ACL of the object
identified by <type> and <name>, or No owner set if none is set.
The result will be the name of an ACL.
If <owner> is given, sets the owner of the object identified by <type> and <name> to <owner>. If <owner> is the empty string, clears the owner of the object.
Sets the ACL <acl>, which must be one of get, store,
show, destroy, or flags, to <id> on the object
identified by <type> and <name>. If <id> is the empty string, clears that
ACL on the object.
Sets the object attribute <attr> for the object identified by <type> and
<name>. Attributes are used to store backend-specific information for a
particular object type, and <attr> must be an attribute type known to the
underlying object implementation. To clear the attribute for this object,
pass in a <value> of the empty string ('').
Displays the current object metadata for the object identified by <type> and <name>. This human-readable output will show the object type and name, the owner, any specific ACLs set on the object, the expiration if any, and the user, remote host, and time when the object was created, last stored, and last downloaded.
Stores <data> for the object identified by <type> and <name> for later
retrieval with get. Not all object types support this.
Currently, <data> is limited to not containing nul characters and may therefore not be binary data, and is limited by the maximum command line length of the operating system of the wallet server. These restrictions will be lifted in the future.
Object attributes store additional properties and configuration
information for objects stored in the wallet. They are displayed as part
of the object data with show, retrieved with getattr, and
set with setattr.
Keytab objects support the following attributes:
Restricts the generated keytab to a specific set of encryption types. The
values of this attribute must be enctype strings recognized by Kerberos
(strings like aes256-cts or des-cbc-crc). Note that the
salt should not be included; since the salt is irrelevant for keytab keys,
it will always be set to normal by the wallet.
If this attribute is set, the specified enctype list will be passed to ktadd when get() is called for that keytab. If it is not set, the default set in the KDC will be used.
This attribute is ignored if the unchanging flag is set on a
keytab. Keytabs retrieved with unchanging set will contain all
keys present in the KDC for that Kerberos principal and therefore may
contain different enctypes than those requested by this attribute.
Sets the external systems to which the key of a given principal is
synchronized. The only supported value for this attribute is
kaserver, which says to synchronize the key with an AFS Kerberos v4
kaserver.
If this attribute is set on a keytab, whenever the get command is
run for that keytab, the DES key will be extracted from that keytab and
set in the configured AFS kaserver. The Kerberos v4 principal name will
be the same as the Kerberos v5 principal name except that the components
are separated by . instead of /; the second component is
truncated after the first . if the first component is one of
host, ident, imap, pop, or smtp; and
the first component is rcmd if the Kerberos v5 principal component
is host. The principal name must not contain more than two
components.
If this attribute is set, calling destroy will also destroy the
principal from the AFS kaserver, with a principal mapping determined as
above.
Wallet::Server(3), remctld(8)
This program is part of the wallet system. The current version is available from <http://www.eyrie.org/~eagle/software/wallet/>.
Russ Allbery <rra@stanford.edu>
| < wallet-backend Manual Page | Russ Allbery > Software > wallet | keytab-backend Manual Page > |