Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set sec-username/sec-roles in webpack proxy config #722

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

landryb
Copy link
Member

@landryb landryb commented Nov 12, 2024

allows testing features restricted to connected users

/cas correctly proxies to cas, but /whoami still replies {"GeorchestraUser":null} so the header shows the login button.

@f-necas : using:

-const DEV_HOST = "localhost:8080";
+const DEV_HOST = "georchestra.example.org:8180";

the page header still doesnt show me the logged in button, while mapstore itself shows me the plugins restricted to an admin user (eg save/delete/etc etc) so the authenticated requests to /rest work with sec-username/sec-roles only.

what were the headers necessary for /whoami to correctly find the user ? against a throwaway instance i can't figure that out...

curl -H sec-username:testadmin -H sec-proxy:true -H sec-roles:ROLE_MAPSTORE_ADMIN -H sec-org:C2C \
       -H 'sec-orgname: Test Org' http://georchestra.example.org:8180/whoami
{"GeorchestraUser":null}

allows testing features restricted to connected users

/cas correctly proxies to cas, but /whoami still replies
'{"GeorchestraUser":null}' so the header shows the login button.
@landryb
Copy link
Member Author

landryb commented Nov 12, 2024

@Gaetanbrl @pierrejego you might be interested in that too, to test authenticated-only features :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant