Critical: Need urgent assistance for Confluence Plugin - Unauthenticated Access to Admin Section"

I have developed a custom Confluence plugin that includes a servlet with a specific URL. However, I’ve noticed that users, even those without authentication, can directly access this page via a direct link. As this page contains administrative sections, I want to secure it so that only authenticated users (preferably Confluence admins or registered users) can access it. The ideal behavior would be to redirect users to the login page if they attempt to access the URL without authentication. How can I implement this security measure in my Confluence plugin to ensure that users are authenticated before accessing the page directly?

Thanks & Regards,

You can implement servlet filter that blocks/redirects users to another page.


this situation is covered by the starter documentation here: