내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Securing servlet

Avatar

Level 2

How can we secure path based Servlet from random user? 

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Employee Advisor

Hi @aniketp1012 ,

 

PATH based servlet have following disadvantages :

  • path-bound servlets cannot be access controlled using the default JCR repository ACLs
  • path-bound servlets can only be registered to a path and not a resource type (i.e. no suffix handling)
  • if a path-bound servlet is not active, e.g. if the bundle is missing or not started, a POST might result in unexpected results. usually creating a node at /bin/xyz which subsequently overlays the servlets path binding
  • the mapping is not transparent to a developer looking just at the repository

Looking at the ask here, it is recommended to use resourceType based servlet.

Article might help you .

 

Thanks.

원본 게시물의 솔루션 보기

2 답변 개

Avatar

Community Advisor

Hi @aniketp1012 

 

The most secure way would be to map the servlet to resource type, AEM would take care of the access part through relevant ACL's

Below is one nice article on this topic that would help you indeed: 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/secure-sling-servlet-need-...

 

Avatar

정확한 답변 작성자:
Employee Advisor

Hi @aniketp1012 ,

 

PATH based servlet have following disadvantages :

  • path-bound servlets cannot be access controlled using the default JCR repository ACLs
  • path-bound servlets can only be registered to a path and not a resource type (i.e. no suffix handling)
  • if a path-bound servlet is not active, e.g. if the bundle is missing or not started, a POST might result in unexpected results. usually creating a node at /bin/xyz which subsequently overlays the servlets path binding
  • the mapping is not transparent to a developer looking just at the repository

Looking at the ask here, it is recommended to use resourceType based servlet.

Article might help you .

 

Thanks.