Exemple #1
0
domain1range1_add = get_trusted_dom_range_dict(
    name=domain1range1,
    base_id=domain1range1_base_id,
    size=domain1range1_size,
    rangetype=domain1range1_type,
    base_rid=domain1range1_base_rid,
    sid=domain1_sid
)

# Domain2 - AD domain active (present in LDAP)
domain2 = u'domain2'
domain2_dn = get_trust_dn(domain2)
domain2_sid = u'S-1-5-21-2997650941-1802118864-3094776726'

domain2_add = get_trusted_dom_dict(domain2, domain2_sid)

domain2range1 = u'domain2range1'
domain2range1_base_id = id_shift + 10100
domain2range1_size = 50
domain2range1_base_rid = rid_shift + 10100
domain2range1_type = u'ipa-ad-trust'

domain2range1_dn = get_range_dn(name=domain2range1)

domain2range1_add = get_trusted_dom_range_dict(
    name=domain2range1,
    base_id=domain2range1_base_id,
    size=domain2range1_size,
    rangetype=domain2range1_type,
    base_rid=domain2range1_base_rid,
from ipatests.test_xmlrpc.tracker.service_plugin import ServiceTracker
from ipatests.test_xmlrpc.tracker.stageuser_plugin import StageUserTracker
from ipatests.test_xmlrpc.mock_trust import (
    mocked_trust_containers, get_trust_dn, get_trusted_dom_dict,
    encode_mockldap_value)
from ipatests.util import unlock_principal_password, change_principal


# Shared values for the mocked trusted domain
TRUSTED_DOMAIN_MOCK = dict(
    name=u'trusted.domain.net',
    sid=u'S-1-5-21-2997650941-1802118864-3094776726'
)
TRUSTED_DOMAIN_MOCK['dn'] = get_trust_dn(TRUSTED_DOMAIN_MOCK['name'])
TRUSTED_DOMAIN_MOCK['ldif'] = get_trusted_dom_dict(
    TRUSTED_DOMAIN_MOCK['name'], TRUSTED_DOMAIN_MOCK['sid']
)

ADD_REMOVE_TEST_DATA = [
    u'testuser-alias',
    u'testhost-alias',
    u'teststageuser-alias',
]
TRACKER_INIT_DATA = [
    (UserTracker, (u'krbalias_user', u'krbalias', u'test',), {},),
    (HostTracker, (u'testhost-krb',), {},),
    (StageUserTracker, (u'krbalias_stageuser', u'krbalias', u'test',), {},),
]
TRACKER_DATA = [
    (ADD_REMOVE_TEST_DATA[i],) + TRACKER_INIT_DATA[i]
    for i in range(len(TRACKER_INIT_DATA))
Exemple #3
0
from ipatests.test_xmlrpc.xmlrpc_test import XMLRPC_test
from ipatests.test_xmlrpc.tracker.user_plugin import UserTracker
from ipatests.test_xmlrpc.tracker.host_plugin import HostTracker
from ipatests.test_xmlrpc.tracker.service_plugin import ServiceTracker
from ipatests.test_xmlrpc.tracker.stageuser_plugin import StageUserTracker
from ipatests.test_xmlrpc.mock_trust import (mocked_trust_containers,
                                             get_trust_dn,
                                             get_trusted_dom_dict,
                                             encode_mockldap_value)
from ipatests.util import unlock_principal_password, change_principal

# Shared values for the mocked trusted domain
TRUSTED_DOMAIN_MOCK = dict(name=u'trusted.domain.net',
                           sid=u'S-1-5-21-2997650941-1802118864-3094776726')
TRUSTED_DOMAIN_MOCK['dn'] = get_trust_dn(TRUSTED_DOMAIN_MOCK['name'])
TRUSTED_DOMAIN_MOCK['ldif'] = get_trusted_dom_dict(TRUSTED_DOMAIN_MOCK['name'],
                                                   TRUSTED_DOMAIN_MOCK['sid'])

ADD_REMOVE_TEST_DATA = [
    u'testuser-alias',
    u'testhost-alias',
    u'teststageuser-alias',
]
TRACKER_INIT_DATA = [
    (
        UserTracker,
        (
            u'krbalias_user',
            u'krbalias',
            u'test',
        ),
        {},
Exemple #4
0
domain1range1_dn = get_range_dn(name=domain1range1)

domain1range1_add = get_trusted_dom_range_dict(name=domain1range1,
                                               base_id=domain1range1_base_id,
                                               size=domain1range1_size,
                                               rangetype=domain1range1_type,
                                               base_rid=domain1range1_base_rid,
                                               sid=domain1_sid)

# Domain2 - AD domain active (present in LDAP)
domain2 = u'domain2'
domain2_dn = get_trust_dn(domain2)
domain2_sid = u'S-1-5-21-2997650941-1802118864-3094776726'

domain2_add = get_trusted_dom_dict(domain2, domain2_sid)

domain2range1 = u'domain2range1'
domain2range1_base_id = id_shift + 10100
domain2range1_size = 50
domain2range1_base_rid = rid_shift + 10100
domain2range1_type = u'ipa-ad-trust'

domain2range1_dn = get_range_dn(name=domain2range1)

domain2range1_add = get_trusted_dom_range_dict(name=domain2range1,
                                               base_id=domain2range1_base_id,
                                               size=domain2range1_size,
                                               rangetype=domain2range1_type,
                                               base_rid=domain2range1_base_rid,
                                               sid=domain2_sid)