[krbdev.mit.edu #7712] git commit

Benjamin Kaduk via RT rt-comment at krbdev.mit.edu
Fri Oct 4 20:30:48 EDT 2013


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 at mit.edu: remove potential KDC crashes, minor reordering]

https://github.com/krb5/krb5/commit/1003f0173f266a6428ccf2c89976f0029d3ee831
Author: Zhanna Tsitkov <tsitkova at mit.edu>
Committer: Ben Kaduk <kaduk at mit.edu>
Commit: 1003f0173f266a6428ccf2c89976f0029d3ee831
Branch: master
 src/Makefile.in                             |    3 +
 src/configure.in                            |   26 +
 src/include/k5-int.h                        |    3 +-
 src/include/krb5/audit_plugin.h             |  270 ++++++++
 src/kdc/Makefile.in                         |    2 +
 src/kdc/do_as_req.c                         |   49 ++-
 src/kdc/do_tgs_req.c                        |   81 +++-
 src/kdc/kdc_audit.c                         |  331 ++++++++++
 src/kdc/kdc_audit.h                         |   82 +++
 src/kdc/main.c                              |   12 +
 src/lib/krb5/krb/plugin.c                   |    3 +-
 src/plugins/audit/Makefile.in               |   22 +
 src/plugins/audit/deps                      |   15 +
 src/plugins/audit/j_dict.h                  |   88 +++
 src/plugins/audit/kdc_j_encode.c            |  934 +++++++++++++++++++++++++++
 src/plugins/audit/kdc_j_encode.h            |   66 ++
 src/plugins/audit/libauditjenc.exports      |    7 +
 src/plugins/audit/simple/Makefile.in        |   27 +
 src/plugins/audit/simple/au_simple_main.c   |  263 ++++++++
 src/plugins/audit/simple/deps               |   15 +
 src/plugins/audit/simple/k5audit.exports    |    1 +
 src/plugins/audit/test/Makefile.in          |   21 +
 src/plugins/audit/test/au_test.c            |  228 +++++++
 src/plugins/audit/test/deps                 |   14 +
 src/plugins/audit/test/k5audit_test.exports |    1 +
 src/tests/Makefile.in                       |    5 +
 src/tests/au_dict.json                      |   64 ++
 src/tests/jsonwalker.py                     |  113 ++++
 src/tests/t_audit.py                        |   31 +
 29 files changed, 2770 insertions(+), 7 deletions(-)



More information about the krb5-bugs mailing list