Crypto Support in AEM



This feature allows all OSGi configuration properties to be stored in a protected encrypted form instead of clear text. The form in the Web Console UI is used to create encrypted text from clear text using the system wide encryption master key.
OSGi Configuration Plugin support was added in order to decrypt the property before it is used by a service.
Below I will explain how you can use this in encrypt the plain text.
Steps :
1. Go to Config Mgr.
2. Under Mains you can find Crypto Support. Click on that.

3. Adobe Experience Manager Web Console Crypto Support Console will open. There you can see two fields i.e. Plain Text and Protected Text
4. You can add the sensitive data in Plain text field.
5. Now click on Protect. Protected text will appear in its text box.
6. You can go ahead and use this protected text where ever you want to add like in SMTP password field etc.
In order to decrypt you can use unprotect method.
@Reference
CryptoSupport cryptosupport;
public class Test{
if(this.cryptoSupport.isProtected(key){
this.cryptoSupport.unprotect(key)
}
}

Hope this helps!!

Happy Coding 🙏

If you like my post and find it helpful, you can buy me a coffee.




Comments

Post a Comment