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

How to Configure Dynamic Media on AEM 6.3 Publish Instance?

Avatar

Avatar
Validate 1
Level 1
everseeker
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
everseeker
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
everseeker
Level 1

19-01-2018

Hi,

I have successfully configured the Dynamic Media on AEM 6.3 with aem-6.3.1-cfp-1.0.zip. There is a custom video component uses the below code snippet which works perfectly fine on author instance but does not work on publish instance. Feature Packs 14410 and 18912 are NOT INSTALLED

public String extractVideoServerUrl() {
    final Optional<String> videoServerUrl = ofNullable(DynamicMediaServicesConfigUtil.getServiceUrl(getResourceResolver()));
    final Optional<String> publicKey = ofNullable(DynamicMediaServicesConfigUtil.getPublicKey(getResourceResolver()));
    return videoServerUrl.isPresent() && publicKey.isPresent()
    ? new StringBuilder(videoServerUrl.get()).append(DYNAMIC_MEDIA_PUBLIC_STORAGE_PREFIX).append(publicKey.get()).append(SLASH).toString()
    : EMPTY;
}

A system user “videouser” who is allowed to read the dynamic media cloud configuration is used to obtain resource resolver. At this line -

com.day.cq.dam.commons.util.DynamicMediaServicesConfigUtil.getPublicKey(getResourceResolver()), it throws the below exception.

com.day.cq.dam.s7dam.common.config.impl.DynamicMediaServicesConfigImpl Failed to decrypt password

com.adobe.granite.crypto.CryptoException: Cannot convert byte data

                at com.adobe.granite.crypto.internal.CryptoSupportImpl.unprotect(CryptoSupportImpl.java:130)

                at com.day.cq.dam.s7dam.common.config.impl.DynamicMediaServicesConfigImpl.getRegistrationId(DynamicMediaServicesConfigImpl.java:68)

                at com.day.cq.dam.commons.util.DynamicMediaServicesConfigUtil.getDefaultConfig(DynamicMediaServicesConfigUtil.java:93)

                at com.day.cq.dam.commons.util.DynamicMediaServicesConfigUtil.getServiceUrl(DynamicMediaServicesConfigUtil.java:233)

                at com.day.cq.dam.commons.util.DynamicMediaServicesConfigUtil.getServiceUrl(DynamicMediaServicesConfigUtil.java:219)

                at

Caused by: com.adobe.granite.crypto.CryptoException: Failed decrypting cipher text

                at com.adobe.granite.crypto.internal.CryptoSupportImpl.decrypt(CryptoSupportImpl.java:66)

                at com.adobe.granite.crypto.internal.CryptoSupportImpl.unprotect(CryptoSupportImpl.java:127)

                ... 267 common frames omitted

Caused by: com.rsa.jsafe.JSAFE_PaddingException: Invalid padding.

                at com.rsa.jsafe.JSAFE_SymmetricCipher.decryptFinal(Unknown Source)

                at com.adobe.granite.crypto.internal.jsafe.JSafeCryptoSupport.getPlainText(JSafeCryptoSupport.java:267)

                at com.adobe.granite.crypto.internal.jsafe.JSafeCryptoSupport.getPlainText(JSafeCryptoSupport.java:249)

                at com.adobe.granite.crypto.internal.CryptoSupportImpl.decrypt(CryptoSupportImpl.java:64)

                ... 268 common frames omitted

Replies

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,157 likes

Total Posts

6,247 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,157 likes

Total Posts

6,247 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

01-02-2018

Did you checked the documentation:- Configuring Dynamic Media

This article talks about Setting up of Dynamic media:- Setting Up Dynamic Media

Here is Helpx article on how to work with Experience Manager Digital Assets and Dyamic Media:-  Working with Adobe Experience Manager and Dynamic Media

This should help you!

Avatar

Avatar
Validate 1
Level 1
preeti_bhaya
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
preeti_bhaya
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
preeti_bhaya
Level 1

03-06-2018

Did you get a solution to this?

I am getting the same issue while upgrading from 6.2 to 6.4