I'm trying to access images in the dam from the third party pdf generator. I'm using oauthservice system user by the writeService OSGI configuration setting. I also gave permissions to oauthservice user. Now I'm unable to generate an image in the pdf. It worked in AEM 6.1, but not in AEM 6.3. Also, it's working if I provide "admin" username and password.But, I don't wanna use admin details. Can you please help if I'm missing anything here...
Did you read in the AEM documentation that this user type was supported?
I couldn't find anything that this is not supported. I might miss some thing. Can you please mention any documentation to implement this functionality in a recommended way.
Thanks in advance
Views
Replies
Total Likes
Typically to access a resource in the JCR - you need to use a session of an AEM user whom has permission to access this location.
Views
Replies
Total Likes
Yeah, That's true. Here I used oauthservice system user and gave permissions for the DAM images folder. But this is not working in 6.3
Views
Replies
Total Likes
For a test - can you try a normal AEM user with permission to access this JCR location.
Views
Replies
Total Likes
This worked but, here again, I have to mention username and password of the user in the service which I don't want to do. Is there any other way that I can do to achieve this?
Views
Replies
Total Likes
If you are writing an AEM Service (OSGi bundle) to get access to the JCR - you should be using an AEM System user and Sling Mapping Service as discussed here:
Views
Replies
Total Likes
Using a System user and Sling Mapping Service represents best practice to get a session.
Views
Replies
Total Likes
But, as I mentioned in my original question, I'm using the system user and Sling Mapping Service but pdf generator is not being able to access the images in dam
Views
Replies
Total Likes
Did not recognize oauthservice to mean a system user.
First - this is running as an AEM bundle on the local AEM instance - right?
When configuring the Sling Mapping Service - make sure you are specifying the Symbolic Bundle name as mentioned in the article that i referenced.
If you have not configured the Sling Mapping Service - then you will get a NULL in your code.
ALso - make sure the system user has the required permissions to access the JCR.
Watch the video too where we step you through all of this.
Views
Replies
Total Likes
I'm using this in SlingAllMethodsServlet coz every user should be able to generate pdf and the servlet is inside bundle. I configured the Bundle Symbolic name in the Sling Mapping Service configuration. I also checked that I gave permission to the oauthservice user for the location. But still not sure why pdf generator is not able to access the images.
below are the configs
config.setLicenseKey(license);
config.setBaseURL(URL);
config.setAuthenticationCredentials(new KeyValuePair("oauthservice", ""));
is there any wrong in this config setting because the same setting worked in 6.1 but, not in 6.3.
Yes, Scott is right..you need to use system user and Sling mapping service to get a session!!
Ratna.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies