LATEST VERSION: 4.2.1 - RELEASE NOTES
Concourse for PCF v4.x

Configuring Team Authentication

Page last updated:

This topic describes how to configure your team’s authentication using authentication providers and teams.

Overview

Continuous Integration servers often contain many secrets that let them access source code and deploy apps. It is important that those secrets remain well guarded. Concourse provides options for both authentication and authorization to give you control over who can access your server and how much they can see.

Any number of the following providers can be enabled at any one time. Users are given a choice when logging in as to which one they want to use.

Note: If you access your Concourse server over the public internet, then consider using TLS to secure your connection to the web node.

Configuring team authentication in Concourse is done in two parts:

  1. Configure the allowed authentication providers in the deployment manifest. See Configure Authentication Providers below.
  2. Add users and groups to Concourse teams using fly set-team. See Add Users and Groups to Teams below.

Configure Authentication Providers

Concourse can be configured to use local users, GitHub, generic LDAP, Cloud Foundry, OAuth, and OIDC as authentication providers. You must specify the allowed authentication providers before Concourse is deployed.

A Concourse operator needs to provide the following information in their Concourse deployment manifest:

  • A list of allowed local users.
  • Configurations against third-party authentication providers (GitHub, generic LDAP, Cloud Foundry, OAuth, and OIDC).
  • Users who should be members of the default main team (either local users or users/groups from external authentication providers).

Local Users

Local users must be declared in the add_local_users of the atc job in the deployment manifest. Passwords can be supplied in plaintext or as a bcrypted string (minimum 10 rounds).

Example:

- user1:password1
- user2:$2y$10$W9542XKXzG5aedX09AlSg.nr0IwejlWosCWXzRKl1eOFzdpgOrGcG

Note:user1 and user2 mentioned above do not yet have access to any teams. They must be granted access on a team-by-team basis. For more information, see Add Users and Groups to Teams below.

GitHub Authentication

A Concourse server can authenticate against GitHub to take advantage of their permission model and other security improvements in their infrastructure. To do this, you need to:

  1. Create a GitHub app.
  2. Configure your deployment with the GitHub client details.

Create a GitHub App

You can create an OAuth app on GitHub. To do this, see Register a new OAuth app.

The callback URL is the external URL of your Concourse server with /sky/issuer/callback appended. For example, Concourse’s own CI server’s callback URL is https://ci.concourse-ci.org/sky/issuer/callback.

Note: The app must be created under an organization if you want to authorize users based on organization/team membership. If the app is created under a personal account, only individual users can be authorized.

Configure the GitHub Client Details

GitHub provides a Client ID and a Client Secret for the new app. Supply this information in the github_auth, client_id, and client_secret fields. For more information on these fields, see github_auth.

Cloud Foundry Authentication

Operators can use Cloud Foundry Authentication (CF Auth) to authenticate users against a Cloud Foundry deployment, using the User Account and Authentication (UAA) server.

To authenticate users, do the following:

  1. Create a UAA Client.
  2. Configure your deployment with the Cloud Foundry client details.

Create the Client

Create a client for Concourse in UAA.

The callback URL is the external URL of your Concourse server with /sky/issuer/callback appended. For example, Concourse’s own CI server’s callback URL is https://ci.concourse-ci.org/sky/issuer/callback.

The client should look something like this, under uaa.clients:

concourse:
  id: my-client-id
  secret: my-client-secret
  scope: openid,cloud_controller.read
  authorized-grant-types: "authorization_code,refresh_token"
  access-token-validity: 3600
  refresh-token-validity: 3600
  redirect-uri: https://concourse.example.com/sky/issuer/callback

Configure the Client

You are given a Client ID and a Client Secret for your new app. These are then passed in the client_id and client-secret fields on the atc job. For more information on these fields, see client_id.

You also need to configure your base API URL for CF in the api_url field. To do this, see api_url.

OIDC Authentication

If your authentication provider follows the OIDC specification, then use this provider. Unlike the OAuth provider, you do not need to provide auth-url, token-url, and userinfo-url. Instead, you can provide an issuer-url, and the system queries the .well-known/openid-configuration endpoint to discover the information it needs.

To add the OIDC authentication provider, do the following:

  1. Create the OIDC client.
  2. Configure the client.

Create the OIDC Client

First, you need to create a client with your OIDC provider.

The callback URL is the external URL of your Concourse server with /sky/issuer/callback appended. For example, Concourse’s own CI server’s callback URL is https://ci.concourse-ci.org/sky/issuer/callback.

Configure the Client

To configure the generic OIDC, fill in the generic_oidc fields in the atc job of the manifest. For more information on these fields, see generic_oidc.

OAuth Authentication

If your authentication provider supports OAuth2 but does not follow the OIDC specification, then use this provider. This provider gives you more control over the OIDC provider by letting operators specify the full set of authorization endpoints (auth-url, token-url).

To add the OAuth provider, do the following:

  1. Create the OIDC client.
  2. Configure the client.

Create the OAuth Client

First, you need to create a client with your OAuth provider.

The callback URL is the external URL of your Concourse server with /sky/issuer/callback appended. For example, Concourse’s own CI server’s callback URL is https://ci.concourse-ci.org/sky/issuer/callback.

Configure the Client

To configure the OAuth provider, fill in the generic_oauth fields in the atc job of the manifest. For more information on these fields, see generic_oauth.

The Main Team

By default, Concourse comes with a single team called main. The main team is an admin team. This means it can create and update other teams. Currently there is no way to promote a team to become an admin team, so main is a special team.

Concourse requires you to specify at least one user/group to be a member of the main team during deployment. The list of allowed users, groups, and orgs are managed through the main_team property in the ATC job. For more information on this property, see main_team.

An example of adding a local user to the main team can be found in the add-local-users.yml file in the concourse-bosh-deployment repository.

The values set in the authentication flags take effect whenever the ATC starts up. This allows Concourse to be deployed against declared configurations. It also makes sure that members of the main team do not get locked out of their Concourse.

Add Users and Groups to Teams

After you deploy Concourse with the authentication providers configured, you may specify allowed users and groups using the fly set-team command. With this command, users and groups can be:

  • Added to new teams
  • Modified on existing teams

For more information on this command, see fly set-team.

Note: The exception to this is the main team. Members of the main team are configured as part of the initial deployment and cannot be changed after the deployment. For more information on the main team, see The main team.

Local Users

You can grant local users access to a team using the --local-user flag:

  1. Open a terminal window.
  2. Enter the following command:
    $  fly set-team -n YOUR-TEAM --local-user USERNAME
    

GitHub Users, Teams, and Orgs

Add GitHub users, teams, or organizations to a Concourse team.

  • Use --github-user=LOGIN to authorize an individual user.
  • Use --github-org=ORG-NAME to authorize an entire organization’s members.
  • Use --github-team=ORG-NAME:TEAM-NAME to authorize a team’s members within an organization.

For example:

$ fly set-team -n my-team \
    --github-user my-github-login \
    --github-org my-org \
    --github-team my-org:my-team 1

Note: : is used as the separator when adding GitHub teams instead of /. If multiple teams are added, the flag must be repeated.
For example:
--github-team my-org:my-team 1
--github-team my-org:my-team 2

CF Auth Users, Spaces, and Orgs

Add users, spaces, and org members from a CF deployment to a Concourse team.

  • Use --cf-user=USERNAME to authorize an individual user.
  • Use --cf-org=ORG-NAME to authorize an entire organization’s members.
  • Use --cf-space=ORG-NAME:SPACE-NAME to authorize the members of a space within an organization.

For example:

$ fly set-team -n my-team \
    --cf-user my-username \
    --cf-org my-org \
    --cf-space my-org:my-space

Note: : is used as the separator when adding members from a CF space instead of /. If multiple spaces are added, the flag must be repeated.
For example:
--github-team my-org:my-space 1
--github-team my-org:my-space 2

OAuth Users and Groups

Configure users and groups from a generic OAuth provider.

You may only configure groups if the authentication provider exposes this information in either the token itself, or in the contents of the userinfo endpoint. You can configure which claim points to the group’s information by specifying the groups-key at startup.

  • Use --cf-user=USERNAME to authorize an individual user.
  • Use --cf-org=ORG-NAME to authorize an entire organization’s members.
  • Use --cf-space=ORG_NAME:SPACE-NAME to authorize the members of a space within an organization.

For example:

$ fly set-team -n my-team \
    --oauth-user my-username \
    --oauth-group my-group

OIDC Users and Groups

Team members can configure users and groups from a generic OIDC provider. This is very similar to the OAuth connector. The main difference is that OIDC providers must follow the OIDC specification, while generic OAuth providers can be a little more flexible.

You may only configure groups if the authentication provider exposes this information in the contents of the userinfo endpoint. You can configure which claim points to the groups information by specifying the groups-key at startup.

  • Use --oidc-user=USERNAME to authorize an individual user.
  • Use --oidc-group=GROUP-NAME to authorize anyone from the group.

For example:

$ fly set-team -n my-team \
    --oidc-user my-username \
    --oidc-group my-group

Team Configuration Details

Team members can view the authentication settings of the teams they belong to by using the fly teams -d command.

For example, the command below:

$ fly -t prod teams -d

Results in something like the following:

name     users          groups
main     github:User    github:Organization

Create a pull request or raise an issue on the source for this page in GitHub