Trouble with OAuth

56 views
Skip to first unread message

Michael Day

unread,
Sep 22, 2021, 5:41:41 PM9/22/21
to go-cd
I am struggling to make OAuth plugins work with GoCD

I am using Version: 21.2.0-12498 of GoCD installed on Ubuntu 20.04.3 LTS

I have tried building both https://github.com/gocd-contrib/github-oauth-authorization-plugin and https://github.com/gocd-contrib/google-oauth-authorization-plugin but I have not managed to get either working.

With the github one, which I did today, It configures ok, and I can enter my client id and secret and PAT and when I click the check connection button it says it's ok. But when I try and use it to log in I get a 500 error, but nothing more in the logs than 

2021-09-22 19:24:34,885 WARN [qtp1325802001-34] HttpChannel:673 - handleException /go/plugin/cd.go.authorization.github/login java.net.MalformedURLException: no protocol:

I saw a similar error with the Google plugin which I reported here https://github.com/gocd-contrib/google-oauth-authorization-plugin/issues/128 
I apparently solved that one by changing to java-1.13.0-openjdk-amd64 and rebuilding, but I never managed to get it working either.

I noticed on https://docs.gradle.org/current/userguide/compatibility.html that java 15 which https://github.com/gocd/gocd/pull/9086 suggests is what I'm using is only compatible with gradle 6.7+ and both the plugins claim to only be using 6.6.1 

Is this likely to be my trouble or am I barking up the wrong tree?

Thanks for any help you can offer.

Ketan Padegaonkar

unread,
Sep 22, 2021, 9:45:43 PM9/22/21
to go...@googlegroups.com
Are you using a reverse proxy (https://docs.gocd.org/current/installation/configure-reverse-proxy.html) Is it configured properly?

If everything else fails, try setting the site URL under server configuration.


--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/ab5091fd-0f13-4372-abb2-cc580a388af9n%40googlegroups.com.

Michael Day

unread,
Sep 23, 2021, 2:08:12 PM9/23/21
to go-cd
I am using a reverse proxy, an AWS ALB. I have looked at the configurations you linked got nginx and apache and don't see anything glaringly obvious they are doing which isn't happening on the ALB.
The ALB sets 
and my configuration send all requests to the public IP to :8153 on the EC2 instance running GoCD

I have set the site URL under server configuration as it was useful to get functioning link via the slack plugin.

I guess I could install nginx on the instance and dispense with the ALB to ensure the proxy settings are correct.

Thanks for the help.

I'll report back if I get it working.

Michael Day

unread,
Sep 23, 2021, 2:17:06 PM9/23/21
to go-cd
I got it working.


I set both the Site URL and the Secure Site URL in the server configuration and now it works.

Thanks for pointing me in the direction.
Reply all
Reply to author
Forward
0 new messages