summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2023-04-05 11:21:39 +1200
committerAndrew Bartlett <abartlet@samba.org>2023-05-05 02:54:31 +0000
commiteb4b46d326ee53d4c275d7f72b07650af589e9fa (patch)
treeca31cd0010151fdbee83666b848fbdb5c66a2ea0 /python
parente7b2cd7d8315a5f182acba99b5c986f8b5a6186d (diff)
downloadsamba-eb4b46d326ee53d4c275d7f72b07650af589e9fa.tar.gz
tests/krb5: Allow creating an account with an assigned policy or silo
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/krb5/kdc_base_test.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/python/samba/tests/krb5/kdc_base_test.py b/python/samba/tests/krb5/kdc_base_test.py
index 09abb1619a8..92482f95072 100644
--- a/python/samba/tests/krb5/kdc_base_test.py
+++ b/python/samba/tests/krb5/kdc_base_test.py
@@ -1642,6 +1642,8 @@ class KDCBaseTest(RawKerberosTest):
'secure_channel_type': None,
'id': None,
'force_nt4_hash': False,
+ 'assigned_policy': None,
+ 'assigned_silo': None,
}
account_opts = {
@@ -1692,7 +1694,9 @@ class KDCBaseTest(RawKerberosTest):
kerberos_enabled,
secure_channel_type,
id,
- force_nt4_hash):
+ force_nt4_hash,
+ assigned_policy,
+ assigned_silo):
if account_type is self.AccountType.USER:
self.assertIsNone(spn)
self.assertIsNone(delegation_to_spn)
@@ -1751,6 +1755,12 @@ class KDCBaseTest(RawKerberosTest):
if spn is None and account_type is not self.AccountType.USER:
spn = 'host/' + user_name
+ if assigned_policy is not None:
+ details['msDS-AssignedAuthNPolicy'] = assigned_policy
+
+ if assigned_silo is not None:
+ details['msDS-AssignedAuthNPolicySilo'] = assigned_silo
+
creds, dn = self.create_account(samdb, user_name,
account_type=account_type,
upn=upn,