fc5f6430c66e7f9b72ecc7c9692fe3103308763e
[mod_auth_gssapi.git] / src / mod_auth_gssapi.h
1 /* Copyright (C) 2014 mod_auth_gssapi authors - See COPYING for (C) terms */
2
3 #include <stdbool.h>
4 #include <stdint.h>
5 #include <time.h>
6 #include <gssapi/gssapi.h>
7 #include <gssapi/gssapi_ext.h>
8 #include <gssapi/gssapi_krb5.h>
9
10 #define APR_WANT_STRFUNC
11 #include "apr_want.h"
12 #include <apr_strings.h>
13 #include <apr_base64.h>
14
15 #include <httpd.h>
16 #include <http_core.h>
17 #include <http_connection.h>
18 #include <http_log.h>
19 #include <http_request.h>
20 #include <mod_session.h>
21 #include <mod_ssl.h>
22
23 /* apache's httpd.h drags in empty PACKAGE_* variables.
24  * undefine them to avoid annoying compile warnings as they
25  * are re-defined in config.h */
26 #undef PACKAGE_BUGREPORT
27 #undef PACKAGE_NAME
28 #undef PACKAGE_STRING
29 #undef PACKAGE_TARNAME
30 #undef PACKAGE_VERSION
31 #include "config.h"
32
33 #include "crypto.h"
34 #include "sessions.h"
35
36 #define MIN_SESS_EXP_TIME 300 /* 5 minutes validity minimum */
37
38 struct mag_config {
39     apr_pool_t *pool;
40     bool ssl_only;
41     bool map_to_local;
42     bool gss_conn_ctx;
43     bool send_persist;
44     bool use_sessions;
45     bool use_s4u2proxy;
46     char *deleg_ccache_dir;
47     gss_key_value_set_desc *cred_store;
48     struct seal_key *mag_skey;
49     bool use_basic_auth;
50 };
51
52 struct mag_conn {
53     apr_pool_t *parent;
54     gss_ctx_id_t ctx;
55     bool established;
56     const char *user_name;
57     const char *gss_name;
58     time_t expiration;
59     const char *auth_type;
60 };