WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

How to enable DMGR access log ( NCSA ) in websphere 7

  • 1.  How to enable DMGR access log ( NCSA ) in websphere 7

    Posted Tue March 29, 2016 11:58 AM

    How to enable DMGR access log ( NCSA ) in websphere 7

    I can find it in websphere 8 , , but I am not able to find how to enable NCSA log for DMGR in websphere 7 ( I can see websphere application server's NCSA logs eneable in WAS console, but can't find DMGR )

    Thanks 



  • 2.  RE: How to enable DMGR access log ( NCSA ) in websphere 7

    Posted Wed March 30, 2016 11:34 AM

    Hi George,

      Because WebContainer component for dmgr is not manageable from admminconsole I think you can do using property-base configuration.

      The easiest way probably enable NCSA log in base server and extract its webcontainer configuration. Review NCSA logs properties. Then extract dmgr webcontainer configuration and update the server with NCSA logs properties.

       I'm checking the way to do. I tell you.

    Regards



  • 3.  RE: How to enable DMGR access log ( NCSA ) in websphere 7

    Posted Sat April 02, 2016 02:43 AM

    Are you running Base was? Or clustered? Remember Base has embedded console 😀



  • 4.  RE: How to enable DMGR access log ( NCSA ) in websphere 7

    Posted Tue April 05, 2016 09:30 AM

    Hi,

      Mike you are right :-)

      I have tested in ND environment and its possible but I'm reviewing the way to do through wsadmin in the meantime...

      Take in mind that is NOT SUPPORTED to edit server config manually but if you need to enable dmgr NCSA loging.

    1. Stop DMGR.
    2. Take a backup of your dmgr server.xml file (DMGR_PROFILE\config\CELL_NAME\nodes\DMGR_NODE\servers\dmgr\server.xml)
    3. Edit file.
    4. find the line ("<services xmi:type="loggingservice.http:HTTPAccessLoggingService")
    5. Change enable="false" to enable="true"
    6. Save server.xml file
    7. Start DMGR
    8. You will get logs at SERVER_LOG_ROOT}/http_error.log and SERVER_LOG_ROOT}/http_access.log

      Hope this helps. Tell us if you need more support.

    Regards



  • 5.  RE: How to enable DMGR access log ( NCSA ) in websphere 7

    Posted Tue April 05, 2016 10:12 AM

    Hi,

      Enable NCSA logging in DMGR using wsadmin.

    1.   start DMGR_PROFILE\bin\wsadmin.sh
    2. AdminTask.extractConfigProperties('(cells/CELL_NAME/nodes/DMGR_NODE_NAME/servers/dmgr|server.xml#HTTPAccessLoggingService_1)','[-propertiesFileName loggingserviceDMGR.props ]')
    3. Edit file DMGR_PROFILE\bin\loggingserviceDMGR.props
    4. change enable property and save file (I saved with another name)
    5. #
      #Properties
      #
      enable=true #boolean,default(false)
    6. Validate file.
    7. AdminTask.validateConfigProperties('[-propertiesFileName loggingserviceDMGRenabled.props -reportFileName reportloggingserviceDMGRdisabled.txt]')
    8. review report file
    9. AdminTask.applyConfigProperties('-propertiesFileName loggingserviceDMGRenabled.props ')
    10. AdminConfig.save()
    11. Restart DMGR

      Hope this helps. Tell us if you need more support

    Regards



  • 6.  RE: How to enable DMGR access log ( NCSA ) in websphere 7

    Posted Mon April 25, 2016 04:34 PM

    Thanks , the answer works perfectly



  • 7.  RE: How to enable DMGR access log ( NCSA ) in websphere 7

    Posted Tue April 26, 2016 12:43 AM


    Hi Gabriel,
    I am using WAS 8.5.5.3 ND
    I want to trace the DMGR login. I tried enabling NCSA logs but there i cant find the logged in user id in the logs.
    Is there any way to find out the user who is logged in the console?
    Please Help.
    Regards,
    Shruti



  • 8.  RE: How to enable DMGR access log ( NCSA ) in websphere 7

    Posted Tue April 26, 2016 02:51 AM

    Hi Shruti,

      You need to enable Audit logs.

      Take a look to the next links

      Auditing the security infrastructure

      http://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/tsec_sa_secauditing.html?cp=SSAW57_8.5.5%2F1-12-2-8&lang=en

      here an example

      WebSphere Application Server security auditing (page 13)

      ftp://ftp.software.ibm.com/software/iea/content/com.ibm.iea.was_v7/was/7.0/Security/WASv7_AuditLab.pdf

      Hope this helps. Tell us if you need more support.

    Regards



  • 9.  RE: How to enable DMGR access log ( NCSA ) in websphere 7

    Posted Tue April 26, 2016 06:35 AM

    Hi,
    Thnaks for the update. I have already tried the security auditing part. But there in the report I could not find the username that is used for DMGR login.
    Please help.
    Regards,
    Shruti



  • 10.  RE: How to enable DMGR access log ( NCSA ) in websphere 7

    Posted Tue April 26, 2016 10:00 AM

    Shruti,

      I have followed the example and is working fine.

      I have created a user for auditing (wasaudit), I have user for administration (wasadmin).

      I have tried login in DMGR with an unknown user (tururu) and then login with wasaudit and wasadmin

      DMGR_PROFILE\bin\wsadmin -lang jython -username wasaudit -password wasaudit

      wsadmin>AdminTask.binaryAuditLogReader('-interactive')
      Binary Audit Log Reader

    Binary Audit Log Reader Command

    *File name of the Binary Audit log (fileName): C:\WebSphere85\AppServer\profiles\Dmgr01\logs\dmgr\BinaryAudit_GABICell01_GABICellManager01_d
    mgr.log
    Report mode selection (reportMode): basic
    Event(s) filter (eventFilter): SECURITY_AUTHN
    Outcome(s) filter (outcomeFilter): DENIED
    Sequence filter (sequenceFilter):
    Timestamp filter (timeStampFilter):
    Key Store Password (keyStorePassword):
    *Output HTML file location  (outputLocation): C:\WebSphere85\AppServer\profiles\Dmgr01\logs\dmgr\loginError.html.html
    Data points to report (dataPoints):

    Binary Audit Log Reader

    F (Finish)
    C (Cancel)

    Select [F, C]: [F] F

    Attached loginError.html -> trying to login with tururu (unknown user) and wasadmin with bad password

    repeate the step to get success logins

    wsadmin>AdminTask.binaryAuditLogReader('-interactive')
    Binary Audit Log Reader
    Binary Audit Log Reader Command
    *File name of the Binary Audit log (fileName): C:\WebSphere85\AppServer\profiles\Dmgr01\logs\dmgr\BinaryAudit_GABICell01_GABICellManager01_d
    mgr.log
    Report mode selection (reportMode): basic
    Event(s) filter (eventFilter): SECURITY_AUTHN
    Outcome(s) filter (outcomeFilter): SUCCESS
    Sequence filter (sequenceFilter):
    Timestamp filter (timeStampFilter):
    Key Store Password (keyStorePassword):
    *Output HTML file location (outputLocation): C:\WebSphere85\AppServer\profiles\Dmgr01\logs\dmgr\loginSucess.html
    Data points to report (dataPoints):
    Binary Audit Log Reader
    F (Finish)
    C (Cancel)
    Select [F, C]: [F] F

      Attached loginSuccess.html -> login with wasaudit and wasadmin

      Hope this helps. Tell us if you need more support.

    Regards