How to use two dynamic media replication agents in aem with different permissions? | Community
Skip to main content
Level 2
Jan 10, 2019 11:38 AM UTC
Solved

How to use two dynamic media replication agents in aem with different permissions?

Hi

We are using adobe dynamic media to display images and videos on front end.

We have a scenario where we need to have two dynamic media servers for different countries.

Based on path we need to send images on corresponding dynamic meida servers.

For example images under /content/dam/a--> Dynamic media 1

images under /content/dam/b--> Dynamic media 2

For this we have configured two s7delivery replication agent and given different persmissions to agents as below.

1. dynamic-media-replication agent have read/replicate permission on /content/dam/a

2. dynamic-media-replication-new agent have read/replicate permission on /content/dam/b

However when we are trying to test connection using 2nd agent we are getting below exception:

com.day.cq.replication.ReplicationException: Impersonation not allowed.

    at com.adobe.cq.dam.aod.replication.S7DeliveryContentBuilder.getResolver(S7DeliveryContentBuilder.java:158)

On further analysis we found that in com.adobe.cq.dam.aod.replication.S7DeliveryContentBuilder.java there is code

where dynamic-media-replication systen user tries to impersonate agent id(dynamic-media-replication-new in this case) where it is failing with above exception

Any pointers on how to handle this scenario?

Attached screenshot for same:

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
mmohta11Accepted solution
Level 2
Jan 12, 2019 5:16 AM UTC

After adding dynamic-media-replication as impersonator in dynamic-media-replication-new and giving read access to dynamic-media-replication for /home it worked.

5 replies

mmohta11AuthorAccepted solution
Level 2
Jan 12, 2019 5:16 AM UTC

After adding dynamic-media-replication as impersonator in dynamic-media-replication-new and giving read access to dynamic-media-replication for /home it worked.

Translate
mmohta11Author
Level 2
Jan 10, 2019 12:15 PM UTC

Just to add on above we are using AEM 6.2

Translate
mmohta11Author
Level 2
Jan 10, 2019 12:06 PM UTC

1st Agent is working fine. However if we add dynamic-media-replication-new in sling mapper above existing dynamic-media-replication

2nd agent succeeds in connection but 1st one fails with same excption

com.day.cq.replication.ReplicationException: Impersonation not allowed.

    at com.adobe.cq.dam.aod.replication.S7DeliveryContentBuilder.getResolver(S7DeliveryContentBu ilder.java:158)

Translate
smacdonald2008
Level 10
Jan 10, 2019 12:04 PM UTC

Also - check this doc to ensure you have followed everything properly.

Configuring Dynamic Media

Translate
smacdonald2008
Level 10
Jan 10, 2019 11:45 AM UTC

I am checking with out internal team to see if this is a known issue. In your example - your 1st agent works fine.

Translate