Restrict local php files to users logged into confluence

Kalado October 23, 2018

Hello everyone,

I have confluence installed in our local network. On the same machine is an apache server so I can use html-include, which works great.

My problem is that anyone in the network can access the pages that I include if they know the url.

Is there anyway to restrict my php files to users that are logged into confluence.

Or maybe  have a restriction in apache so only access from confluence is allowed?

Making this depended on confluence group membership would be ideal of course but is not a must.

 

Thank you

1 answer

0 votes
josh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 23, 2018

I think this dependency will need to be resolved at either the PHP or apache level.

You could possibly write into your script an API call to the /rest/group endpoint https://docs.atlassian.com/ConfluenceServer/rest/6.12.1/#group-getMembers

to get the list of group members from Confluence. But I'm not sure how your PHP file would retreive the current user's ID.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events