{"id":1593,"date":"2013-09-28T21:57:08","date_gmt":"2013-09-29T01:57:08","guid":{"rendered":"http:\/\/blogs.sungeek.net\/unixwiz\/?p=1593"},"modified":"2013-09-28T21:57:08","modified_gmt":"2013-09-29T01:57:08","slug":"a-logging-we-shall-go","status":"publish","type":"post","link":"https:\/\/blogs.sungeek.net\/unixwiz\/2013\/09\/28\/a-logging-we-shall-go\/","title":{"rendered":"A logging we shall go"},"content":{"rendered":"<p>Today I have 2 quick tips for logging, one for Oracle WebGates with OAM and another for Convergence in Glassfish with OAM SSO.<\/p>\n<p>&nbsp;<\/p>\n<p>If you use Oracle Access Manager and perhaps their Oracle Web Tier (webgate, etc) you may have found that the webgates (Oracle HTTP Server, aka Apache) don&#8217;t log usernames in the access logs if you are using SSO with OAM. This sort of sucks if you want to pull the webgate access logs in to a cool log program like Splunk. Well a quick way to fix this is make sure that you have the mod_log_config module loaded in your httpd.conf for the OHS server. Next either modify the common or combined CustomLog definition or create a new one where you replace the %u with a %{OAM_REMOTE_USER}i? (Or what ever you named your OAM User header variable.) What this will do is now log the OAM_REMOTE_USER header variable in the place of the %u (which is for http auth style usernames). The one caveat is it will only log that value if it exists. If it doesn&#8217;t exist it doesn&#8217;t get logged. So you may miss a couple of pages until the header is created, but everything after that should be logged.<\/p>\n<p>&nbsp;<\/p>\n<p>The second tip is closely related to the first and is assuming that you are using a custom SSO module to single sign on a user in to the Convergence web mail application. When this happens, like the webgates, you won&#8217;t get a username field in the access logs (if you even have them enabled, as they aren&#8217;t by default.) To log the OAM_REMOTE_USER in Glassfish, go to the server and where the access logging is defined, add a %header.OAM_REMOTE_USER% in to the logging definition. It takes affect immediately and you don&#8217;t have to restart Glassfish.<\/p>\n<p>&nbsp;<\/p>\n<p>I looked all over the interwebs for this, so hope this helps you out.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I have 2 quick tips for logging, one for Oracle WebGates with OAM and another for Convergence in Glassfish with OAM SSO. &nbsp; If you use Oracle Access Manager and perhaps their Oracle Web Tier (webgate, etc) you may have found that the webgates (Oracle HTTP Server, aka Apache) don&#8217;t log usernames in the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blogs.sungeek.net\/unixwiz\/2013\/09\/28\/a-logging-we-shall-go\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;A logging we shall go&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[402,405,408,406,407,403,409,404],"class_list":["post-1593","post","type-post","status-publish","format-standard","hentry","category-tips","tag-convergence","tag-glassfish","tag-logging","tag-oam","tag-oracle-access-manager","tag-oracle-webgate","tag-username","tag-web-gate"],"_links":{"self":[{"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/posts\/1593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/comments?post=1593"}],"version-history":[{"count":1,"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/posts\/1593\/revisions"}],"predecessor-version":[{"id":1594,"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/posts\/1593\/revisions\/1594"}],"wp:attachment":[{"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/media?parent=1593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/categories?post=1593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sungeek.net\/unixwiz\/wp-json\/wp\/v2\/tags?post=1593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}