1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

tests/krb5: Allow specifying KDC options when requesting a TGT

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-08-11 09:42:25 +12:00 committed by Andrew Bartlett
parent da89b86e52
commit c9d6a3dd66

View File

@ -990,6 +990,9 @@ class AuthnPolicyBaseTests(AuthLogTestBase, KdcTgsBaseTests):
def _get_tgt(self, creds, *,
armor_tgt=None,
till=None,
kdc_options=None,
expected_flags=None,
unexpected_flags=None,
expected_error=0,
expect_status=None,
expected_status=None):
@ -1017,10 +1020,11 @@ class AuthnPolicyBaseTests(AuthLogTestBase, KdcTgsBaseTests):
expected_etypes = krbtgt_creds.tgs_supported_enctypes
kdc_options = str(krb5_asn1.KDCOptions('renewable'))
# Contrary to Microsofts documentation, the returned ticket is
# renewable.
expected_flags = krb5_asn1.TicketFlags('renewable')
if kdc_options is None:
kdc_options = str(krb5_asn1.KDCOptions('renewable'))
# Contrary to Microsofts documentation, the returned ticket is
# renewable.
expected_flags = krb5_asn1.TicketFlags('renewable')
preauth_key = self.PasswordKey_from_creds(creds,
kcrypto.Enctype.AES256)
@ -1086,6 +1090,7 @@ class AuthnPolicyBaseTests(AuthLogTestBase, KdcTgsBaseTests):
expected_sname=expected_sname,
expected_salt=salt,
expected_flags=expected_flags,
unexpected_flags=unexpected_flags,
expected_supported_etypes=expected_etypes,
generate_padata_fn=generate_padata_fn,
generate_fast_padata_fn=generate_fast_padata_fn,