Layer7 API Management

  • 1.  error in the call to "/auth/oauth/v2/token"

    Posted Nov 16, 2017 10:47 AM

    From the portal we have created an application, and when invoking to obtain the token using "Client Credentials Grant", we get the following error:

     

    error: invalid_request, error_description: invalid client_id or invalid registration: client_id: '${client_id}'

     

    Can somebody help me.

     

    2017-11-16T16:43:43.934+0100 INFO 1806 com.l7tech.server.message: Processing request for service: auth/oauth/v2/token [/auth/oauth/v2/token] 2017-11-16T16:43:43.935+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${requireClientCert} is equal to true 2017-11-16T16:43:43.935+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${grant_type} is equal to ${grant_type_jwt} 2017-11-16T16:43:43.935+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${grant_type} is equal to ${grant_type_password} 2017-11-16T16:43:43.935+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${grant_type} is equal to ${grant_type_refresh_token} 2017-11-16T16:43:43.935+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${grant_type} is equal to ${grant_type_authorization_code} 2017-11-16T16:43:43.935+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${requestAuthHeader} is not empty 2017-11-16T16:43:43.936+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7103: At least one comparison value was null 2017-11-16T16:43:43.936+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7103: At least one comparison value was null 2017-11-16T16:43:43.936+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${useOTKDB} is equal to false 2017-11-16T16:43:43.936+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${master} is empty 2017-11-16T16:43:43.936+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${maxEntrySize} is not empty 2017-11-16T16:43:43.936+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${maxEntrySize} is not empty 2017-11-16T16:43:43.936+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${maxEntries} is not empty 2017-11-16T16:43:43.936+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${maxEntries} is not empty 2017-11-16T16:43:43.937+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${cache.op} is equal to GET 2017-11-16T16:43:43.937+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${cache.op} is equal to GET 2017-11-16T16:43:43.937+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${cache.op} is not equal to GET 2017-11-16T16:43:43.937+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${cache.op} is not equal to GET 2017-11-16T16:43:43.937+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${client_and_key.queryresult.count} is greater than 0 2017-11-16T16:43:43.937+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${format} is equal to json 2017-11-16T16:43:43.937+0100 INFO 1806 com.l7tech.server.policy.assertion.ServerAuditDetailAssertion: -4: error: invalid_request, error_description: invalid client_id or invalid registration: client_id: 'l7xxfe72b79ee4e648f695bfc0dc925bb9b4' 2017-11-16T16:43:43.937+0100 WARNING 1806 com.l7tech.server.policy.assertion.ServerResponseXpathAssertion: 4701: Response not XML; cannot evaluate XPath expression 2017-11-16T16:43:43.937+0100 INFO 1806 com.l7tech.server.policy.assertion.ServerAuditDetailAssertion: -4: error: invalid_request, error_description: invalid client_id or invalid registration: client_id: 'l7xxfe72b79ee4e648f695bfc0dc925bb9b4' 2017-11-16T16:43:43.938+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${error.code} is empty 2017-11-16T16:43:43.938+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${isValidationLocal} is equal to false 2017-11-16T16:43:43.938+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${requestAuthHeader} matches ^\b[Bb][Aa][Ss][Ii][Cc]\b\s.+ 2017-11-16T16:43:43.938+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to custom 2017-11-16T16:43:43.938+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 140 2017-11-16T16:43:43.938+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 142 2017-11-16T16:43:43.938+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 143 2017-11-16T16:43:43.938+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 144 2017-11-16T16:43:43.938+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 145 2017-11-16T16:43:43.939+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 147 2017-11-16T16:43:43.939+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 148 2017-11-16T16:43:43.939+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 149 2017-11-16T16:43:43.939+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 150 2017-11-16T16:43:43.939+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 151 2017-11-16T16:43:43.939+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 152 2017-11-16T16:43:43.939+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 154 2017-11-16T16:43:43.939+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 101 2017-11-16T16:43:43.939+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 102 2017-11-16T16:43:43.939+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 104 2017-11-16T16:43:43.940+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 105 2017-11-16T16:43:43.940+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 106 2017-11-16T16:43:43.940+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 107 2017-11-16T16:43:43.940+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 108 2017-11-16T16:43:43.940+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 111 2017-11-16T16:43:43.940+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 206 2017-11-16T16:43:43.940+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 990 2017-11-16T16:43:43.940+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 991 2017-11-16T16:43:43.940+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 992 2017-11-16T16:43:43.941+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 993 2017-11-16T16:43:43.941+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 114 2017-11-16T16:43:43.941+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 123 2017-11-16T16:43:43.941+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 124 2017-11-16T16:43:43.941+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${givenErrorCode} is equal to 110 2017-11-16T16:43:43.941+0100 WARNING 1806 com.l7tech.server.policy.assertion.composite.ServerHandleErrorsAssertion: 11000: Policy processing caught an exception: RaiseErrorAssertion is stopping execution. 2017-11-16T16:43:43.941+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${isCached} is equal to true 2017-11-16T16:43:43.941+0100 INFO 1806 com.l7tech.external.assertions.comparison.server.ServerComparisonAssertion: 7101: Comparison did not match: ${isPreflight} is equal to true 2017-11-16T16:43:43.941+0100 INFO 1806 com.l7tech.server.MessageProcessor: 3017: Policy evaluation for service auth/oauth/v2/token [e001cfd0c1c1ffaa18e187b5e72fdd38] resulted in status 600 (Assertion Falsified) 2017-11-16T16:43:43.942+0100 WARNING 1806 com.l7tech.server.message: Message was not processed: Assertion Falsified (600)



  • 2.  Re: error in the call to "/auth/oauth/v2/token"
    Best Answer

    Broadcom Employee
    Posted Nov 17, 2017 06:20 PM

    Good afternoon,

     

    I've reviewed through cases with similar issues and found one that was opened by your colleague at the same time this community post was made. The resolution appears to have been using a database schema from an earlier version of the OTK version, which did not have fields that required the API for token.

     

    Please let us know if this was indeed correct.

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support



  • 3.  Re: error in the call to "/auth/oauth/v2/token"

    Posted Nov 18, 2017 05:20 AM

    Well the problem originates because we wanted to use the API Portal to manage the data of the applications (key and secret - OAuth2), the error that I exposed before originated before applying:

     

    Manage OAuth Clients with CA API Portal - CA API Management OAuth Toolkit - 4.0 - CA Technologies Documentation 

     

    When we executed the above, I still had the error, and that was when @juanlopezrubio helped us discover that the installation had a different database schema for the otk.

     

    Tk,