How I can configure a Proxy API which is targeting an endpoint that requires JWT Token based Authentication

arman
New Member
 
Solved Solved
0 7 438
1 ACCEPTED SOLUTION

Not applicable

if the backend is expecting a jwt token based authentication, then you have to send the jwt token in the request to the backend.

For example, you hit the api with a jwt token in header, that token will go to the backend in a header. The backend will collect that token and will validate against jwks key or it will validate making call to the jwks source.

View solution in original post

7 REPLIES 7

Not applicable

if the backend is expecting a jwt token based authentication, then you have to send the jwt token in the request to the backend.

For example, you hit the api with a jwt token in header, that token will go to the backend in a header. The backend will collect that token and will validate against jwks key or it will validate making call to the jwks source.

Thank you, @Priyadarshi, I am new to apigee, please can you advise me how I can configure this type of process with apigee Edge, I was not able to find any documentation which directs how to make sure that bearer token applied in the query to the proxy endpoint is automatically applied by proxy to hit the backend endpoint as well.

Hi Arman, you need not do much things. Apigee by default passes the request query params and headers to the backend.

Instead of query param, I would suggest to send the bearer token in the header.

Apigee proxy will be a simple pass through proxy, which will have the target endpoint url to the backend.

You can add other policies like traffic control or any other security etc later.

To begin , it is fine to have the pass through pointing to the backend and in header pass the bearer token.

Thanks, another newbe question, lest say in the API URL there are few parameters which I would like to pass through as well. For example, let's say https://backend.api.com/new/x this is the backend endpoint how I can map the https://proxy.api.com/y y from the proxy API to the x in the backend API, so as long as user provides value to y (such as 15) it passes thought and populates same value for the x. Thanks again for the previous answer

Thanks, another newbe question, lest say in the API URL there are few parameters which I would like to pass through as well. For example, let's say https://backend.api.com/new/x this is the backend endpoint how I can map the https://proxy.api.com/y y from the proxy API to the x in the backend API, so as long as user provides value to y (such as 15) it passes thought and populates same value for the x. Thanks again for the previous answer

it will go automatically.

example:

if the proxy url base path is v1/abc

the url : https://apigee.com/v1/abc

backend: https://backend.api.com/new

you need to hit https://apigee.com/v1/abc/x

it will go to backend: https://backend.api.com/new/x

Thank you for the reply!