Hi,
We have servlets with basic authentication available on our author and publish instances. A service user having access to the required content is able to view the response from these servlets and if no Authentication is provided , we get a 401 - Not Authorized response as expected.
We want this capability to be available on the dispatcher as well. How can we achieve this?
We have both On Prem and AMS instances.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @sonaliku
You can try to use basic authentication of Apache based on the path at dispatcher level. Specify the user here and need not depend on aem service user
Check the below blog
I think you just need to allow this servlet in your dispatcher configuration. Something like this:
/0108 { /type "allow" /method "POST" /url "/bin/project" }
@EstebanBustamante We do not want to to be allowed to all the users but the specifed service user. How can that be achieved with below configuration?
Sorry, I didn't understand your question in the first instance, I assumed you have this functionality already working and you wanted to enable it in the dispatcher as well.
From what I can understand you could do the following:
- Enable the servlet with an authentication method (preferred not basic auth, but OAuth2). This means that everyone with the servlet URL will be able to access but it will have to authenticate to actually see content from this servlet.
- If the user is able to authenticate the servlet, then you just need to use a session using your system users to retrieve whatever content you have in mind[2].
[2]. https://medium.com/@manumathew28.94/aem-system-users-1b9ab48df19e
Hope this helps
Hi @sonaliku
You can try to use basic authentication of Apache based on the path at dispatcher level. Specify the user here and need not depend on aem service user
Check the below blog
Thankyou ! Will try out this approach to see if it works as expected.
@sonaliku Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Sounds good ! Thanks Kautuk.
Views
Likes
Replies
Views
Like
Replies