"/" mandatory as a resouce path if api-key authentication is required

Not applicable

Hi,

I've created a proxy with a127 and added api-key security as described in https://github.com/apigee-127/a127-documentation/w... When I deploy this proxy on my edge-server and create a product including this proxy, registered developer apps get the following message when they try to call the proxy:

"com.apigee.rest.framework.ResourceNotFoundException{ code = keymanagement.service.apiresource_doesnot_exist, message = APIResource / does not exist, associated contexts = []}"

I can solve this issue by adding "/" as a Resource Path to the product. Is this the way to go or does it expose any security issues? A products with "/" as a Resource-Path and without any proxies attached to it allowes its users to call any proxy deployed on the edge server.

When I add a proxy, the clients are restricted to use only the proxies definined within the product. This is the desired behaviour.

Regards,

Frederik

Solved Solved
0 6 353
1 ACCEPTED SOLUTION

Dear @Frederik Priede ,

When you create an API Product, You will choose API Proxies & resource paths. "/" always refers to that particular API Proxies you have selected in API Product. So it doesn't give access to any other proxies except the selected one in API Product. You can choose multiple proxies using + API Proxy button.

Below widget just helps you to select resource paths & API Proxies. You can add multiple API Proxies using + API Proxy button below the attached screenshot.

1096-screen-shot-2015-09-07-at-30017-pm.png

When you deploy Apigee-127 proxy to Apigee Edge, It deploys as an Node.JS application running on Apigee Edge. If you need more flexibility with flows, policies and conditional flows then try our Swagger2API command line tool which converts swagger spec to Apigee Edge API Proxies.

More details regarding swagger2api you can find in below articles, Hope it will be helpful.

https://community.apigee.com/articles/8796/swagger...

https://community.apigee.com/articles/9478/swagger...

Cheers,

Anil Sagar

View solution in original post

6 REPLIES 6

Dear @Frederik Priede ,

When you create an API Product, You will choose API Proxies & resource paths. "/" always refers to that particular API Proxies you have selected in API Product. So it doesn't give access to any other proxies except the selected one in API Product. You can choose multiple proxies using + API Proxy button.

Below widget just helps you to select resource paths & API Proxies. You can add multiple API Proxies using + API Proxy button below the attached screenshot.

1096-screen-shot-2015-09-07-at-30017-pm.png

When you deploy Apigee-127 proxy to Apigee Edge, It deploys as an Node.JS application running on Apigee Edge. If you need more flexibility with flows, policies and conditional flows then try our Swagger2API command line tool which converts swagger spec to Apigee Edge API Proxies.

More details regarding swagger2api you can find in below articles, Hope it will be helpful.

https://community.apigee.com/articles/8796/swagger...

https://community.apigee.com/articles/9478/swagger...

Cheers,

Anil Sagar

Hi,

thanks for your fast reply @Anil Sagar. But I am a little bit confused right now. When I add a proxy to my product, I just click the "+ Api Proxy" button (3) and select the proxy without selecting a particular revision. I want to create some products containing multiple proxies.

1098-example.png

I can for instance select the API-Proxy from the first select-box on top of the form (1) and select a revision and a resource path. But when I try to add a second proxy to my product, I get an error because the resource path has already been imported.

When I select the forecast-Proxy from the top select box (1) and add it, the selected proxy shows up at (3) and the selected resource path under (2). Does the under (1) selected resource-path which shows up at (2) refer to all proxies later added to the product? Or is the way I am using to create products not correct?

Thanks,

Frederik Priede

Dear @Frederik Priede ,

Please find more details below.

(1) Resource section is used primarily to add resource paths. You select the API Proxy, Select the Revision, Selection the resource Path and click import resource. Once you have done that you will notice both paths & API proxies gets populated.

** Revision is used only to list resource paths dropdown. It's not linked to product any way. At the end only resource paths & API Proxies matters for API Product.

** You can also add custom resource path , You can add resources either by selecting one from an existing API proxy API Proxy, Revision, and a Resource Path (then click Import Resource), or by clicking +Custom Resource and adding a free-form resource pattern.

Regarding ,

But when I try to add a second proxy to my product, I get an error because the resource path has already been imported.

yes, It's by design. For your case, use (3) and add other API proxy which will be applicable for same resource path.

Does the under (1) selected resource-path which shows up at (2) refer to all proxies later added to the product?

Yes, It refers to all policies selected in (3).

You can create multiple API Products and you have all the flexibility. You can also use /** wild card to refer to all the resources in API Proxy. Find more about creating API products here.

Cheers,

Anil Sagar

@Frederik Priede , I have updated my answer to avoid confusion. Hope it helps.

Thanks a lot! Your answers helped me solving my confusion.

Anytime 🙂 , Glad your issue is resolved. If above issue is resolved, Don't forget to hit "Accept" below the answer that fully addressed your question. It ensures that the next user with the same question will have the best answer at their fingertips. Thank you..