diff options
author | Alexander Bokovoy <abokovoy@redhat.com> | 2013-10-03 12:30:44 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-10-04 10:25:31 +0200 |
commit | d228b1bd70aeebb19fbf64ee64bbd662eda19fc4 (patch) | |
tree | 76113a53d65b690df0421cfae3ba8185daecdc2b /ipalib/plugins/trust.py | |
parent | 749111e6c2dfbb288c864a6cd2f5ac228f30bec1 (diff) | |
download | freeipa-d228b1bd70aeebb19fbf64ee64bbd662eda19fc4.tar.gz freeipa-d228b1bd70aeebb19fbf64ee64bbd662eda19fc4.tar.xz freeipa-d228b1bd70aeebb19fbf64ee64bbd662eda19fc4.zip |
ipa-kdb: Handle parent-child relationship for subdomains
When MS-PAC information is re-initialized, record also parent-child
relationship between trust root level domain and its subdomains.
Use parent incoming SID black list to check if child domain is not
allowed to access IPA realm.
We also should really use 'cn' of the entry as domain name.
ipaNTTrustPartner has different meaning on wire, it is an index
pointing to the parent domain of the domain and will be 0 for top
level domains or disjoint subdomains of the trust.
Finally, trustdomain-enable and trustdomain-disable commands should
force MS-PAC cache re-initalization in case of black list change.
Trigger that by asking for cross-realm TGT for HTTP service.
Diffstat (limited to 'ipalib/plugins/trust.py')
-rw-r--r-- | ipalib/plugins/trust.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py index f5cb1e756..f412c6185 100644 --- a/ipalib/plugins/trust.py +++ b/ipalib/plugins/trust.py @@ -1286,6 +1286,9 @@ class trustdomain_enable(LDAPQuery): if sid in trust_entry['ipantsidblacklistincoming']: trust_entry['ipantsidblacklistincoming'].remove(sid) ldap.update_entry(trust_entry) + # Force MS-PAC cache re-initialization on KDC side + domval = ipaserver.dcerpc.DomainValidator(api) + (ccache_name, principal) = domval.kinit_as_http(keys[0]) else: raise errors.AlreadyActive() except errors.NotFound: @@ -1323,6 +1326,9 @@ class trustdomain_disable(LDAPQuery): if not (sid in trust_entry['ipantsidblacklistincoming']): trust_entry['ipantsidblacklistincoming'].append(sid) ldap.update_entry(trust_entry) + # Force MS-PAC cache re-initialization on KDC side + domval = ipaserver.dcerpc.DomainValidator(api) + (ccache_name, principal) = domval.kinit_as_http(keys[0]) else: raise errors.AlreadyInactive() except errors.NotFound: |