Re: audit datastream

25 views
Skip to first unread message

Matthew Zumwalt

unread,
Jul 23, 2010, 4:39:46 PM7/23/10
to Adam Wead, active...@googlegroups.com
Hi Adam,

Madrid was nice.  OR was really sedated this year.

Thus far, nobody has asked to do anything with the Audit datastream so ActiveFedora doesn't support it.  The only way to get at the Audit Datastream is through the FOXML.  Fedora doesn't allow you to access it through the API like a regular datastream.  Your best shot is to parse the FOXML with Nokogiri and then use xpath to grab the info you want.  You might find the implementation of ActiveFedora::Base.deserialize instructive (around line 355 in http://github.com/mediashelf/active_fedora/blob/master/lib/active_fedora/base.rb )

At some point, this would be a nice feature to add to ActiveFedora -- wouldn't be too hard to set it up.

Matt Zumwalt
MediaShelf, LLC




On Jul 23, 2010, at 1:37 PM, Adam Wead wrote:

Hi Matt,

Hope you had a good time in Madrid!

I have a question about active-fedora.  Is it possible to get at the audit datasteam of an object?  I'd like to be able to display the history of users who've edited an object.  Right now, I'm using the apim to parse the objectXML, but not having very much luck.  I think the problem is that ruby doesn't seem to know what to do with foxml.  Any suggestions would be helpful.

thanks,

...adam

 
Rock & Roll: (noun) African American slang dating back to the early 20th Century. In the early 1950s, the term came to be used to describe a new form of music, steeped in the blues, rhythm & blues, country and gospel. Today, it refers to a wide variety of popular music -- frequently music with an edge and attitude, music with a good beat and --- often --- loud guitars.© 2005 Rock and Roll Hall of Fame and Museum.

 

This communication is a confidential and proprietary business communication. It is intended solely for the use of the designated recipient(s). If this communication is received in error, please contact the sender and delete this communication.

Matthew Zumwalt

unread,
Jul 23, 2010, 6:06:47 PM7/23/10
to Adam Wead, active...@googlegroups.com
Adam,

These are great questions that I know other people also will want to know the answers to.  I'm cc'ing my response to the active-fedora group.

When you perform API-M operations, you have the option of submitting a log message, which will end up in the justification.  Currently, active-fedora ignores that feature because we didn't have any use cases dictating what should actually go in there.  It would be a cool feature to add though.

As far as the surrogate authentication bit, it's pretty easy to use.  Within a user session, register a new connection to Fedora, passing in the user id as the second argument.  For example,

Fedora::Repository.register(ActiveFedora.fedora_config[:url],  session[:user])

Now any requests through your Repository.instance connection will include the userid.

Matt Zumwalt
MediaShelf, LLC




On Jul 23, 2010, at 4:24 PM, Adam Wead wrote:

Thanks, Matt, I'll take a look at that...

I'm doing a rough parsing of the foxml at the moment.  We need to see who edited a record last so we know who to contact if there are questions.  It might also be nice to find a way to put something in the justification field of each audit, or this might be overkill.  By the way, I also noticed a surrogate feature in the method that initializes the connection to the fedora repo.  At the moment you seem to be setting this to nil by default.  If that's implemented, does that mean you can pass a user into fedora and have it authenticated by some other means (like LDAP) and not mess with the fedora-users.fcfg file?

just wondering...

have a good weekend!

...adam

adam wead

unread,
Jul 26, 2010, 1:04:35 PM7/26/10
to ActiveFedora / Ruby + Fedora Commons


On Jul 23, 6:06 pm, Matthew Zumwalt <matt.zumw...@yourmediashelf.com>
wrote:
> Adam,
>
> These are great questions that I know other people also will want to know the answers to.  I'm cc'ing my response to the active-fedora group.
>
> When you perform API-M operations, you have the option of submitting a log message, which will end up in the justification.  Currently, active-fedora ignores that feature because we didn't have any use cases dictating what should actually go in there.  It would be a cool feature to add though.
>
> As far as the surrogate authentication bit, it's pretty easy to use.  Within a user session, register a new connection to Fedora, passing in the user id as the second argument.  For example,
>
> Fedora::Repository.register(ActiveFedora.fedora_config[:url],  session[:user])
>
> Now any requests through your Repository.instance connection will include the userid.

How does that work with the fedora-users file? Does it mean that if I
pass the config url as the first argument, with the fedoraAdmin user
for example, and then pass "adam" as the second argument, that the
user "adam" will be logged as doing all the actions but Fedora is
using fedoraAdmin for the permissions?

I may be misunderstanding how the whole surrogate works, so correct me
if I'm wrong.

thanks,

...adam
Reply all
Reply to author
Forward
0 new messages