2011-02-08 08:39:34 +03:00
#include "idl_types.h"
/*
2011-04-05 10:15:27 +04:00
Authentication IDL structures
These are NOT public network structures, but it is helpful to define
these things in IDL. They may change without ABI breakage or
warning.
2011-02-08 08:39:34 +03:00
*/
2011-07-18 06:58:25 +04:00
import "misc.idl", "security.idl", "lsa.idl", "krb5pac.idl";
2011-04-05 10:15:27 +04:00
[
pyhelper("librpc/ndr/py_auth.c"),
helper("../librpc/ndr/ndr_auth.h"),
helpstring("internal Samba authentication structures")
]
2011-02-08 08:39:34 +03:00
interface auth
{
typedef [public] enum {
SEC_AUTH_METHOD_UNAUTHENTICATED = 0,
SEC_AUTH_METHOD_NTLM = 1,
SEC_AUTH_METHOD_KERBEROS = 2
} auth_method;
/* This is the parts of the session_info that don't change
2021-04-22 11:29:14 +03:00
* during local privilege and group manipulations */
2011-02-08 08:39:34 +03:00
typedef [public] struct {
2011-07-18 12:04:12 +04:00
[unique,charset(UTF8),string] char *account_name;
2016-01-07 16:46:24 +03:00
[unique,charset(UTF8),string] char *user_principal_name;
boolean8 user_principal_constructed;
2011-07-18 12:04:12 +04:00
[unique,charset(UTF8),string] char *domain_name;
2016-01-07 16:46:24 +03:00
[unique,charset(UTF8),string] char *dns_domain_name;
2011-02-08 08:39:34 +03:00
2011-07-18 12:04:12 +04:00
[unique,charset(UTF8),string] char *full_name;
[unique,charset(UTF8),string] char *logon_script;
[unique,charset(UTF8),string] char *profile_path;
[unique,charset(UTF8),string] char *home_directory;
[unique,charset(UTF8),string] char *home_drive;
[unique,charset(UTF8),string] char *logon_server;
2011-02-08 08:39:34 +03:00
NTTIME last_logon;
NTTIME last_logoff;
NTTIME acct_expiry;
NTTIME last_password_change;
NTTIME allow_password_change;
NTTIME force_password_change;
uint16 logon_count;
uint16 bad_password_count;
uint32 acct_flags;
uint8 authenticated;
} auth_user_info;
/* This information is preserved only to assist torture tests */
typedef [public] struct {
/* Number SIDs from the DC netlogon validation info */
uint32 num_dc_sids;
2011-02-09 06:22:02 +03:00
[size_is(num_dc_sids)] dom_sid dc_sids[*];
2011-02-08 08:39:34 +03:00
} auth_user_info_torture;
2011-02-11 10:47:21 +03:00
typedef [public] struct {
2011-07-18 12:04:12 +04:00
[unique,charset(UTF8),string] char *unix_name;
2011-02-11 10:47:21 +03:00
/*
* For performance reasons we keep an alpha_strcpy-sanitized version
* of the username around as long as the global variable current_user
* still exists. If we did not do keep this, we'd have to call
* alpha_strcpy whenever we do a become_user(), potentially on every
* smb request. See set_current_user_info in source3.
*/
2011-07-18 12:04:12 +04:00
[unique,charset(UTF8),string] char *sanitized_username;
2011-02-11 10:47:21 +03:00
} auth_user_info_unix;
2011-02-08 08:39:34 +03:00
/* This is the interim product of the auth subsystem, before
* privileges and local groups are handled */
typedef [public] struct {
uint32 num_sids;
[size_is(num_sids)] dom_sid sids[*];
auth_user_info *info;
2012-06-14 19:52:23 +04:00
[noprint] DATA_BLOB user_session_key;
[noprint] DATA_BLOB lm_session_key;
2011-02-08 08:39:34 +03:00
} auth_user_info_dc;
2011-07-18 06:28:50 +04:00
typedef [public] struct {
security_token *security_token;
security_unix_token *unix_token;
2011-07-18 06:58:25 +04:00
auth_user_info *info;
2011-07-18 06:28:50 +04:00
auth_user_info_unix *unix_info;
[value(NULL), ignore] auth_user_info_torture *torture;
/* This is the final session key, as used by SMB signing, and
* (truncated to 16 bytes) encryption on the SAMR and LSA pipes
* when over ncacn_np.
* It is calculated by NTLMSSP from the session key in the info3,
* and is set from the Kerberos session key using
* krb5_auth_con_getremotesubkey().
*
* Bottom line, it is not the same as the session keys in info3.
*/
2012-06-14 19:52:23 +04:00
[noprint] DATA_BLOB session_key;
2011-07-18 06:28:50 +04:00
[value(NULL), ignore] cli_credentials *credentials;
2018-04-09 21:44:00 +03:00
/*
* It is really handy to have our authorization code log a
2019-03-14 19:16:12 +03:00
* token that can be used to tie later requests together.
2018-04-09 21:44:00 +03:00
* We generate this in auth_generate_session_info()
*/
GUID unique_session_token;
2011-07-18 12:29:47 +04:00
} auth_session_info;
2011-07-18 06:28:50 +04:00
2011-04-05 10:15:27 +04:00
typedef [public] struct {
auth_session_info *session_info;
2012-06-14 19:52:23 +04:00
[noprint] DATA_BLOB exported_gssapi_credentials;
2011-02-08 08:39:34 +03:00
} auth_session_info_transport;
}