1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

s4:kdc: Add structure containing authentication policy auditing information

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-06-15 10:18:00 +12:00 committed by Andrew Bartlett
parent a2ff8c4e43
commit b142983069
2 changed files with 35 additions and 0 deletions

View File

@ -41,4 +41,27 @@ NTSTATUS authn_policy_ntlm_apply_device_restriction(const char *client_account_n
const char *device_account_name,
const struct authn_ntlm_client_policy *client_policy);
enum authn_audit_event {
AUTHN_AUDIT_EVENT_OK = 0,
AUTHN_AUDIT_EVENT_KERBEROS_DEVICE_RESTRICTION,
AUTHN_AUDIT_EVENT_KERBEROS_SERVER_RESTRICTION,
AUTHN_AUDIT_EVENT_NTLM_DEVICE_RESTRICTION,
AUTHN_AUDIT_EVENT_NTLM_SERVER_RESTRICTION,
AUTHN_AUDIT_EVENT_OTHER_ERROR,
};
enum authn_audit_reason {
AUTHN_AUDIT_REASON_NONE = 0,
AUTHN_AUDIT_REASON_DESCRIPTOR_INVALID,
AUTHN_AUDIT_REASON_DESCRIPTOR_NO_OWNER,
AUTHN_AUDIT_REASON_SECURITY_TOKEN_FAILURE,
AUTHN_AUDIT_REASON_ACCESS_DENIED,
AUTHN_AUDIT_REASON_FAST_REQUIRED,
};
struct authn_int64_optional {
bool is_present;
int64_t val;
};
#endif

View File

@ -52,4 +52,16 @@ struct authn_server_policy {
DATA_BLOB allowed_to_authenticate_to;
};
/* Auditing information. */
struct authn_audit_info {
struct authn_policy *policy;
const struct auth_user_info_dc *client_info;
enum authn_audit_event event;
enum authn_audit_reason reason;
NTSTATUS policy_status;
const char *location;
struct authn_int64_optional tgt_lifetime_raw;
};
#endif