summaryrefslogtreecommitdiffstats
path: root/src/plugins/audit/j_dict.h
diff options
context:
space:
mode:
authorZhanna Tsitkov <tsitkova@mit.edu>2013-07-20 15:47:42 -0400
committerBen Kaduk <kaduk@mit.edu>2013-10-04 20:25:49 -0400
commit1003f0173f266a6428ccf2c89976f0029d3ee831 (patch)
treea845ce60636aca59e80f4db95e4b6ec82788081c /src/plugins/audit/j_dict.h
parentb6d5e3af806bb60c37a831a72eff3e7e99bea6e9 (diff)
downloadkrb5-1003f0173f266a6428ccf2c89976f0029d3ee831.tar.gz
krb5-1003f0173f266a6428ccf2c89976f0029d3ee831.tar.xz
krb5-1003f0173f266a6428ccf2c89976f0029d3ee831.zip
KDC Audit infrastructure and plugin implementation
Per project http://k5wiki.kerberos.org/wiki/Projects/Audit The purpose of this project is to create an Audit infrastructure to monitor security related events on the KDC. The following events are targeted in the initial version: - startup and shutdown of the KDC; - AS_REQ and TGS_REQ exchanges. This includes client address and port, KDC request and request ID, KDC reply, primary and derived ticket and their ticket IDs, second ticket ID, cross-realm referral, was ticket renewed and validated, local policy violation and protocol constraints, and KDC status message. Ticket ID is introduced to allow to link tickets to their initial TGT at any stage of the Kerberos exchange. For the purpose of this project it is a private to KDC ticket ID: each successfully created ticket is hashed and recorded into audit log. The administrators can correlate the primary and derived ticket IDs after the fact. Request ID is a randomly generated alpha-numeric string. Using this ID an administrator can easily correlate multiple audit events related to a single request. It should be informative both in cases when the request is sent to multiple KDCs, or to the same KDC multiple times. For the purpose of testing and demo of the Audit, the JSON based modules are implemented: "test" and "simple" audit modules respectively. The file plugins/audit/j_dict.h is a dictionary used in this implememtations. The new Audit system is build-time enabled and run-time pluggable. [kaduk@mit.edu: remove potential KDC crashes, minor reordering] ticket: 7712 target_version: 1.12
Diffstat (limited to 'src/plugins/audit/j_dict.h')
-rw-r--r--src/plugins/audit/j_dict.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/src/plugins/audit/j_dict.h b/src/plugins/audit/j_dict.h
new file mode 100644
index 000000000..2ca48b05b
--- /dev/null
+++ b/src/plugins/audit/j_dict.h
@@ -0,0 +1,88 @@
+/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* j_dict.h - Dictionary file for json implementation of audit system */
+/*
+ * Copyright (C) 2013 by the Massachusetts Institute of Technology.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef KRB5_J_DICT_H_INCLUDED
+#define KRB5_J_DICT_H_INCLUDED
+
+/* Dictionary for KDC events */
+#define AU_STAGE "stage"
+#define AU_EVENT_NAME "event_name"
+#define AU_EVENT_STATUS "event_success"
+#define AU_TKT_IN_ID "tkt_in_id"
+#define AU_TKT_OUT_ID "tkt_out_id"
+#define AU_REQ_ID "req_id"
+#define AU_KDC_STATUS "kdc_status"
+#define AU_FROMPORT "fromport"
+#define AU_FROMADDR "fromaddr"
+#define AU_TYPE "type" /* used by fromaddr */
+#define AU_IPV4 "ipv4" /* used by fromaddr */
+#define AU_SESS_ETYPE "sess_etype"
+#define AU_SRV_ETYPE "srv_etype"
+#define AU_REP_ETYPE "rep_etype"
+#define AU_REALM "realm"
+#define AU_LENGTH "length"
+#define AU_COMPONENTS "components"
+#define AU_TKT_RENEWED "tkt_renewed"
+#define AU_TKT_VALIDATED "tkt_validated"
+/* referrals */
+#define AU_CREF_REALM "clreferral_realm"
+/* request */
+#define AU_REQ_KDC_OPTIONS "req.kdc_options"
+#define AU_REQ_SERVER "req.server"
+#define AU_REQ_CLIENT "req.client"
+#define AU_REQ_AVAIL_ETYPES "req.avail_etypes"
+#define AU_EVIDENCE_TKT "evidence_tkt"
+#define AU_REQ_ADDRESSES "req.addresses"
+#define AU_REQ_TKT_START "req.tkt_start"
+#define AU_REQ_TKT_END "req.tkt_end"
+#define AU_REQ_TKT_RENEW_TILL "req.tkt_renew_till"
+#define AU_REQ_PA_TYPE "req.pa_type"
+/* reply */
+#define AU_REP_TICKET "rep.ticket"
+#define AU_REP_PA_TYPE "rep.pa_type"
+/* ticket */
+#define AU_SNAME "sname"
+#define AU_CNAME "cname"
+#define AU_FLAGS "flags"
+#define AU_START "start"
+#define AU_END "end"
+#define AU_RENEW_TILL "renew_till"
+#define AU_AUTHTIME "authtime"
+#define AU_TR_CONTENTS "tr_contents"
+#define AU_CADDRS "caddrs"
+/* S4U and U2U */
+#define AU_VIOLATION "violation" /* policy or protocol restrictions */
+#define AU_REQ_S4U2S_USER "s4u2self_user"
+#define AU_REQ_S4U2P_USER "s4u2proxy_user"
+#define AU_REQ_U2U_USER "u2u_user"
+#define AU_EVIDENCE_TKT_ID "evidence_tkt_id" /* 2nd ticket in s4u2proxy req */
+#endif /* KRB5_J_DICT_H_INCLUDED */