Merge pull request #17108 from afscrome/easyauthexport
Properly expose easy auth provider
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend': patch
|
||||
---
|
||||
|
||||
Export Azure Easy Auth provider so it can actually be used.
|
||||
@@ -1,10 +1,12 @@
|
||||
---
|
||||
id: azure-easy-auth
|
||||
id: easy-auth
|
||||
title: Azure EasyAuth Provider
|
||||
sidebar_label: Azure EasyAuth
|
||||
sidebar_label: Azure Easy Auth
|
||||
description: Adding Azure's EasyAuth Proxy as an authentication provider in Backstage
|
||||
---
|
||||
|
||||
The Backstage `core-plugin-api` package comes with a Microsoft authentication provider that can authenticate users using Azure Active Directory for PaaS service hosted in Azure that support Easy Auth, such as Azure App Services.
|
||||
|
||||
## Backstage Changes
|
||||
|
||||
Add the following into your `app-config.yaml` or `app-config.production.yaml` file
|
||||
|
||||
@@ -277,15 +277,16 @@
|
||||
"items": [
|
||||
"auth/auth0/provider",
|
||||
"auth/atlassian/provider",
|
||||
"auth/bitbucket/provider",
|
||||
"auth/microsoft/provider",
|
||||
"auth/microsoft/easy-auth",
|
||||
"auth/bitbucket/provider",
|
||||
"auth/github/provider",
|
||||
"auth/gitlab/provider",
|
||||
"auth/google/provider",
|
||||
"auth/google/gcp-iap-auth",
|
||||
"auth/okta/provider",
|
||||
"auth/onelogin/provider",
|
||||
"auth/oauth2-proxy/provider"
|
||||
"auth/oauth2-proxy/provider",
|
||||
"auth/onelogin/provider"
|
||||
]
|
||||
},
|
||||
"auth/identity-resolver",
|
||||
|
||||
@@ -6,6 +6,7 @@ edit_uri: edit/master/docs
|
||||
plugins:
|
||||
- techdocs-core
|
||||
|
||||
# For sidebar navigation on https://backstage.io/, see `microsite/sidebars.json`
|
||||
nav:
|
||||
- Overview:
|
||||
- What is Backstage?: 'overview/what-is-backstage.md'
|
||||
|
||||
@@ -229,6 +229,12 @@ export const defaultAuthProviderFactories: {
|
||||
[providerId: string]: AuthProviderFactory;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type EasyAuthResult = {
|
||||
fullProfile: Profile;
|
||||
accessToken?: string;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export const encodeState: (state: OAuthState) => string;
|
||||
|
||||
@@ -694,6 +700,19 @@ export const providers: Readonly<{
|
||||
nameIdMatchingUserEntityName(): SignInResolver<SamlAuthResult>;
|
||||
}>;
|
||||
}>;
|
||||
easyAuth: Readonly<{
|
||||
create: (
|
||||
options?:
|
||||
| {
|
||||
authHandler?: AuthHandler<EasyAuthResult> | undefined;
|
||||
signIn: {
|
||||
resolver: SignInResolver<EasyAuthResult>;
|
||||
};
|
||||
}
|
||||
| undefined,
|
||||
) => AuthProviderFactory;
|
||||
resolvers: never;
|
||||
}>;
|
||||
}>;
|
||||
|
||||
// @public (undocumented)
|
||||
|
||||
@@ -15,4 +15,4 @@
|
||||
*/
|
||||
|
||||
export { easyAuth } from './provider';
|
||||
export type { EasyAuthResponse } from './provider';
|
||||
export type { EasyAuthResult } from './provider';
|
||||
|
||||
@@ -38,6 +38,7 @@ type Options = {
|
||||
resolverContext: AuthResolverContext;
|
||||
};
|
||||
|
||||
/** @public */
|
||||
export type EasyAuthResult = {
|
||||
fullProfile: Profile;
|
||||
accessToken?: string;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
export type { AwsAlbResult } from './aws-alb';
|
||||
export type { EasyAuthResult } from './azure-easyauth';
|
||||
export type {
|
||||
BitbucketOAuthResult,
|
||||
BitbucketPassportProfile,
|
||||
|
||||
@@ -32,6 +32,7 @@ import { onelogin } from './onelogin';
|
||||
import { saml } from './saml';
|
||||
import { AuthProviderFactory } from './types';
|
||||
import { bitbucketServer } from './bitbucketServer';
|
||||
import { easyAuth } from './azure-easyauth';
|
||||
|
||||
/**
|
||||
* All built-in auth provider integrations.
|
||||
@@ -56,6 +57,7 @@ export const providers = Object.freeze({
|
||||
okta,
|
||||
onelogin,
|
||||
saml,
|
||||
easyAuth,
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -73,6 +75,7 @@ export const defaultAuthProviderFactories: {
|
||||
okta: okta.create(),
|
||||
auth0: auth0.create(),
|
||||
microsoft: microsoft.create(),
|
||||
easyAuth: easyAuth.create(),
|
||||
oauth2: oauth2.create(),
|
||||
oidc: oidc.create(),
|
||||
onelogin: onelogin.create(),
|
||||
|
||||
Reference in New Issue
Block a user