Beispiel #1
0
 def post_common_callback(self, ldap, dn, entry_attrs, *keys, **options):
     assert isinstance(dn, DN)
     self.obj.get_password_attributes(ldap, dn, entry_attrs)
     self.obj.convert_usercertificate_post(entry_attrs, **options)
     convert_sshpubkey_post(entry_attrs)
     remove_sshpubkey_from_output_post(self.context, entry_attrs)
     radius_dn2pk(self.api, entry_attrs)
Beispiel #2
0
 def post_common_callback(self, ldap, dn, entry_attrs, *keys, **options):
     assert isinstance(dn, DN)
     if options.get('random', False):
         try:
             entry_attrs['randompassword'] = unicode(getattr(context, 'randompassword'))
         except AttributeError:
             # if both randompassword and userpassword options were used
             pass
     convert_nsaccountlock(entry_attrs)
     self.obj.get_password_attributes(ldap, dn, entry_attrs)
     self.obj.convert_usercertificate_post(entry_attrs, **options)
     convert_sshpubkey_post(entry_attrs)
     remove_sshpubkey_from_output_post(self.context, entry_attrs)
     radius_dn2pk(self.api, entry_attrs)
Beispiel #3
0
 def post_common_callback(self, ldap, dn, entry_attrs, *keys, **options):
     assert isinstance(dn, DN)
     self.preserve_krbprincipalname_post(ldap, entry_attrs, **options)
     if options.get('random', False):
         try:
             entry_attrs['randompassword'] = unicode(getattr(context, 'randompassword'))
         except AttributeError:
             # if both randompassword and userpassword options were used
             pass
     convert_nsaccountlock(entry_attrs)
     self.obj.get_password_attributes(ldap, dn, entry_attrs)
     self.obj.convert_usercertificate_post(entry_attrs, **options)
     convert_sshpubkey_post(entry_attrs)
     remove_sshpubkey_from_output_post(self.context, entry_attrs)
     radius_dn2pk(self.api, entry_attrs)
Beispiel #4
0
    def post_callback(self, ldap, entries, truncated, *args, **options):
        if options.get('pkey_only', False):
            return truncated
        for entry_attrs in entries:
            set_certificate_attrs(entry_attrs)
            set_kerberos_attrs(entry_attrs, options)
            rename_ipaallowedtoperform_from_ldap(entry_attrs, options)
            self.obj.suppress_netgroup_memberof(ldap, entry_attrs)

            if options.get('all', False):
                entry_attrs['managing'] = self.obj.get_managed_hosts(entry_attrs.dn)

            convert_sshpubkey_post(entry_attrs)
            remove_sshpubkey_from_output_post(self.context, entry_attrs)
            convert_ipaassignedidview_post(entry_attrs, options)

        remove_sshpubkey_from_output_list_post(self.context, entries)

        return truncated
Beispiel #5
0
    def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
        assert isinstance(dn, DN)
        self.obj.get_password_attributes(ldap, dn, entry_attrs)
        if entry_attrs['has_password']:
            # If an OTP is set there is no keytab, at least not one
            # fetched anywhere.
            entry_attrs['has_keytab'] = False

        set_certificate_attrs(entry_attrs)
        set_kerberos_attrs(entry_attrs, options)
        rename_ipaallowedtoperform_from_ldap(entry_attrs, options)

        if options.get('all', False):
            entry_attrs['managing'] = self.obj.get_managed_hosts(dn)

        self.obj.suppress_netgroup_memberof(ldap, entry_attrs)

        convert_sshpubkey_post(entry_attrs)
        remove_sshpubkey_from_output_post(self.context, entry_attrs)
        convert_ipaassignedidview_post(entry_attrs, options)

        return dn