November 5, 2012

Auditing Git: Better Governance with Git Fusion

What's New
Media & Entertainment
Git at Scale
Traceability

governance copyright image

If you think auditing is something you only worry about when the IRS comes calling, stop reading now. But if you're concerned about maintaining a full record of who accessed your IP, read on.

Not sure whether you should care about maintaining a good audit trail for your IP? Consider a few questions:

  • Is your company bound by industry or government standards for controlling access to important data?
  • Do you want to monitor any unusual patterns of access as a safeguard against unauthorized intrusion?
  • Do you collaborate with third parties who should be restricted to seeing only a subsection of your data?
  • Do you ever need to prove which files were deployed to a production server at any time?

If you store your crown jewels in a version management system and you answer 'yes' to any of those questions, then you need to pay attention to IP auditing.

Perforce gives you all the building blocks for an effective auditing solution with file access logs and other command logging. Now, thanks to Git Fusion, Perforce provides that audit capability for the work that goes on in your Git repositories as well. Besides the standard Perforce logs, Git Fusion also records any authentication, clone, push, and pull activity. It'll look something like this:

Sep 24 05:20:21 localhost git-fusion-auth[2523]: /usr/local/git-fusion/bin/p4gf_auth_server.py --user=rdefauw 
- keyfp=ad:43:2a:7g:9a:f6:30:88:a5:38:04:f4:9c:e1:95:c2 git-receive-pack 'trunk' 
SSH_ORIGINAL_COMMAND=git-receive-pack 'trunk' SSH_CLIENT=192.168.133.1 30763 22 
SSH_CONNECTION=192.168.133.1 30763 192.168.133.128 22

Notice that I can see where the connection came from, who the user was, and what type of operation they were running. (In this case they're running git-receive-pack which indicates a push operation.) I can also see that the operation was run against the Git Fusion view called trunk.

The integrity of the data you'll see in a Perforce repository is also better. Although it may not be a best practice, it is possible to effectively change history in Git in a way not easy to detect later. With Perforce, history is immutable. (In other words, Perforce is enforcing a best practice often observed in the Git community: don't change history once other people have seen it.) Similarly, branches in Perforce cannot be permanently removed. That means you'll have an easier time conclusively proving what your data looked like at some point in the past.

Auditing is one of those topics that isn't on your priority list until you're tangled up in a messy compliance issue. If your development is happening in Git (fully or partially), save yourself a future headache and use Git Fusion to extend Perforce's auditing umbrella over those Git repositories.

To learn more about IP security and governance, read this short paper: IP Security: Covering Your Bases in a Global Development Environment.