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
  • 1.  Web and SIP security - URL security

    Posted Thu December 20, 2018 07:59 AM
    Hello everybody

    Can you tell me the best solution for the parameters below :

    ...And if it's possible, how to check during a test scenario the difference between these two parameters ? (Authenticate only when the URI is protected  AND Authenticate when any URI is accessed )

    Thanks for your help.

    ------------------------------
    Cédric A
    ------------------------------


  • 2.  RE: Web and SIP security - URL security

    Posted Fri December 21, 2018 03:38 AM
    Hello Cedric,
    the documentation says here:

    Authenticate only when the URI is protected

    The application server challenges the web client to provide authentication data when the web client accesses a Uniform Resource Identifier (URI) that is protected by a Java™ Platform, Enterprise Edition (Java EE) role. The authenticated identity is available only when the web client accesses a protected URI.

    i.e only if the application defines a resource as protected the client is challenged to authenticate. Via certificate, SAML, Form-Login etc.  whatever authentication mechanism is in place. An application can protect resources for example via security constraints in web.xml (https://docs.oracle.com/cd/E19798-01/821-1841/bncbk/index.html) or via annotations in the servlet code like for example:
    @DeclareRoles("snooprole")
    @ServletSecurity(@HttpConstraint(transportGuarantee = ServletSecurity.TransportGuarantee.NONE, rolesAllowed={"snooprole"}))

    In both cases you have to map the roles at deployment time to users, groups or special subjects.


    On the other hand

    Authenticate when any URI is accessed

    The web client must provide authentication data regardless of whether the URI is protected.

    In this case the user is challenged to authenticate no matter of there are security constraints defined for the URI or not. So accessing any servlet challenges the user.

    Note: Global and application security must be enabled to these settings to be active!

    Hope that helps.








    ------------------------------
    Hermann Huebler
    ------------------------------



  • 3.  RE: Web and SIP security - URL security

    Posted Fri December 21, 2018 03:47 AM
    Hello Hermann,

    Thanks for your answer
    So "Authenticate when any URI is accessed" is the best solution or rather the most secure solution ?
    And the only test that can be done in "prod" to verify the effect of this parameter is that the application will require authentication each time?

    ------------------------------
    Cédric A
    ------------------------------



  • 4.  RE: Web and SIP security - URL security
    Best Answer

    Posted Wed January 02, 2019 04:46 AM
    Hello Cédric,
    sorry for the delay. Well - it depends on what you want, what you user population is and what you your business requirements are.
    For example - if you have a site which is targeting all internet users using "Authenticate when any URI is accessed" is not an option as you are locking out everybody who is not in your user registry. On the other side - if you are running an internal site and you know that all resources must be protected "Authenticate when any URI is accessed" is  an option as you are not relying on the application settings regarding secured resources but are configuring that on the cell level.

    Hope that helps and clarifies. Have a Happy New Year - Hermann

    ------------------------------
    Hermann Huebler
    ------------------------------



  • 5.  RE: Web and SIP security - URL security

    Posted Thu January 03, 2019 02:34 AM
    Hello Hermann,
    I understand the difference better.
    Thank you for your help and happy new year 2019 to you!

    ------------------------------
    Cédric A
    ------------------------------