Skip to content

oAuth Azure #1946

Closed
Closed

Description

@duga3

Hi there!

Feature Request

What challenge are you facing?

We're using Azure AD for authentication and there's no direct and simple way to configure oAuth to Azure in Concourse.
Using Concourse generic oAuth does not work right away.

A Modest Proposal

In the long run, it would be great to implement an Azure authentication provider, I'll do that if I find time, for now, I'd like to share how I got it working using generic oAuth.

  • TENANT_ID: Can be retrieved from az show account
  • APP_ID: Application ID of the App in Azure.
  • CLIENT_SECRET: Can be created in the Azure App or via az cli, e.g
az ad app update \
	--id "$APP_ID" \
	--end-date '2099-01-01' \
	--password <very_secret_client_secret>

To configure a team with oAuth, use the following snipped:

fly -t <target> set-team -n <team name> \
    --generic-oauth-display-name=Azure \
    --generic-oauth-client-id="$APP_ID" \
    --generic-oauth-client-secret="$CLIENT_SECRET" \
    --generic-oauth-token-url="https://login.microsoftonline.com/$TENANT_ID/oauth2/token?resource=$APP_ID" \
    --generic-oauth-auth-url="https://login.microsoftonline.com/$TENANT_ID/oauth2/authorize" \
    --generic-oauth-auth-url-param=resource:"$APP_ID"

Don't forget to set the callback URL (Return URL in the portal) for the app to: https://<concourse>/auth/oauth/callbackto get the token exchange working.

Activity

  1. vito commented on Jan 15, 2018

    @vito
    Contributor

    Looks like we might get this for free once we switch to coreos/dex (#1888). Gonna close this for now. If we don't go with dex for whatever reason, auth providers are very easy to implement and PR, so we're not likely to act on this issue ourselves. Thanks for documenting the interim solution here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions