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

sec-proxy should remove incoming sec-* headers #154

Closed
fvanderbiest opened this issue Jun 19, 2013 · 15 comments
Closed

sec-proxy should remove incoming sec-* headers #154

fvanderbiest opened this issue Jun 19, 2013 · 15 comments
Assignees
Milestone

Comments

@fvanderbiest
Copy link
Member

Based on a fresh georchestra install on http://sdi.georchestra.org, I am witnessing a strange behavior:

  • in Chromium, the header shows the correct user id and it is up to date with my current logged-in status.
  • in FF, after logging out, the header still shows my user id (but I know I am not logged in anymore, since the geoserver home page does not show the admin page)
@fvanderbiest
Copy link
Member Author

Note that the static webapp goes through the security-proxy now.

@fvanderbiest
Copy link
Member Author

works fine on IE9

@ghost ghost assigned fvanderbiest Jun 19, 2013
@fvanderbiest
Copy link
Member Author

works fine on FF 21 / linux at home. I have to check which FF version I'm running at work.

@fvanderbiest
Copy link
Member Author

Got it: my FF at work (version 21 too) has the "modify headers" extension ON by default

@ghost ghost assigned jesseeichar Jun 25, 2013
@fvanderbiest
Copy link
Member Author

This is critical, since one can access http://sdi.georchestra.org/mapfishapp/edit (normally reserved to members of SV_ADMIN, SV_REVIEWER or SV_EDITOR groups) by setting the appropriate headers.

The proxy should remove the incoming sec-* headers.

@fvanderbiest
Copy link
Member Author

In the mean time, all geOrchestra instances are advised to add those lines in their apache config:

    RequestHeader unset sec-username
    RequestHeader unset sec-roles

@severo
Copy link
Contributor

severo commented Nov 15, 2013

see #149 on a related topic

@jesseeichar
Copy link
Member

I am a little late to this party but this breaks extractor app as mentioned in @fvanderbiest 's comment on #633. If you look in the proxy-servlet.xml file there is a filter that is supposed to do this filtering as long as the request does not come from a "trusted" server. A trusted server can provide the headers.

@jesseeichar jesseeichar reopened this Apr 24, 2014
jesseeichar pushed a commit to jesseeichar/georchestra that referenced this issue Apr 24, 2014
…t demonstrate that the filtering works.

Make the default behaviour to always remove the sec-username and sec-roles headers.

fixes georchestra#633
@jesseeichar
Copy link
Member

I am making a new pull request that reverts this change but adds tests that demonstrate that the headers are removed by default. This should fix #633

@fvanderbiest
Copy link
Member Author

OK, I am relieved about that. Thanks.

@fvanderbiest
Copy link
Member Author

People should also make sure to remove the

RequestHeader unset sec-*

apache directives if they had been set.

This was referenced Apr 24, 2014
@fphg
Copy link
Member

fphg commented Apr 24, 2014

Hi
I won't drop the header unset rules for now because I'm not confident about the IP src check. I think that incoming traffic has to be sanitized on the reverse proxy.

@fvanderbiest
Copy link
Member Author

Closed with #648

@fvanderbiest
Copy link
Member Author

Note: contrary to what I said in the above comment,

RequestHeader unset sec-username
RequestHeader unset sec-roles

directives can still be used.

@fvanderbiest
Copy link
Member Author

(though they should be useless if one trusts the proxy for doing its job)

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

No branches or pull requests

5 participants