Bild für Projekt hochgeladen: 'CXF'
  1. CXF
  2. CXF-5592

HttpServletRequestFilter in RequestDispatcherProvider do not returns correct RequestURI path

Dateien anhängenScreenshot anhängenWähler anzeigenVorgang beobachtenBeobachter verwaltenUnteraufgabe erstellenVerknüpfungKlonenVerfasser des Kommenta...Zeichenfolge im Kommen...Update Comment VisibilityKommentare löschen
    XMLWordAusdruckbarJSON

    Details

    • Typ: Bug
    • Status: Geschlossen
    • Priorität: Unwesentlich
    • Lösung: Behoben
    • betrifft Version(en): 2.7.8
    • Lösungsversion(en): 2.7.11, 3.0
    • Komponente(n): JAX-RS
    • Stichwörter:
      Keine
    • Estimated Complexity:
      Unknown

      Beschreibung

      I have set up RequestDispatcherProvider to redirect from OAuth 2.0 authorization service (implemented by AuthorizationCodeGrantService) to different JAX-RS service, both served by the same CXFServlet.
      The problem is HttpServletRequestFilter in RequestDispatcherProvider do not returns correct RequestURI path - the context root path of the web application is missing.

      RequestURI is used then by HttpUtils to built JAX-RS service matching path and since the request URI is not correct, the service is not found.

      Configuration of request dispatcher is the following:

      <bean id="dispatchProvider" class="org.apache.cxf.jaxrs.provider.RequestDispatcherProvider">
              <property name="classResources">
                  <map>
                      <entry key="org.apache.cxf.rs.security.oauth2.common.OAuthAuthorizationData" value="/oauth2/implicitauthorize"/>
                  </map>
              </property>
              <property name="beanNames">
                  <map>
                      <entry key="org.apache.cxf.rs.security.oauth2.common.OAuthAuthorizationData" value="data"/>
                  </map>
              </property>
              <property name="logRedirects" value="true"/>
          </bean>
      

      Comments:
      "rest" is the name of the application (context root where the application is deployed)
      "/*" is CXFServlet's URL pattern
      "/oauth2" is the jaxrs:server address
      "/implicitauthorize" is the path of the mentioned JAX-RS service where the redirect should go

        Anhänge

          Aktivität

          $i18n.getText('security.level.explanation', $currentSelection) Anzeigbar durch alle Benutzer
          Abbrechen

            Personen

            • Bearbeiter:
              sergey_beryozkin Sergey Beryozkin
              Autor:
              michal.sabo Michal Sabo

              Daten

              • Erstellt:
                Aktualisiert:
                Erledigt:

                Vorgangsbereitstellung