Generating a Service with Impersonation Ticket
Describes how to generate and manage impersonation tickets.
Impersonation allows a user to access data and submit jobs on behalf of another user. You may
want to allow users, other than the mapr user, to impersonate other users. You can use the
maprlogin
utility to generate a "servicewithimpersonation ticket" that can
be used to access a secure cluster impersonating another user. That is, the
servicewithimpersonation ticket provides the user the ability to impersonate other users
(except the mapr user) in addition to the ability to access a secure cluster. This type of
ticket can only be generated by a user with full control on a cluster's Access Control List
(ACL).
If this type of ticket is generated and saved in the location specified with the
-out
option, after generating the ticket, do the following:
- Reset the permissions on the ticket to grant the user, for whom the ticket was generated, read permissions on the ticket.
- Set the
MAPR_TICKETFILE_LOCATION
environmental variable to point to the ticket file location specified with the-out
option if the path specified with the-out
option was not/tmp/maprticket_<uid>
.
This type of ticket, similar to a service ticket, has a specified duration (expiration), a renewal period (maximum lifetime), and a location where the ticket is safely stored. It grants the specified user the ability to impersonate other users, except the mapr user.
The default duration for this type of ticket is LIFETIME and the duration is not bounded by the CLDB duration properties. Short duration and renewal values may be used for security reasons, but much longer lifetimes are supported for ease of administration.
For example:
# maprlogin generateticket -type servicewithimpersonation -user mapruser1 -out /var/tmp/impersonation_ticket -duration 30:0:0 -renewal 90:0:0
The above command generates a service with impersonation ticket that expires after 30 days
and is stored in /var/tmp/impersonation_ticket
. The ticket may be renewed at
any time before the 30 days pass and can be extended up to a maximum of 90 days. The ticket
must be renewed explicitly before its expiration date; it does not renew automatically when it
expires.