Vault - Another system or application - Connect and Validate the Token | Community
Skip to main content
Level 2
January 23, 2024
Solved

Vault - Another system or application - Connect and Validate the Token

  • January 23, 2024
  • 1 reply
  • 819 views

Hi Everyone,

I am looking for solution integrate or connect the vault( it is another application) where we stored our tokens.

Scenario:

We have created a simple form in AEM, It contains the filed verification code . The user enters the verification code (value) in the input field, the entered verification code(value) needs to be validated against the token stored in the vault. To connect vault user needs to enter there credential's like Username and Password. 

Looking for solution or examples for Vault AEM integration.

Thank you!

 

 

 

 

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 Anmol_Bhardwaj

Hi @kummari_dilipku ,

 

If the token needs to be entered every time:

  • Just writing a simple code to get vault token and verifying against the input value works.
  • You can write a simple servlet ,
    • Call it through the form.
  • Write service for getting credentials from vault.
  • Call service from the servlet and get the token.
  • Compare.

Servlet Reference: https://experienceleague.adobe.com/docs/experience-manager-learn/forms/creating-your-first-osgi-bundle/create-servlet.html?lang=en 

 

If the token is only needed once and not changed often

  • Create a custom cloud config
  • Add the form field for the token in the custom config.
  • Compare in the same way through servlets.

Reference: https://experienceleague.adobe.com/docs/experience-manager-65/content/implementing/developing/extending-aem/extending-cloud-services/extending-cloud-config-custom-cloud.html?lang=en 

 

Thanks.

1 reply

Anmol_Bhardwaj
Community Advisor
Anmol_BhardwajCommunity AdvisorAccepted solution
Community Advisor
January 23, 2024

Hi @kummari_dilipku ,

 

If the token needs to be entered every time:

  • Just writing a simple code to get vault token and verifying against the input value works.
  • You can write a simple servlet ,
    • Call it through the form.
  • Write service for getting credentials from vault.
  • Call service from the servlet and get the token.
  • Compare.

Servlet Reference: https://experienceleague.adobe.com/docs/experience-manager-learn/forms/creating-your-first-osgi-bundle/create-servlet.html?lang=en 

 

If the token is only needed once and not changed often

  • Create a custom cloud config
  • Add the form field for the token in the custom config.
  • Compare in the same way through servlets.

Reference: https://experienceleague.adobe.com/docs/experience-manager-65/content/implementing/developing/extending-aem/extending-cloud-services/extending-cloud-config-custom-cloud.html?lang=en 

 

Thanks.

Level 2
January 23, 2024

Thank you @anmol_bhardwaj . Solution 2 fits for me.