mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-11-03 04:40:31 -06:00
Add authentication indicators support to Host objects
https://fedorahosted.org/freeipa/ticket/433 Reviewed-By: Sumit Bose <sbose@redhat.com> Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
1 parent
fed9d9aaa7
commit
0855b014b1
3 files changed
+24
-6
No files matched your search
@@ -295,7 +295,7 @@ class host(LDAPObject):
|
||||
'fqdn', 'description', 'l', 'nshostlocation', 'krbprincipalname',
|
||||
'nshardwareplatform', 'nsosversion', 'usercertificate', 'memberof',
|
||||
'managedby', 'memberofindirect', 'macaddress',
|
||||
'userclass', 'ipaallowedtoperform', 'ipaassignedidview',
|
||||
'userclass', 'ipaallowedtoperform', 'ipaassignedidview', 'krbprincipalauthind'
|
||||
]
|
||||
uuid_attribute = 'ipauniqueid'
|
||||
attribute_members = {
|
||||
@@ -530,6 +530,14 @@ class host(LDAPObject):
|
||||
label=_('Assigned ID View'),
|
||||
flags=['no_option'],
|
||||
),
|
||||
Str('krbprincipalauthind*',
|
||||
cli_name='auth_ind',
|
||||
label=_('Authentication Indicators'),
|
||||
doc=_("Defines a whitelist for Authentication Indicators."
|
||||
" Use 'otp' to allow OTP-based 2FA authentications."
|
||||
" Use 'radius' to allow RADIUS-based 2FA authentications."
|
||||
" Other values may be used for custom configurations."),
|
||||
),
|
||||
) + ticket_flags_params
|
||||
|
||||
def get_dn(self, *keys, **options):
|
||||
@@ -912,6 +920,13 @@ class host_mod(LDAPUpdate):
|
||||
if 'krbticketpolicyaux' not in entry_attrs['objectclass']:
|
||||
entry_attrs['objectclass'].append('krbticketpolicyaux')
|
||||
|
||||
if 'krbprincipalauthind' in entry_attrs:
|
||||
if 'objectclass' not in entry_attrs:
|
||||
entry_attrs_old = ldap.get_entry(dn, ['objectclass'])
|
||||
entry_attrs['objectclass'] = entry_attrs_old['objectclass']
|
||||
if 'krbprincipalaux' not in entry_attrs['objectclass']:
|
||||
entry_attrs['objectclass'].append('krbprincipalaux')
|
||||
|
||||
add_sshpubkey_to_attrs_pre(self.context, attrs_list)
|
||||
|
||||
return dn
|
||||
|
||||
Reference in new issue
Block a user