0.22.4 • Published 1 day ago

@backstage/plugin-auth-backend v0.22.4

Weekly downloads
5,229
License
Apache-2.0
Repository
github
Last release
1 day ago

Auth Backend

WORK IN PROGRESS

This is the backend part of the auth plugin.

It responds to auth requests from the frontend, and fulfills them by delegating to the appropriate provider in the backend.

Local development

Choose your OAuth Providers, replace x with actual value and then start backend: Example for Google Oauth Provider at root directory:

export AUTH_GOOGLE_CLIENT_ID=x
export AUTH_GOOGLE_CLIENT_SECRET=x
yarn --cwd packages/backend start

Google

export AUTH_GOOGLE_CLIENT_ID=x
export AUTH_GOOGLE_CLIENT_SECRET=x

Github

Creating a GitHub OAuth application

Follow this link, Create new OAuth App.

  1. Set Application Name to backstage-dev or something along those lines.
  2. You can set the Homepage URL to whatever you want to.
  3. The Authorization Callback URL should match the redirect URI set in Backstage.
    1. Set this to http://localhost:7000/api/auth/github for local development.
    2. Set this to http://{APP_FQDN}:{APP_BACKEND_PORT}/api/auth/github for non-local deployments.
export AUTH_GITHUB_CLIENT_ID=x
export AUTH_GITHUB_CLIENT_SECRET=x

for github enterprise:

export AUTH_GITHUB_CLIENT_ID=x
export AUTH_GITHUB_CLIENT_SECRET=x
export AUTH_GITHUB_ENTERPRISE_INSTANCE_URL=https://x

Gitlab

export GITLAB_BASE_URL=x # default is https://gitlab.com
export AUTH_GITLAB_CLIENT_ID=x
export AUTH_GITLAB_CLIENT_SECRET=x

Okta

export AUTH_OKTA_AUDIENCE=x
export AUTH_OKTA_CLIENT_ID=x
export AUTH_OKTA_CLIENT_SECRET=x

Auth0

export AUTH_AUTH0_DOMAIN=x
export AUTH_AUTH0_CLIENT_ID=x
export AUTH_AUTH0_CLIENT_SECRET=x

Microsoft

Creating an Azure AD App Registration

An Azure AD App Registration is required to be able to sign in using Azure AD and the Microsoft Graph API. Click here to create a new one.

  • Click on the New Registration button.
  • Give the app a name. e.g. backstage-dev
  • Select Accounts in this organizational directory only under supported account types.
  • Enter the callback URL for your backstage backend instance:
    • For local development, this is likely http://localhost:7000/api/auth/microsoft/handler/frame
    • For non-local deployments, this will be https://{APP_FQDN}:{APP_BACKEND_PORT}/auth/microsoft/handler/frame
  • Click Register.

We also need to generate a client secret so Backstage can authenticate as this app.

  • Click on the Certificates & secrets menu item.
  • Under Client secrets, click on New client secret.
  • Add a description for the new secret. e.g. auth-backend-plugin
  • Select an expiry time; 1 Year, 2 Years or Never.
  • Click Add.

The secret value will then be displayed on the screen. You will not be able to retrieve it again after leaving the page.

Starting the Auth Backend

cd packages/backend
export AUTH_MICROSOFT_CLIENT_ID=x
export AUTH_MICROSOFT_CLIENT_SECRET=x
export AUTH_MICROSOFT_TENANT_ID=x
yarn start

SAML

To try out SAML, you can use the mock identity provider:

./scripts/start-saml-idp.sh

Authentication providers

How to add an auth provider

Links

0.22.5-next.1

2 days ago

0.22.5-next.0

9 days ago

0.22.4

16 days ago

0.22.4-next.1

23 days ago

0.22.4-next.0

30 days ago

0.22.3

1 month ago

0.22.2

1 month ago

0.22.1

1 month ago

0.22.0

1 month ago

0.22.0-next.2

2 months ago

0.22.0-next.1

2 months ago

0.21.3

2 months ago

0.22.0-next.0

2 months ago

0.21.2

2 months ago

0.21.1

2 months ago

0.21.0

2 months ago

0.21.0-next.3

3 months ago

0.21.0-next.2

3 months ago

0.20.4-next.1

3 months ago

0.20.4-next.0

3 months ago

0.20.3

4 months ago

0.20.3-next.2

4 months ago

0.20.3-next.1

4 months ago

0.20.3-next.0

4 months ago

0.20.2

4 months ago

0.20.1

4 months ago

0.20.1-next.3

5 months ago

0.20.1-next.2

5 months ago

0.20.1-next.1

5 months ago

0.20.0

6 months ago

0.18.8-next.0

8 months ago

0.19.0-next.3

8 months ago

0.18.6-next.2

9 months ago

0.18.6-next.1

9 months ago

0.18.6-next.0

9 months ago

0.18.5-next.1

10 months ago

0.19.2-next.0

7 months ago

0.19.2-next.1

7 months ago

0.19.0

8 months ago

0.19.1

7 months ago

0.19.2

7 months ago

0.19.3

7 months ago

0.19.4

6 months ago

0.20.0-next.1

6 months ago

0.20.0-next.0

6 months ago

0.20.0-next.2

6 months ago

0.20.1-next.0

5 months ago

0.18.9-next.1

8 months ago

0.18.9-next.2

8 months ago

0.18.5

10 months ago

0.18.6

9 months ago

0.18.7

8 months ago

0.18.8

8 months ago

0.19.3-next.2

7 months ago

0.18.5-next.0

10 months ago

0.18.4

11 months ago

0.18.4-next.3

11 months ago

0.18.4-next.2

11 months ago

0.18.3-next.2

12 months ago

0.18.3-next.1

1 year ago

0.18.3

12 months ago

0.18.4-next.1

11 months ago

0.18.4-next.0

11 months ago

0.18.3-next.0

1 year ago

0.18.2-next.3

1 year ago

0.18.2

1 year ago

0.18.2-next.0

1 year ago

0.18.2-next.1

1 year ago

0.18.2-next.2

1 year ago

0.18.1-next.1

1 year ago

0.18.1-next.0

1 year ago

0.18.1-next.2

1 year ago

0.18.1

1 year ago

0.18.0

1 year ago

0.17.5-next.0

1 year ago

0.17.5-next.1

1 year ago

0.17.5-next.2

1 year ago

0.17.3-next.1

1 year ago

0.17.3-next.2

1 year ago

0.17.3

1 year ago

0.17.4

1 year ago

0.17.3-next.0

1 year ago

0.17.2

1 year ago

0.17.0

2 years ago

0.17.1

1 year ago

0.17.2-next.1

1 year ago

0.17.2-next.0

1 year ago

0.17.2-next.3

1 year ago

0.17.2-next.2

1 year ago

0.17.1-next.0

2 years ago

0.17.1-next.1

1 year ago

0.17.0-next.0

2 years ago

0.17.0-next.1

2 years ago

0.17.0-next.2

2 years ago

0.16.0-next.2

2 years ago

0.16.0-next.1

2 years ago

0.16.0-next.3

2 years ago

0.16.0

2 years ago

0.15.2-next.0

2 years ago

0.14.1

2 years ago

0.14.1-next.2

2 years ago

0.14.1-next.1

2 years ago

0.14.1-next.0

2 years ago

0.15.0-next.1

2 years ago

0.14.2-next.0

2 years ago

0.15.0-next.3

2 years ago

0.15.0-next.2

2 years ago

0.15.0

2 years ago

0.15.1

2 years ago

0.15.1-next.0

2 years ago

0.15.1-next.1

2 years ago

0.13.1-next.0

2 years ago

0.13.1-next.1

2 years ago

0.13.1-next.2

2 years ago

0.14.0

2 years ago

0.12.1-next.0

2 years ago

0.13.0

2 years ago

0.13.0-next.1

2 years ago

0.13.0-next.0

2 years ago

0.13.0-next.2

2 years ago

0.12.1

2 years ago

0.12.2

2 years ago

0.12.3

2 years ago

0.12.0

2 years ago

0.9.0-next.0

2 years ago

0.9.0-next.1

2 years ago

0.7.0

2 years ago

0.10.1

2 years ago

0.10.2

2 years ago

0.10.0

2 years ago

0.8.0

2 years ago

0.5.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.10.0-next.0

2 years ago

0.11.0

2 years ago

0.9.0

2 years ago

0.7.0-next.0

2 years ago

0.4.10

2 years ago

0.4.9

2 years ago

0.4.8

2 years ago

0.4.7

2 years ago

0.4.6

3 years ago

0.4.5

3 years ago

0.4.4

3 years ago

0.4.3

3 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.24

3 years ago

0.3.23

3 years ago

0.3.22

3 years ago

0.3.21

3 years ago

0.3.20

3 years ago

0.3.19

3 years ago

0.3.18

3 years ago

0.3.17

3 years ago

0.3.16

3 years ago

0.3.15

3 years ago

0.3.14

3 years ago

0.3.13

3 years ago

0.3.12

3 years ago

0.3.9

3 years ago

0.3.11

3 years ago

0.3.10

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.10

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.1-alpha.26

4 years ago

0.1.1-alpha.25

4 years ago

0.1.1-alpha.24

4 years ago

0.1.1-alpha.23

4 years ago

0.1.1-alpha.22

4 years ago

0.1.1-alpha.21

4 years ago

0.1.1-alpha.20

4 years ago

0.1.1-alpha.19

4 years ago

0.1.1-alpha.18

4 years ago

0.1.1-alpha.17

4 years ago

0.1.1-alpha.16

4 years ago

0.1.1-alpha.15

4 years ago

0.1.1-alpha.14

4 years ago

0.1.1-alpha.13

4 years ago

0.1.1-alpha.11

4 years ago

0.1.1-alpha.12

4 years ago

0.1.1-alpha.10

4 years ago

0.1.1-alpha.9

4 years ago