IBM Cloud: App ID is not Authenticating on localhost, but works on CF

238 Views Asked by At

I am trying to run IBM App ID on localhost. The App ID Login Widget is coming up. But after login it is not redirecting to my application. It is showing the login page again.

The same codebase is running on CF instance very well.

URL : https://us-south.appid.cloud.ibm.com/oauth/v4/xxxxxxx-62a9-4a02-8710-f421c59571a5/authorization?response_type=code&client_id=xxxxxxx-4c08-4f11-8370-181061306b65&state=001630038048040MsOwH2vS2&redirect_uri=https://localhost:9443/ne/oidcclient/redirect/MyRP&scope=openid+profile&language=en

Server.xml

    <server description="new server">
    <!-- Enable features -->
    <featureManager>
    <feature>jsp-2.3</feature>
    <feature>localConnector-1.0</feature>
    <!-- Features for APP ID -->
    <feature>servlet-3.1</feature>
    <feature>appSecurity-2.0</feature>
    <feature>openidConnectClient-1.0</feature>
    <feature>ssl-1.0</feature>
    </featureManager>
    <authFilter>
      <requestUrl matchType="notContain" urlPattern="/getToken"/>
     </authFilter>
     <!-- To access this server from a remote client add a host attribute to the following 
      element, e.g. host="*" -->
    <httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>

    <!-- Automatically expand WAR files and EAR files -->
    <applicationManager autoExpand="true" startTimeout="15m"/>

     <webContainer extractHostHeaderPort="true" trustHostHeaderPort="true"/>   
     <applicationMonitor dropinsEnabled="false" updateTrigger="mbean"/>
     <config updateTrigger="mbean"/>
     <applicationMonitor updateTrigger="mbean"/>

    <!-- 
    <keyStore id="opTestKeyStore" location="\resources\security/mytruststore.jks" type="JKS" 
     password="keystorePwd" />
    <openidConnectProvider id="OAuthConfigSample" oauthProviderRef="OAuthConfigSample" 
     signatureAlgorithm="RS256" keyStoreRef="opTestKeyStore" keyAliasName="myOpKeyAlias" />
     -->

     <keyStore id="defaultKeyStore" password="${keystore_password}"/>
     <ssl id="oidcClientSSL" keyStoreRef="defaultKeyStore" trustDefaultCerts="true"/>

      <openidConnectClient authFilterid="myAuthFilter" 
      authorizationEndpointUrl="${APP_ID_OAUTH_SERVER_URL}/authorization" 
      clientId="${APP_ID_CLIENT_ID}" clientSecret="${APP_ID_CLIENT_SECRET}" id="MyRP" 
      issuerIdentifier="${APP_ID_OAUTH_SERVER_URL}" 
      jwkEndpointUrl="${APP_ID_OAUTH_SERVER_URL}/publickeys" 
          redirectToRPHostAndPort="https://localhost:9443/ne/" signatureAlgorithm="RS256" 
       tokenEndpointAuthMethod="basic" tokenEndpointUrl="${APP_ID_OAUTH_SERVER_URL}/token"/>
 
      <logging consoleLogLevel="INFO" logDirectory="${application.log.dir}"/>

      <!--  <webApplication id="ne" location="ne-1.0.0-BUILD-SNAPSHOT.war" name="ne"/>-->

       <webApplication id="ne" location="ne-1.0.0-BUILD-SNAPSHOT.war" name="ne"/>
       </server>
0

There are 0 best solutions below