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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

gauravtyagi
Level 3
Level 3

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.

1 Accepted Solution
gauravtyagi
Correct answer by
Level 3
Level 3

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. 

View solution in original post

0 Replies
Vaibhavi
Community Advisor
Community Advisor

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...

Vijayalakshmi_S
Community Advisor
Community Advisor

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. 

Ritesh_M
Community Advisor
Community Advisor

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.

gauravtyagi
Correct answer by
Level 3
Level 3

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. 

View solution in original post