2 * Copyright (c) 1997-2022 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
5 * Copyright (c) 2005 Andrew Bartlett <abartlet@samba.org>
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
20 * 3. Neither the name of the Institute nor the names of its contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
46 #include <kx509_asn1.h>
47 #include <gssapi/gssapi.h>
49 enum krb5_kdc_trpolicy
{
50 TRPOLICY_ALWAYS_CHECK
,
51 TRPOLICY_ALLOW_PER_PRINCIPAL
,
52 TRPOLICY_ALWAYS_HONOUR_REQUEST
55 struct krb5_kdc_configuration
;
56 typedef struct krb5_kdc_configuration krb5_kdc_configuration
;
59 * Access to request fields by plugins and other out-of-tree
60 * consumers should be via the functions in kdc-accessors.h.
63 struct kdc_request_desc
;
64 typedef struct kdc_request_desc
*kdc_request_t
;
66 struct astgs_request_desc
;
67 typedef struct astgs_request_desc
*astgs_request_t
;
69 struct kx509_req_context_desc
;
70 typedef struct kx509_req_context_desc
*kx509_req_context
;
72 struct krb5_kdc_service
{
75 #define KS_NO_LENGTH 2
77 krb5_error_code (*process
)(kdc_request_t
*, int *claim
);
81 * The following fields are guaranteed stable within a major
82 * release of Heimdal and can be manipulated by applications
83 * that manage KDC requests themselves using libkdc.
85 * Applications can make custom KDC configuration available
86 * to libkdc by using krb5_set_config().
89 #define KRB5_KDC_CONFIGURATION_COMMON_ELEMENTS \
90 krb5_log_facility *logf; \
96 * If non-null, contains static dummy data to include in
97 * place of the FAST cookie when it is disabled.
99 krb5_data dummy_fast_cookie; \
102 * Windows 2019 (and earlier versions) always sends the salt\
103 * and Samba has testsuites that check this behaviour, so a \
104 * Samba AD DC will set this flag to match the AS-REP packet\
107 unsigned int force_include_pa_etype_salt : 1; \
109 unsigned int tgt_use_strongest_session_key : 1; \
110 unsigned int preauth_use_strongest_session_key : 1; \
111 unsigned int svc_use_strongest_session_key : 1; \
112 unsigned int use_strongest_server_key : 1; \
114 unsigned int require_pac : 1; \
115 unsigned int enable_fast : 1; \
116 unsigned int enable_fast_cookie : 1; \
117 unsigned int enable_armored_pa_enc_timestamp : 1
119 #ifndef __KDC_LOCL_H__
120 struct krb5_kdc_configuration
{
121 KRB5_KDC_CONFIGURATION_COMMON_ELEMENTS
;
125 typedef void *kdc_object_t
;
126 typedef struct kdc_array_data
*kdc_array_t
;
127 typedef struct kdc_dict_data
*kdc_dict_t
;
128 typedef struct kdc_string_data
*kdc_string_t
;
129 typedef struct kdc_data_data
*kdc_data_t
;
130 typedef struct kdc_number_data
*kdc_number_t
;
132 typedef void (KRB5_CALLCONV
*kdc_array_iterator_t
)(kdc_object_t
, void *, int *);
134 typedef void (KRB5_CALLCONV
*kdc_type_dealloc
)(kdc_object_t
);
136 #include <kdc-protos.h>
138 #endif /* __KDC_H__ */