Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-10308

PolicyContext.getContext("javax.security.auth.Subject.container")

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • None
    • Security
    • None
    • Hide

      WildFly Elytron doesn't need to be 'enabled' it is already enabled by default, just not in use by default.

      • Configure it to perform HTTP BASIC authentication at the web layer

      The steps so the application use use Elytron based security are: -

      • Add a new user to the application realm, as an example I add a user 'test' with a password of 'password'
      • The test application is using the 'jmx-console' security domain, execute the following CLI command to map this to an Elytron http-authentication-factory: -
      ./subsystem=undertow/application-security-domain=jmx-console:add(http-authentication-factory=application-http-authentication)
      
      • Deploy SimpleWar.war
      deploy SimpleWar.war
      
      • Call the web application.
      curl -v http://localhost:8080/SimpleWar/Hello -u test:password
      
      • the web page will print out the results of the PolicyContext.getContext() call
      Show
      WildFly Elytron doesn't need to be 'enabled' it is already enabled by default, just not in use by default. Configure it to perform HTTP BASIC authentication at the web layer The steps so the application use use Elytron based security are: - Add a new user to the application realm, as an example I add a user 'test' with a password of 'password' The test application is using the 'jmx-console' security domain, execute the following CLI command to map this to an Elytron http-authentication-factory: - ./subsystem=undertow/application-security-domain=jmx-console:add(http-authentication-factory=application-http-authentication) Deploy SimpleWar.war deploy SimpleWar.war Call the web application. curl -v http://localhost:8080/SimpleWar/Hello -u test:password the web page will print out the results of the PolicyContext.getContext() call

      PolicyContext.getContext("javax.security.auth.Subject.container") returns null when using elytron to protect a web application.

      This should return the authenticated subject.

            darran.lofthouse@redhat.com Darran Lofthouse
            rhn-engineering-lgao Lin Gao
            Petr Adamec Petr Adamec
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: