Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] CSRF errors in the Grouper UI

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] CSRF errors in the Grouper UI

Chronological Thread 
  • From: "Redman, Chad" <>
  • To: Mark Day <>, "" <>
  • Subject: RE: [grouper-users] CSRF errors in the Grouper UI
  • Date: Tue, 11 Dec 2018 14:01:54 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;
  • Ironport-phdr: 9a23:SqocLRawci1jUo0pXPo3czH/LSx+4OfEezUN459isYplN5qZrsW7bnLW6fgltlLVR4KTs6sC17KG9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCa+bL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjm58axlVAHnhzsGNz4h8WHYlMpwjL5AoBm8oxBz2pPYbJ2JOPZ7eK7WYNEUSndbXstJVyJPHJ6yb5cBAeQCM+ZXrYj9qEcBohalHwagGP/jxyVUinPq36A31fkqHwHc3AwnGtIDqHrYosnrO6gPVOC61q/IwS3eZP5I2Tfy8pXHfh48qvyLQb1wcdDexlQ3GAPfkFqftInlMCmT1ukWrmib6fZvWfixhGE6tgF8uz6izdovhInRno8Z1ErL+TlkzIswONG0VVN3bNuqEJZfqy2WK457Qs08TGxnpCo3z7gLtJ+mcCUL0JgqxQPTZ+aGfoWM+B7uVeWcLS1liH9hd7+znxiy/lajx+HgU8S51UxFoypendnCs30ByR3e5tSFR/Z4+kqtxzWC2BzW5+1ZO085l7fXJpg8ybAqjJUTq17MHirulUX2kqCWckIk9/Cw5en7ZbvquoKQO5ZphA/mL6gig8u/Dv8mPQQUWGib5Pi826bk/U3kRrVFk+c6krHDsJDdOcQUuLK2AxNU0oYk7RazFTCm0MkEnXkDK1JFfxGHg5L1NFHJJfD0Ffa/g1Kynzd33/3KIKfuDonQInXGjbvtYKtx5ktSyAc80dxT+5dZCr8fL//8RkP8sdnVAx4kPwG12+rnDc9y1oIaWWKBGK+ZN6bSvEeU6eIvOeaDeZcauCzjJPc44v7hl3k5lEQAfamvwZQbcm63Eel7I0mBe3rjns8BEXsWvgo5VOHqh0eCUTlOZ3aqQa08/Cg3CJ+9DYjdXICtm6eM3CO6Hp1NemBGEU6AHW3pd4WCR/cDdjiSIsl/nTwYS7StUZEu2gyztFyy970yC+PO+WU0vIOrgN1v6+TCvRU48Xp7CNrLlynHQHtzg3sFXXorx61lumR8zEuOy651n6YeGNBOrbsdXR09KIbR1alnEN3oQSrAeMuEUlCrXo/gDD0sGIEf2dgLNgxHFtmnhxaHlwGqCrNf3+iABJU4xbjR0334Ie5gzX2A2aU82Qp1CvBTPHGr0/YsvzPYAJTExgDAz/7wL/YVwTLN+WGfzGGHoEBfVktqXL7YWWwEOBGEtsz3s0XFSbLmSa8qNAdM04ajEuNLcZWo6DcOX/L/IJLbamO1lX23AEODxrqAW5Dnd2AU2g3ADkNCngwOrj6L
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Hi Mark,


- grouper.ui.url is just used for constructing outgoing emails, so don't need to worry about effects there


Weird that x-forwarded headers are being set but the (1) error is still showing the request as http. What are the ui logs showing that show x-forwarded-proto is being effective? If you're using a Docker container, it comes with its own Tomcat, so I would think something needs to be set there.


The (2) token missing error is weird too. If it's a sticky session issue, I would expect it to be a token mismatch error. You could trace the session with the browser debugger and see what headers are being sent. It should be sending the OWASP_CSRFTOKEN header, and the value should be the right one for the form it was launched from.


Unlikely, but is it possible you have content security policy headers or cookie security flags? CSP should allow inline scripts and eval. If you have cookie security, the httpOnly flag doesn't work with Grouper since so much of it is ajax. And the secure flag works fine, but if you access Grouper through non-SSL, you may see CSRF issues as the result of not being able to retain a session without cookies. These options could be set by Tomcat, application web.xml, or maybe the proxy is adding CSP or rewriting cookies.







From: [mailto:] On Behalf Of Mark Day
Sent: Monday, December 10, 2018 7:40 PM
Subject: [grouper-users] CSRF errors in the Grouper UI


We're just getting started with a Grouper implementation, and I'm running into problems with CSRF errors that pop up in two areas of the Grouper UI.


1. When clicking on "Lite UI" under "Quick Links". The error is: 

Maybe your session timed out and you need to start again. This should not happen under normal operation. CSRF error.

The UI logs show:


2. In the "+ Assign permission" function for a group, typing in the Action field results in a 'error communicating with server' alert. The UI logs show:

ERROR CsrfGuardLogger.log(47) -  - potential cross-site request forgery (CSRF) attack thwarted (user:<redacted>, ip:<redacted>, method:GET, uri:/grouper/grouperUi/app/UiV2GroupPermission.permissionActionNameFilter, error:required token is missing from the request)


The two types of CSRF Guard errors potentially have different causes, or are slightly different symptoms of the same problem.


Specifics of our implementation:

- We're running Grouper in a container based off the tier/grouper:2.3.0-a109-u47-w12-p21 image from DockerHub.

- There is an HAproxy-based reverse proxy service that is part of our container orchestration infrastructure that terminates TLS connections from the browser

- The UI container's logs show that  X-Forwarded-For, X-Forwarded-Proto, and X-Forwarded-Port headers are populated correctly by the proxy.

- /opt/grouper/conf/ sets grouper.ui.url to https://<FQDN>/grouper/ (I've also tried https://<FQDN>/grouper/grouperUi/ with the same results)


In the mailing list archives, I found a similar description to our permission setting issue, but it looks like that specific problem was fixed in UI patch 7, so I wouldn't expect to run into it with the TIER docker image we're using.  It feels like it's most likely associated with our use of the container orchestration reverse proxy, but that's more a hunch than anything else, and I'm not sure where to look next.


I'm not sure where else to look for a URL setting (apart from that may be specifying the http:// protocol, assuming that this is in fact a separate problem.


Thanks for any suggestions you can offer,

Mark Day

NERSC / Lawrence Berkeley Lab


Archive powered by MHonArc 2.6.19.

Top of Page