Shibboleth v3.2.1 - Add additional attributes to audit log for institutional Statistics

Cantor, Scott cantor.2 at osu.edu
Thu Jul 28 11:09:46 EDT 2016


> Does anybody know how to add additional attributes to audit log using
> audit.xml?

I assume you mean adding a new field that doesn't exist now.

> For Example: I would like to add user's department to audit log to
> perform a more deep statistic on the usage of the resources for a
> specific department of an Institution.

You need a Java or script Function coded to pull the data out of the context tree, which is necessarily specific to a given goal. If you wanted to pull an attribute out, you would be able to do that by walking down into the AttributeContext in the tree and accessing the unfiltered attribute set from there. Mostly the challenge with doing anything like this is understanding the context tree and that's just unfortunately not something we have well-documented.

With this particular case, I believe the structure would be
ProfileRequestContext->RelyingPartyContext->AttributeContext

Then there's the question of when to extract it. For that use case, you'd probably want to wire it into the post-assertion set of fields, which is the bean named shibboleth.PostAssertionAuditExtractors (the example in the wiki shows the post-response case, but it's just a different bean name).

> I've not found any working example on the web... :(

I put the basic wiring needed into the wiki to illustrate how to do a custom field (I didn't do it today, it's been there). If you want me to code a working example, then you'll have to wait for me to have time to do that part. You can file something in Jira if you want with the Documentation type, and it will at least be tracked as a requested example when somebody has a chance to write it up.

-- Scott



More information about the users mailing list