Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# Authors: # Pavel Zuna <pzuna@redhat.com> # # Copyright (C) 2010 Red Hat # see file 'COPYING' for use and warranty information # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>.
Kerberos ticket policy
There is a single Kerberos ticket policy. This policy defines the maximum ticket lifetime and the maximum renewal age, the period during which the ticket is renewable.
You can also create a per-user ticket policy by specifying the user login.
For changes to the global policy to take effect, restarting the KDC service is required, which can be achieved using:
service krb5kdc restart
Changes to per-user policies take effect immediately for newly requested tickets (e.g. when the user next runs kinit).
EXAMPLES:
Display the current Kerberos ticket policy: ipa krbtpolicy-show
Reset the policy to the default: ipa krbtpolicy-reset
Modify the policy to 8 hours max life, 1-day max renewal: ipa krbtpolicy-mod --maxlife=28800 --maxrenew=86400
Display effective Kerberos ticket policy for user 'admin': ipa krbtpolicy-show admin
Reset per-user policy for user 'admin': ipa krbtpolicy-reset admin
Modify per-user policy for user 'admin': ipa krbtpolicy-mod admin --maxlife=3600 """)
# FIXME: load this from a config file? 'krbmaxticketlife': 86400, 'krbmaxrenewableage': 604800, }
""" Kerberos Ticket Policy object """
Str('uid?', cli_name='user', label=_('User name'), doc=_('Manage ticket policy for specific user'), primary_key=True, ), Int('krbmaxticketlife?', cli_name='maxlife', label=_('Max life'), doc=_('Maximum ticket life (seconds)'), minvalue=1, ), Int('krbmaxrenewableage?', cli_name='maxrenew', label=_('Max renew'), doc=_('Maximum renewable age (seconds)'), minvalue=1, ), )
# disable all flag # ticket policies are attached to objects with unrelated attributes options['all'] = False
# disable all flag # ticket policies are attached to objects with unrelated attributes options['all'] = False
# if policy for a specific user isn't set, display global values if 'krbmaxticketlife' not in entry_attrs or \ 'krbmaxrenewableage' not in entry_attrs: res = self.api.Command.krbtpolicy_show() for a in self.obj.default_attributes: entry_attrs.setdefault(a, res['result'][a])
# if reseting policy for a user - just his values for a in self.obj.default_attributes: def_values[a] = None # if reseting global policy - set values to default else:
# policy for user was deleted, retrieve global policy dn = self.obj.get_dn(None)
return dict(result=entry_attrs, value=keys[-1])
|