Access Entity Policy secondIdentifier

Hi Team,

Some one could you please share me the configuration for entity types (apiproduct/app)

example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><AccessEntityasync="false"continueOnError="false"enabled="true"name="GetApp"><DisplayName>GetAppProfile</DisplayName><EntityTypevalue="apiproduct"></EntityType><EntityIdentifierref="developer.app.name"type="appname"/> <SecondaryIdentifierref="developer.id"type="developerid"/> </AccessEntity>

Kindly share the same configuration with secondIdentifier apiresource,appid,appname,devloperid,developername. I would like to know where I can those information as well.

0 3 462
3 REPLIES 3

You can refer to the below documentation on the entity types configuration.

https://docs.apigee.com/api-platform/reference/policies/access-entity-policy#Entities

Hi Nagashree,

I have already read the document. My question is different actually.

I would like to use second identifier as apiresource in access entity proxy for the apiproduct entity.

How should I mention the apiresource value , what is that? where can i find that? in API Proxy or Dev App or Products

with one identifier I am able to retrieve the data , but with second identifer I am not.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <AccessEntity async="false" continueOnError="false" enabled="true" name="Access-Entity-2"> <DisplayName>Access Entity-2</DisplayName> <Properties/> <EntityIdentifier ref="consumerKey" type="consumerkey"/> <SecondaryIdentifier ref="apiResource" type="apiresource"/> <EntityType value="apiproduct"/> </AccessEntity>

my api proxy

http://mhrnbal-eval-test.apigee.net/dina

api resource value I have passed is /dina . but product attribute values are returned.

First, let's clarify that you have a scenario that applies. If

  • you have a single credential (apikey (aka consumerkey) or token),
  • that credential is authorized for multiple API Products,
  • you are retrieving the API Product via AccessEntity policy using the credential
  • THEN, it makes sense to employ a "secondaryresourceid" to stipulate which API product to retrieve.

One possible secondary identifier is apiresource. This is the thing you configure on the API Product , which is mapped against the path suffix of each aPI proxy.

If your proxy listens on /dina then the resource is everything in the inbound request that falls AFTER /dina . IF the inbound request is /dina/foo , then the resource is /foo .