error "Illegal repetition near index 14\n\/request\/[^\/]+\/{request_id}\n^"

He creado un servidor proxy inverso API, y cuando prueba dar la URL en el navegador para probar, se produce este mensaje de error:

{"fault":{"faultstring":"Illegal repetition near index 14\n\/request\/[^\/]+\/{request_id}\n              ^","detail":{"errorcode":"Bad Request"}}}

Por favor ¿alguien podría colaborarme para poder corregir lo que esté mal configurado ?.

la URL la estoy entrando así:

http://<name-org>-test.apigee.net/<Base_Path>?apikey=<api_key>;

Tengo definida la política "Verify API Key" así:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <VerifyAPIKey async="false" continueOnError="false" enabled="true" name="verify-api-key"> <DisplayName>Verify API Key</DisplayName> <APIKey ref="request.queryparam.apikey"/> </VerifyAPIKey>.

------------------------------------------

Además cuando intento hacer un Trace, se genera un Status "401" ("Unauthorized"). Para el Trace entro los siguientes datos:

URL: http://<name-org>-test.apigee.net/<Base_Path>;

HTTP Header: <v_authorization> = <valor de token generado en la aplicación>

Query Parameter: APIKey = uHknp4AY5AREkGWM1ZTksUbDpiwtTjVS

0 4 282
4 REPLIES 4

Sorry, I don't read Spanish very well.

Maybe you have a Regular Expression policy that is throwing a fault.

I don't think that the VerifyApiKey policy will throw the above fault.

Can you please take a screenshot of the Trace UI showing a transaction that results in the above fault?

The other policies I have are: "Remove Query Param apikey" and "CORSResponse".

------

CORSResponse:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <AssignMessage async="false" continueOnError="false" enabled="true" name="CORSResponse"> <DisplayName>CORSResponse</DisplayName> <FaultRules/> <Properties/> <Set> <Headers> <Header name="Access-Control-Allow-Headers">Origin, X-Requested-With, Content-Type, Accept, Authorization, apikey</Header> <Header name="Access-Control-Max-Age">3628800</Header> <Header name="Access-Control-Allow-Methods">GET, PUT, POST, DELETE, OPTION, OPTIONS</Header> <Header name="Access-Control-Allow-Origin">https://{DNS-application}</Header> </Headers> </Set> <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> <AssignTo createNew="false" transport="http" type="response"/> </AssignMessage>

------

Remove Query Param apikey:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <AssignMessage async="false" continueOnError="false" enabled="true" name="remove-query-param-apikey"> <DisplayName>Remove Query Param apikey</DisplayName> <Remove> <QueryParams> <QueryParam name="apikey"/> </QueryParams> </Remove> <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> <AssignTo createNew="false" transport="http" type="request"/> </AssignMessage>

sidd-harth
Participant V

Also please explain why you are using HTTP Authorization Header & how it is validated?

Generally speaking the 401 status code in Trace doesnt even match the fault you are showing, you should be getting 400 Bad Request.

As for the Header "Authorization", the data is a token that I previously generated in the swagger. All Rest service of the application requires this token. Before using the "Authorization" data here in the Trace, I have previously verified that the swagger works for me.

Regarding the difference of types of error "400" and "401", I am aware of this, and it is partly what generates uncertainty: I have searched and can not find what the problem is.

Siddharth I already sent my information to your email. I'm waiting for your answer. Thank you.