java ee - Looking for Flag to disable Auth in JSF web.xml -


I am looking for a simple truth / flag flag in web.xml to enable or disable authentication in JSF.

Status:

I have a web The following is the code for Xml authentication:

  & lt; Login-config & gt; & Lt; Auth-Method & gt; $ {Test.auth} & lt; / Auth-method & gt; & Lt; Radius name & gt; File & lt; / Circle-name & gt; & Lt; / Login-config & gt; & Lt; Security-roles & gt; & Lt; Description & gt; Examiner & lt; / Description & gt; & Lt; Role Name & gt; Examiner & lt; / Role Name & gt; & Lt; / Safety-roles & gt; & Lt; Security-lock & gt; & Lt; Display-name & gt; Test server-access & lt; / Display-name & gt; & Lt; Web resource collection & gt; & Lt; Web resource name & gt; Test server-access & lt; / Web resource name & gt; & Lt; Description / & gt; & Lt; URL pattern & gt; / * & Lt; / URL pattern & gt; & Lt; / Web resource collection & gt; & Lt; Auth-obstructing & gt; & Lt; Details & gt; Examiner Access & lt; / Description & gt; & Lt; Role Name & gt; Examiner & lt; / Role Name & gt; & Lt; / Auth-Barrier & gt; & Lt; User data-barrier & gt; & Lt; Details & gt; HTTPS login & lt; / Description & gt; & Lt; Transportation Guarantee & gt; Confidential & lt; / Transportation Guarantee & gt; & Lt; / User data-barrier & gt; & Lt; / Safety-barrier & gt;  

Everything is working as expected and very good for my purpose but there is one thing else as you can see that I have an absolute ( & lt; auth-method > $ {Test.auth} & lt; / auth-method> ) and it is working very well but now I want to disable the entire authorization system with such a supreme Need something like flags for I already have & lt; Auth-method> none & lt; / Auth-method> , but I think the system is still expecting a user in the role tester.

How do I

reference:

I have different environments for my application:

    • Development -> Do not Show any Profile

    • Test-Server -> Test Profile

    • Production-Server -> Product Profile

    To get that different behavior, I enter the web.xml filter and value through Maven, at construction time eg & lt; Auth-Method> $ {test.auth} & lt; / Auth-Method> .

    Thanks for the help.

I did not solve this "problem solved" url pattern for a never used site but it is not good Works for now: /.

  & lt; Login-config & gt; & Lt; Auth-Method & gt; Basic & lt; / Auth-method & gt; & Lt; Radius name & gt; File & lt; / Circle-name & gt; & Lt; / Login-config & gt; & Lt; Security-roles & gt; & Lt; Description & gt; Examiner & lt; / Description & gt; & Lt; Role Name & gt; Examiner & lt; / Role Name & gt; & Lt; / Safety-roles & gt; & Lt; Security-lock & gt; & Lt; Display-name & gt; Test server-access & lt; / Display-name & gt; & Lt; Web resource collection & gt; & Lt; Web resource name & gt; Test server-access & lt; / Web resource name & gt; & Lt; Description / & gt; & Lt; URL pattern & gt; $ {Test.url} & lt; / URL pattern & gt; & Lt; / Web resource collection & gt; & Lt; Auth-obstructing & gt; & Lt; Details & gt; Examiner Access & lt; / Description & gt; & Lt; Role Name & gt; Examiner & lt; / Role Name & gt; & Lt; / Auth-Barrier & gt; & Lt; User data-barrier & gt; & Lt; Details & gt; HTTPS login & lt; / Description & gt; & Lt; Transportation Guarantee & gt; Confidential & lt; / Transportation Guarantee & gt; & Lt; / User data-barrier & gt; & Lt; / Safety-barrier & gt;  

If there is any solution, then I appreciate the cleaner solution.


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -