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.  OAUTH client not found

    Posted Wed February 16, 2022 12:08 PM
    Hello,

    I confugred OAUTH as described in OAuth 2.0 services. I copied the configuration file OAuthProviderConfiguration.xml (unmodified copy of OAuthConfigSample.xml) to the directory /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/DefaultCell01/oauth20. I copied the following base.clients.xml to the same directory:

    <?xml version="1.0" encoding="UTF-8"?>
    <OAuthClientConfiguration>
    <client id="FundingPilotMock"
    component="OAuthProviderConfiguration"
    secret="FundingPilotMockSecret"
    displayname="FundingPilotMock"
    redirect="http://localhost:8080/fundingpilot/"
    enabled="true">
    </client>
    </OAuthClientConfiguration>

    The OAuthTAI. interceptor configuration looks like this:


    When I request a OAUT token with the follwing URL:

    http://localhost:9080/oauth2/endpoint/OAuthProviderConfiguration/token?grant_type=client_credentials&client_id=FundingPilotMock&client_secret=FundingPilotMockSecret&username=wsadmin&password=<password>

    I get the follwing error in the WebSphere log:

    [2/16/22 16:37:12:376 UTC] 000000aa ServletWrappe I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [WebSphereOauth20SP] [/oauth2] [OAuth20EndpointServlet]: Initialization successful.
    [2/16/22 16:37:12:402 UTC] 000000aa OAuth20Provid E CWOAU0038E: The client could not be verified. Either the client ID: FundingPilotMock or client secret is incorrect.

    Why is the client not found (or verified)?

    Kind regards
    Thomas




    ------------------------------
    Thomas Mayr
    ------------------------------