Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4341

AccessTokenService does not identify the authentication scheme

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6
    • 2.6.1
    • JAX-RS Security
    • Novice

    Description

      Inside AccessTokenService when checking if the client is authenticated (method authenticateClientIfNeeded), the condition to find out the authentication scheme used by an already authenticated client compares to "Basic" and a value as "BASIC" evaluates it to false.

      In my environment (tomcat 7 + jdk 1.6 + CXF 2.6.1 last snapshot), after SSL activation and added the following security constraint to oauth2 endpoint:

      <security-constraint>
      <web-resource-collection>
      <web-resource-name>OAuth Services</web-resource-name>
      <url-pattern>/services/oauth2/token</url-pattern>
      </web-resource-collection>
      <auth-constraint>
      <role-name>OAUTH2_USER</role-name>
      </auth-constraint>
      </security-constraint>
      <login-config>
      <auth-method>BASIC</auth-method>
      <realm-name>OAuth services</realm-name>
      </login-config>

      SecurityContext.getAuthenticationScheme() always returns "BASIC". Wouldn't be better to ignore upper/lower case?

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            jordi Jordi Gerona
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: