grouper-users - Re: [grouper-users] New UI problems with reverse proxy
Subject: Grouper Users - Open Discussion List
List archive
- From: Darren Boss <>
- To: "Hyzer, Chris" <>, "" <>
- Subject: Re: [grouper-users] New UI problems with reverse proxy
- Date: Fri, 22 Sep 2017 16:34:32 +0000
- Ironport-phdr: 9a23:WnFz/x97Yg6oIf9uRHKM819IXTAuvvDOBiVQ1KB+0+kWIJqq85mqBkHD//Il1AaPBtSLraocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze6/9pnQbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRDnhicINT43/m/UhMJtkqxUvAmsqAZjz4POeoyZKOZyc6HbcNgHRWRBRMFRVylZD42ydYQPFfABMvher4LgulYOqgC+BRKxD+7o1zBHnGX23bck3OQnCw3JxwsgH8kVsHnPsNr1M6ISUfiozKnU0zrMc+lZ2THn54fVaB8tu+2DUqhpfMfX1EIhGQTFjlCKpozkOTOYzvgCvHKf7+V8SOKvj3IopBt3oje128gjkJPFiZ4PxVzc+iV5x4E1JdK8SEFle9KrDJxQtySCO4t3RMMiX39nuDw8yrIYpZ63YjIGx4o6yB7Cc/CIb4+I4hf7VOaMPTd3mm5qd6i5hxmo7Eev0PfwWdWu31pSoSpFk8XMtnAQ1xPI8MSIVvx9/kKn1D2S1A7T8vlJLV41mKbHKZMsx7Awm5kIvkjfGyL7l1n6gLOLekgh5uek9+Xqb7Djq5OCOYJ4lwfzObk0lMOlG+Q3KA0OUnCb+eui0L3j+lX0QLBQgf03lqnVqZHaJcMHqqKgDA5ZzIgu5wulAzep19QYmnYHLFZbdx6dk4fpPFTOLOj5Dfe5nVusjC9my+7HM7H9AJjAK3bDnbT6crph7kNRxxY/wcxC659RFr4NPPP+V0r0udDGABI1LhS4w+P9B9V80oMeV3iPAqicMK7KrFCH/PgvI/OSa48TojryMP8l5+X1jXIihVAdeqyp3YMKaHCkAPtpP1+WYXz2jdgcC2gGpBYxQ/byhF2YTTFTf2qyX7475jwjB4KmF4DDRp21gLOfxie3B4BWZntYBVCWCnflbIGEW/YXaCKOOc9tjCYIVbmnS489yx6urgn6xKR7LubK4CEXq4/s1MUmr9HUwFsS5C55FYDV+GGXTno+1jcNTD8nzq1liU1mwRGeyaV+hbpVGcEFo7sDXR09KIbR1alnEN3oQSrAeMuEUlCrXo/gDD0sBJplzMUJfl5wAZC/lR3ZxAKrBaMYjbqGGMZy/67BiSvfPcF4nlrPzrMsiREMRdBUfTmqj7Rl+g6VDYnSiG2SkKOyaLgR1yfL/WuKi2GH6hILGDVsWLnICChMLnDdqs70sxvP
Sorry, I sent this too soon. My ingress controller ip address changed so I'm using a regex now for the ip and now I'm back to the issue with the ui infinitely reloading but now I should be running a patched version of the UI.On Fri, Sep 22, 2017 at 11:48 AM Darren Boss <> wrote:The Unicon dockerfiles have been changed and it appears to fix the issue with patch application:I don't know and haven't checked to see if the Docker images have been rebuilt in Dockerhub, I'm going to build these myself anyway. Redeployed and now UI behaves differently, I'm back to getting "There was an error with your request." on every click. It appears that I'm getting a mix of http and https in the UI and my browser is blocking access to non-secure requests. Tomcat is not running with TLS certs, this is being handled by the nginx proxy in Kubernetes. What config changes would I need to make to give the grouper ui use https for all requests or will I need to rewrite the urls at a layer outside of grouper?I can see in the installation instructions that if using the interactive installer it's asked by the installer:
Go here for the Grouper UI (change hostname if on different host): http://localhost:8080/grouper/
I need a way to tweak this after the fact or to pass in this information in the installer, possibly in the grouper-ui.properties file? I see that properties can be set via environment vars, this is super useful for containerized deployments, even more important when deploying under environments like Kubernetes so I'm glad to see that.On Wed, Sep 20, 2017 at 10:35 AM Darren Boss <> wrote:That is certainly helping. I've also raised an issue on the Unicon repo about the patches not being applied (https://github.com/Unicon/grouper-dockerized/issues/11). Travelling at the moment but I'll see about redeploying grouper now that I have images with patches applied and if there is any change in behaviour when accessing the grouper ui.May have found the TIER Dockerfile for grouper and the related grouper.installer.properties at https://github.internet2.edu/docker/grouper/blob/1cb4b767002f7d1f7aa790f25d70edd660eae659/container_files/etc/grouper.installer.properties. I had trouble building their images since they require you to manually uncomment the lines around download of the JDK and the method they use to download the JDK need updating before it will work properly but I think I've got it building now.On Wed, Sep 20, 2017 at 10:12 AM Hyzer, Chris <> wrote:There is a file that keeps track of which patches are installed. patch status properties. It seems like the patches are in the container, but the file that keeps track of those patches is not updated? So some patches appear to be there but grouper doesn’t know it so dependent patches would not be installed either.
Would be cleanest to make sure that file is up to date in the image. You could also try putting this in the grouper.installer.properties:
# autorun, Problem installing patch since this patch file: <filename> is not the same as what the patch expects:
# Do you want to force install this patch (t|f)? [f]:
grouperInstaller.autorun.forceInstallPatch = t
Im looking at the release notes and I don’t think your issue is fixed in a patch, but definitely getting them installed is the first step:
https://spaces.internet2.edu/display/Grouper/v2.3+Release+Notes
Thanks
Chris
From: Darren Boss [mailto:]
Sent: Tuesday, September 19, 2017 9:07 AM
To: Hyzer, Chris <>;
Subject: Re: [grouper-users] New UI problems with reverse proxy
Some discussion occured just between Chris and myself. It does appear that not all patches are getting applied when building the Grouper UI Docker image. The Dockerfile does the war build and applies patching using this grouper.installer-ui.properties file:
grouperInstaller.autorun.useDefaultsAsMuchAsAvailable = true
grouperInstaller.autorun.continueAfterDeleteUiWorkDirectory = true
grouperInstaller.autorun.actionEgInstallUpgradePatch = patch
grouperInstaller.autorun.tarballDirectory = /tmp/grp-ui
grouperInstaller.autorun.appToUpgrade = ui
grouperInstaller.autorun.grouperWhereInstalled = /opt/apache-tomcat-6.0.44/webapps/grouper/
grouperInstaller.autorun.patchAction = install
grouper.version = 2.3.0
download.server.url = " http://software.internet2.edu/grouper
Right off the bat there is a problem appling a the first api patch:
Downloading from URL: http://software.internet2.edu/grouper/release/2.3.0/patches/grouper_v2_3_0_api_patch_0.tar.gz to file: /tmp/grp-ui/patches/grouper_v2_3_0_api_patch_0.tar.Cannot apply patch since this patch file:
/opt/apache-tomcat-6.0.44/webapps/grouper/WEB-INF/classes/edu/internet2/middleware/grouper/util/GrouperUtil$2.class
/tmp/grp-ui/patches/grouper_v2_3_0_api_patch_0/new/classes/edu/internet2/middleware/grouper/util/GrouperUtil$2.class
is supposed to be new, but it already exists:
/opt/apache-tomcat-6.0.44/webapps/grouper/WEB-INF/classes/edu/internet2/middleware/grouper/util/GrouperUtil$2.class
Problem applying patch since this file:
/opt/apache-tomcat-6.0.44/webapps/grouper/WEB-INF/classes/edu/internet2/middleware/grouper/util/GrouperUtil$MaskingThread.class
should not exist yet
Do you want to force install this patch (t|f)? [f]:
<using default which is blank due to grouperInstaller.autorun.useDefaultsAsMuchAsAvailable and grouperInstaller.autorun.forceInstallPatch>:
Cannot apply patch since this patch file:
/tmp/grp-ui/patches/grouper_v2_3_0_api_patch_0/new/classes/edu/internet2/middleware/grouper/util/GrouperUtil$MaskingThread.class
is supposed to be new, but it already exists:
/opt/apache-tomcat-6.0.44/webapps/grouper/WEB-INF/classes/edu/internet2/middleware/grouper/util/GrouperUtil$MaskingThread.class
Problem applying patch since this file:
/opt/apache-tomcat-6.0.44/webapps/grouper/WEB-INF/classes/edu/internet2/middleware/grouper/util/GrouperUtil.class
should not exist yet
Do you want to force install this patch (t|f)? [f]:
<using default which is blank due to grouperInstaller.autorun.useDefaultsAsMuchAsAvailable and grouperInstaller.autorun.forceInstallPatch>:
Cannot apply patch since this patch file:
/tmp/grp-ui/patches/grouper_v2_3_0_api_patch_0/new/classes/edu/internet2/middleware/grouper/util/GrouperUtil.class
is supposed to be new, but it already exists:
/opt/apache-tomcat-6.0.44/webapps/grouper/WEB-INF/classes/edu/internet2/middleware/grouper/util/GrouperUtil.class
Problem applying patch since this file:
/opt/apache-tomcat-6.0.44/webapps/grouper/WEB-INF/classes/edu/internet2/middleware/grouper/util/GrouperUtil.java
should not exist yet
Do you want to force install this patch (t|f)? [f]:
<using default which is blank due to grouperInstaller.autorun.useDefaultsAsMuchAsAvailable and grouperInstaller.autorun.forceInstallPatch>:
Cannot apply patch since this patch file:
/tmp/grp-ui/patches/grouper_v2_3_0_api_patch_0/new/classes/edu/internet2/middleware/grouper/util/GrouperUtil.java
is supposed to be new, but it already exists:
/opt/apache-tomcat-6.0.44/webapps/grouper/WEB-INF/classes/edu/internet2/middleware/grouper/util/GrouperUtil.java
Problem applying patch since this file:
/opt/apache-tomcat-6.0.44/webapps/grouper/WEB-INF/classes/edu/internet2/middleware/grouper/util/GrouperUtil$DaemonThreadFactory.class
should not exist yet
Do you want to force install this patch (t|f)? [f]:
<using default which is blank due to grouperInstaller.autorun.useDefaultsAsMuchAsAvailable and grouperInstaller.autorun.forceInstallPatch>:
Cannot apply patch since this patch file:
/tmp/grp-ui/patches/grouper_v2_3_0_api_patch_0/new/classes/edu/internet2/middleware/grouper/util/GrouperUtil$DaemonThreadFactory.class
is supposed to be new, but it already exists:
/opt/apache-tomcat-6.0.44/webapps/grouper/WEB-INF/classes/edu/internet2/middleware/grouper/util/GrouperUtil$DaemonThreadFactory.class
- added to end of property file: grouper_v2_3_0_api_patch_0.state = error
Does someone understand what might be happening? Are the patches being applied but detected as errors because of the force installation and then subsequent patches not being applied because it's detected that previous dependent patches have not applied?
On Mon, Sep 18, 2017 at 10:13 AM Hyzer, Chris <> wrote:
> Full disclousure, I'm running Grouper in containers under Kubernetes with an nginx ingress
> controller which is terminating TLS at the ingress. When I use "kubectl port-forward pod-name"
> and access the ui over localhost:8080 I have no issues in accessing the interface.
So you are saying it works when you are not load balancing? But it doesn’t work with load balancing? Is the load balancing sticky by cookie? Does it work if it is load balancing with one node in the pool?
What the X-Grouper-path response http header coming back from the server?
Are you sure there are no errors in any of the logs?
Thanks
Chris
From: [mailto:] On Behalf Of Darren Boss
Sent: Monday, September 18, 2017 9:58 AM
To:
Subject: [grouper-users] New UI problems with reverse proxy
Question about the New UI and OWASP csrfguard and accessing the UI behind a nginx reverse proxy.
Took me a little while to figure out the additions to make to Tomcat to fix the major issue of accessing the UI after which the admin ui works. This is a common solution when running tomcat behind a reverse proxy. I have another tweak for Jetty that accomplished the same.
<Valve className="org.apache.catalina.valves.RemoteIpValve"
internalProxies="my.nginx.proxy.address"
remoteIpHeader="x-forwarded-for"
requestAttributesEnabled="true"
protocolHeader="x-forwarded-proto"
protocolHeaderHttpsValue="https"/>
Now when I click on any link in the new ui I end up in an infinite redirect loop with &csrfExtraParam=xyz being added to the existing url on every redirect. I've tried to search through the mailing list to find a resolution. I know there are lots of deployments behind reverse proxies so this should be a solved issue.
Full disclousure, I'm running Grouper in containers under Kubernetes with an nginx ingress controller which is terminating TLS at the ingress. When I use "kubectl port-forward pod-name" and access the ui over localhost:8080 I have no issues in accessing the interface.
I'm also incredably new to deploying grouper but had been using the deployment at Duke when I was a staff member there and I believe their deployment was running under OpenShift so probably a similar deployment to what I'm doing now.
--
Darren Boss
Senior Programmer/Analyst
Programmeur-analyste principal
(o) 416.228.1234 x 230(c) 919.525.0083
--
Darren Boss
Senior Programmer/Analyst
Programmeur-analyste principal
(o) 416.228.1234 x 230(c) 919.525.0083
--(c) 919.525.0083
155 University Ave, Suite 302 Toronto, ON M5H 3B7
www.computecanada.ca / www.calculcanada.ca
@ComputeCanada--(c) 919.525.0083
155 University Ave, Suite 302 Toronto, ON M5H 3B7
www.computecanada.ca / www.calculcanada.ca
@ComputeCanada--(c) 919.525.0083
155 University Ave, Suite 302 Toronto, ON M5H 3B7
www.computecanada.ca / www.calculcanada.ca
@ComputeCanada
Darren Boss
Senior Programmer/AnalystProgrammeur-analyste principal
(o) 416.228.1234 x 230
155 University Ave, Suite 302 Toronto, ON M5H 3B7
www.computecanada.ca / www.calculcanada.ca
@ComputeCanada
- [grouper-users] New UI problems with reverse proxy, Darren Boss, 09/18/2017
- RE: [grouper-users] New UI problems with reverse proxy, Hyzer, Chris, 09/18/2017
- Re: [grouper-users] New UI problems with reverse proxy, Darren Boss, 09/18/2017
- Re: [grouper-users] New UI problems with reverse proxy, Darren Boss, 09/19/2017
- RE: [grouper-users] New UI problems with reverse proxy, Hyzer, Chris, 09/20/2017
- Re: [grouper-users] New UI problems with reverse proxy, Darren Boss, 09/20/2017
- Re: [grouper-users] New UI problems with reverse proxy, Darren Boss, 09/22/2017
- Re: [grouper-users] New UI problems with reverse proxy, Darren Boss, 09/22/2017
- Re: [grouper-users] New UI problems with reverse proxy, Darren Boss, 09/22/2017
- Re: [grouper-users] New UI problems with reverse proxy, Darren Boss, 09/22/2017
- RE: [grouper-users] New UI problems with reverse proxy, Hyzer, Chris, 09/22/2017
- RE: [grouper-users] New UI problems with reverse proxy, Hyzer, Chris, 09/25/2017
- RE: [grouper-users] New UI problems with reverse proxy, Hyzer, Chris, 09/25/2017
- Re: [grouper-users] New UI problems with reverse proxy, Darren Boss, 09/22/2017
- Re: [grouper-users] New UI problems with reverse proxy, Darren Boss, 09/22/2017
- Re: [grouper-users] New UI problems with reverse proxy, Darren Boss, 09/20/2017
- RE: [grouper-users] New UI problems with reverse proxy, Hyzer, Chris, 09/20/2017
- RE: [grouper-users] New UI problems with reverse proxy, Hyzer, Chris, 09/18/2017
Archive powered by MHonArc 2.6.19.