Securing servlet | Community
Skip to main content
Level 6
Dec 28, 2021 6:32 AM UTC
Solved

Securing servlet

I have a servlet that provides page content in needed JSON format. This JSON will be used by a third party and I need to provide a security level check to this. How can I provide a token authentication in servlet or in ant service/wrapper before servlet to provide a layer of security. 

This cannot be done by AEM ACL because the requirement is to do it via code using token authentication.

How can this be achieved?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Dec 28, 2021 3:22 PM UTC

Hi,
Yes you need it but not in AEM. you can set it up at apache

https://www.cloudsavvyit.com/1361/how-to-setup-basic-http-authentication-on-apache/

 

Arun Patidar

3 replies

arunpatidar
New Participant
Dec 28, 2021 9:32 AM UTC

The alternative could be the basic auth, which can be setup easily at apache level. If that suits your requirement?

 

For token I am no sure if you can validate the token from AEM and consumer from the identity provider.

Translate
Arun Patidar
Level 6
Dec 28, 2021 10:12 AM UTC

so for basic auth, do i need to create userID and password in aem useradmin?

Translate
arunpatidar
arunpatidarAccepted solution
New Participant
Dec 28, 2021 3:22 PM UTC

Hi,
Yes you need it but not in AEM. you can set it up at apache

https://www.cloudsavvyit.com/1361/how-to-setup-basic-http-authentication-on-apache/

 

Translate
Arun Patidar