Skip to content
This repository has been archived by the owner. It is now read-only.
GoCD OAuth Login
Branch: master
Clone or download
Latest commit 8f3aedb May 18, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
base Delegate the go.plugin-settings.get-configuration to individual plugins. Jul 6, 2017
github Delegate the go.plugin-settings.get-configuration to individual plugins. Jul 6, 2017
gitlab Delegate the go.plugin-settings.get-configuration to individual plugins. Jul 6, 2017
google Delegate the go.plugin-settings.get-configuration to individual plugins. Jul 6, 2017
gradle/wrapper Upgrade to gradle 4.6 May 18, 2018
images Improve instructions and the rename the labels on the oauth screen. Dec 2, 2015
.gitignore GitLab plugin - initial commit Sep 26, 2016
LICENSE Add some legal text Dec 21, 2015
README.md
build.gradle Bump version to 2.4 Feb 22, 2017
gradlew Upgrade to gradle 4.6 May 18, 2018
gradlew.bat Move to gradle and cleanup some ambiguity in the plugin Sep 21, 2016
settings.gradle GitLab plugin - initial commit Sep 26, 2016

README.md

Deprecation note

These plugins are deprecated as part of GoCD release 17.5.0. Support for these plugins will be removed from 18.1.0 (scheduled to be released in January 2018). Replacement for these plugins are available at -

GoCD OAuth Login Build Status

This is GoCD's Authentication plugin that allows users to login using OAuth.

Currently supported

  • GitHub
  • Google
  • GitLab (CE)

Adding new providers

The plugin internally uses social-auth which acts as a wrapper for multiple OAuth integrations. Hence adding more integrations is very little effort. You will need to add a provider and a maven profile (use Google implementation for reference).

Requirements

  • GoCD >= v15.2

Getting Started

Installation

Download the latest plugin jar from Releases section. Place it in <go-server-location>/plugins/external and restart Go Server.

Configuration

Create an OAuth Application with an OAuth provider of your choice (GitHub, Google, etc.)

The oauth provider will normally ask you for an "OAuth Redirect URL". The redirect URL for the two plugins will be —

  • Github OAuth Plugin -- https://your-go-server/go/plugin/interact/github.oauth.login/authenticate
  • Google OAuth Plugin -- https://your-go-server/go/plugin/interact/google.oauth.login/authenticate
  • GitLab OAuth Plugin -- https://your-go-server/go/plugin/interact/gitlab.oauth.login/authenticate

Note: We highly recommend that you use HTTPS for OAuth authorizations.

Once your application is registered, you will receive an "OAuth Client ID" and "OAuth Client Secret", save those for the next step.

Configure the GoCD Server

Note: Due to a bug in the current version of GoCD, you'll need to set a valid Password file path under Server Configuration (or configure an LDAP server).

It is also recommended you have at least one local admin configured to avoid getting yourself locked out during this process. If you're using password files, make sure the file contains at least one entry.

On your go server, visit the plugin settings page, and enter those credentials.

On clicking save, you may be be logged out, if you're not logged out. Now is a good time to logout and see if you can get in.

The GitHub and GitLab plugins also supports user search, allowing you to search and add users right from GoCD's UI: Add User

Contributing

We encourage you to contribute to Go. For information on contributing to this project, please see our contributor's guide. A lot of useful information like links to user documentation, design documentation, mailing lists etc. can be found in the resources section.

License

Copyright 2015 ThoughtWorks, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You can’t perform that action at this time.