KB Article #179315

OAuth flow request fails with ID not found error.

Problem


OAuth flow request fails with ID not found error.

Resolution


An OAuth flow transaction fails with the following error:



java exception:
com.vordel.kps.ObjectNotFound: KPS: API Server_PortalOAuthStore: Object with id: 'xxxxx , not found.
at com.vordel.kps.storeImpl.cassandra.CassandraStore.primaryKeyQuery(CassandraStore.java:388)
at com.vordel.kps.storeImpl.cassandra.CassandraStore.get(CassandraStore.java:339)
at com.vordel.kps.storeImpl.cassandra.CassandraTransaction.getInternal(CassandraTransaction.java:47)
at com.vordel.kps.storeImpl.AbstractTransaction.get(AbstractTransaction.java:109)
at com.vordel.kps.storeImpl.AbstractTransaction.get(AbstractTransaction.java:139)
at com.vordel.persistence.kps.KpsStorage.read(KpsStorage.java:120)
at com.vordel.common.apiserver.controller.BaseApplicationController.getApplicationDetails(BaseApplicationController.java:214)
at com.vordel.apiportal.api.portal.controller.ApplicationController.getOAuthApplication(ApplicationController.java:994)
at com.vordel.circuit.oauth.common.OAuth2Utils.getAppDetailsFromClientId(OAuth2Utils.java:378)
at com.vordel.circuit.oauth.provider.grants.SAMLBearerAssertionGrantProcessor.validateAssertion(SAMLBearerAssertionGrantProcessor.java:116)
at com.vordel.circuit.oauth.provider.grants.SAMLBearerAssertionGrantProcessor.invoke(SAMLBearerAssertionGrantProcessor.java:76)
at com.vordel.circuit.InvocationEngine.invokeFilter(InvocationEngine.java:146)
at com.vordel.circuit.InvocationEngine.invokeCircuit(InvocationEngine.java:38)
at com.vordel.circuit.InvocationEngine.recordCircuitInvocation(InvocationEngine.java:272)
at com.vordel.circuit.InvocationEngine.processMessage(InvocationEngine.java:235)
at com.vordel.circuit.SyntheticCircuitChainProcessor.invoke(SyntheticCircuitChainProcessor.java:65)
at com.vordel.dwe.http.HTTPPlugin.processRequest(HTTPPlugin.java:432)
at com.vordel.dwe.http.HTTPPlugin.invokeDispose(HTTPPlugin.java:451)
at com.vordel.dwe.http.HTTPPlugin.invoke(HTTPPlugin.java:144)



The OAuth request includes a ClientID. This ClientID should match a Client ID created in
Client registry -> Applications -> Authentication.



(This will normally be via API Manager but can be simply done via Client Registry for clients
who do not have API Manager installed.)



These entries are stored in the KPS PortalOAuthStore table and can also be checked via KPSadmin.
Ensuring that the ClientID in the request matches a PortalOAuthStore table entry avoid this error.