Log an applications usage of Crowd

We have just created a new "Generic" application in Crowd and would like to monitor its interaction with the server/api.

Is it possible to log the activity of an individual application? If so any help would be appreciated.

Thanks

2 answers

1 accepted

Based on Caspar's comment, there appears to be no native way to achieve the goal.

For the purpose of testing, I have configured Access Logging in Tomcat for the crowd context in our test instance as follows:

  1. Stop Crowd
  2. Modify {crowd-install}\apache-tomcat\conf\Catalina\localhost\crowd.xml and add the following element before the </Context> element:

    &lt;Valve
        className="org.apache.catalina.valves.AccessLogValve"
        directory="${catalina.base}/logs"
        prefix="access_log."
        fileDateFormat="yyyy-MM-dd"
        suffix=".log"
        pattern="%a %{Authorization}i %t &amp;quot;%m %U%q %H&amp;quot; %s %b %D &amp;quot;%{Referer}i&amp;quot; &amp;quot;%{User-Agent}i&amp;quot;"
       /&gt;
  3. Start Crowd

This generates an access log file (one per day) in {crowd-install}\apache-tomcat\logs which can be interrogated to evaluate the interactions of an application with Crowd.

NB:

  • This has been seen to work with Atlassian Crowd 2.7.x and 2.8.x - though there are no guarantees/warranties for its impact - use at your own discretion.
  • The access log will include all interactions with Crowd, including those from the Console itself and any configured applications, e.g. JIRA and Confluence, therefore the access log files can grow rather quickly :)

 

Ian - does this log the IP address of the application and the originating web browser of the user? Thx, M.

@Martin Cleaver [Blended Perspectives] - yes the log file should contain the following information * %a - Remote IP address * %{Authorization}I - the value of the value of incoming header with name _Authorisation_ * %t - the timestamp for the request * %m - Request method (GET, POST, etc.) * %U - Requested URL path * %q - Query string (prepended with a '?' if it exists) * %H - Request protocol * %s - HTTP status code of the response * %b - Bytes sent, excluding HTTP headers, or '-' if zero * %D - Time taken to process the request, in millis * %{Referer}i - the value of the value of incoming header with name _Referer_ * %{User-Agent}i - the value of the value of incoming header with name _User-Agent_ The actual output is configurable - for more information see [http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Access_Log_Valve]

Crowd has a few logging settings which you can turn on from the settings section of the administration console, but no generalised "show me what an application is doing" feature.

Please vote on CWD-2086 and/or CWD-538 if you'd like to see this feature added.

Hi Caspar

Thanks for the pointers - I'll take and look and vote on the issues if they're appropriate!

Suggest an answer

Log in or Join to answer
Community showcase
Emilee Spencer
Published yesterday in Marketplace Apps

Marketplace Spotlight: DeepAffects

Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...

30 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot