Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

GetFile function to call Adobe AEM Repository is not providing back the data stream

Avatar

Avatar
Affirm 1
Level 2
gauravtyagi
Level 2

Likes

10 likes

Total Posts

23 posts

Correct Reply

2 solutions
Top badges earned
Affirm 1
Boost 5
Boost 3
Give Back
Ignite 1
View profile

Avatar
Affirm 1
Level 2
gauravtyagi
Level 2

Likes

10 likes

Total Posts

23 posts

Correct Reply

2 solutions
Top badges earned
Affirm 1
Boost 5
Boost 3
Give Back
Ignite 1
View profile
gauravtyagi
Level 2

13-05-2021

Hi Guys,

 

I am trying to connect Pega PRPC to AEM , There are connect REST already given by Pega so we can invoke them to call AEM getFile API. Now I created folder named marketing under Assets and published using Publish option (There are other folders like we-retail/WKND Events etc also there under this Assets). Other APIs like creating new folder/new file creation works fine but getFile function to read data from AEM is not working. I am thinking if it is an issue with permissions on folder or permissions on file under Folder marketing or is it an admin user access issue. Could you please help me out to understand the user management here and authorization of user - what they can do and what they cant and how ? i thought admin will have access to everything.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 1
Level 2
gauravtyagi
Level 2

Likes

10 likes

Total Posts

23 posts

Correct Reply

2 solutions
Top badges earned
Affirm 1
Boost 5
Boost 3
Give Back
Ignite 1
View profile

Avatar
Affirm 1
Level 2
gauravtyagi
Level 2

Likes

10 likes

Total Posts

23 posts

Correct Reply

2 solutions
Top badges earned
Affirm 1
Boost 5
Boost 3
Give Back
Ignite 1
View profile
gauravtyagi
Level 2

13-05-2021

Thanks @Vijayalakshmi_S @Ritesh_M @Vaibhavi  - I am able to fix this issue now. Adobe experience manager in pega's context is context dependent and only works with decisioning applications context at the moment.

 

As Vaibhavi/Ritesh mentioned I am working to update the users and corresponding permissions to minimize the security risk due to admin usage. Thanks All for your kind support as always. Have a great time. 

Answers (3)

Answers (3)

Avatar

Avatar
Boost 5
Level 5
Ritesh_M
Level 5

Likes

101 likes

Total Posts

85 posts

Correct Reply

26 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Boost 5
Level 5
Ritesh_M
Level 5

Likes

101 likes

Total Posts

85 posts

Correct Reply

26 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
Ritesh_M
Level 5

13-05-2021

Hi @gauravtyagi ,

 

My advice would be to create a system user and then through sub service get resolver. You can assign the required privileges to the system user. That is a recommended way to access repository. Like below

 

Map<String, Object> param = new HashMap<String, Object>();
param.put(ResourceResolverFactory.SUBSERVICE, "getFileService");
ResourceResolver resolver = null;
try {
resolver = resolverFactory.getServiceResourceResolver(param);
Resource res = resolver.getResource("/content/your folder path");
.....
}

 

You can also refer this video for more insight.

Avatar

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

511 likes

Total Posts

647 posts

Correct Reply

213 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

511 likes

Total Posts

647 posts

Correct Reply

213 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile
Vijayalakshmi_S
MVP

13-05-2021

Hi @gauravtyagi,

Could you please let know if you get a chance to check the error message from errorCallback part of getFile() API. 

If you have already, please share the error message. 

Avatar

Avatar
Affirm 50
MVP
Vaibhavi
MVP

Likes

216 likes

Total Posts

181 posts

Correct Reply

61 solutions
Top badges earned
Affirm 50
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Affirm 50
MVP
Vaibhavi
MVP

Likes

216 likes

Total Posts

181 posts

Correct Reply

61 solutions
Top badges earned
Affirm 50
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile
Vaibhavi
MVP

13-05-2021

Hi @gauravtyagi , 

If you are using admin user, admin user will be having  full access rights such as read, write, modify, replicate ACL for all the existing folder and the child folder which inherits. 

If you have created any new folder , please make sure the permission is enabled. It is not advised to keep use the admin user for higher environments due to security concerns. 

 

For detailed understanding of user management, please have a check on below document 

https://experienceleague.adobe.com/docs/experience-manager-64/administering/security/security.html?l...