Access DAM assets publicly without logging in to AEM | Community
Skip to main content
Level 2
December 27, 2022
Solved

Access DAM assets publicly without logging in to AEM

  • December 27, 2022
  • 2 replies
  • 1684 views

Hi,

 

I want access assets outside AEM, publicly so that the URL is passed as source of an API call, solution required which does not include allowing anonymous access to DAM folder.

 

Regards 

Nandan

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Monendra_Singh

Hi Nandan,

Using signed URLs allows you to access assets stored in AEM externally without allowing anonymous access to the DAM folder. For more details you can refer https://medium.com/@monendra80/enabling-anonymous-access-to-aem-assets-with-signed-urls-4b5342f73c4d

 

Hope this helps.

Thanks,

Monendra

2 replies

Monendra_Singh
Monendra_SinghAccepted solution
Level 3
December 27, 2022

Hi Nandan,

Using signed URLs allows you to access assets stored in AEM externally without allowing anonymous access to the DAM folder. For more details you can refer https://medium.com/@monendra80/enabling-anonymous-access-to-aem-assets-with-signed-urls-4b5342f73c4d

 

Hope this helps.

Thanks,

Monendra

April 3, 2024
SignedUrlOptions options = new SignedUrlOptions(assetResource.getPath())

 

Where can I find this class SignedUrlOptions? What package? What dependency?

Thank you!!

aanchal-sikka
Community Advisor
Community Advisor
December 27, 2022

Hello @nandango1 

JWT tokens can be used to access AEM resources. 

  • The first step in using AEM Resource is to generate JWT using client Id and client secret from AEM instance. These values can be obtained either from developer console of Cloud Manager/ OSGI Config.
  • Creating a JSON Web token: https://github.com/adobe-apiplatform/umapi-documentation/blob/master/samples/JWTExchange.py
  • Pass the signed, base-64 encoded JWT as the value of the URL-encoded jwt_token parameter in the body of the POST request in exchange for access token.
  • Pass the Resource URL with appropriate HTTP Authorization header. The header includes the access token from above. The access token is valid for 24 hours.

headers = {

    "Content-type" : "application/json",

    "Accept" : "application/json",

    "x-api-key" : api_key,

    "Authorization" : "Bearer " + access_token

    }

  • The subsequent requests are then the Resource URL with the authorization header to AEM and this will return the resource to the external system.
  •  

For details, please refer to: https://experience-aem.blogspot.com/2021/07/aem-cloud-service-get-adobe-ims-jwt-and-aem-access-token-using-post-man-aem-sso.html

https://experienceleague.adobe.com/docs/experience-manager-learn/forms/aem-forms-with-adobe-campaign/partone.html?lang=en 

 

Thanks,

Aanchal

Aanchal Sikka