@backstage/plugin-auth-backend-module-azure-easyauth-provider 0.0.0-nightly-20240420021132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +5 -0
- package/dist/index.cjs.js +123 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/package.json +48 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @backstage/plugin-auth-backend-module-azure-easyauth-provider
|
|
2
|
+
|
|
3
|
+
## 0.0.0-nightly-20240420021132
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/backend-plugin-api@0.0.0-nightly-20240420021132
|
|
9
|
+
- @backstage/catalog-model@1.4.5
|
|
10
|
+
- @backstage/errors@1.2.4
|
|
11
|
+
- @backstage/plugin-auth-node@0.0.0-nightly-20240420021132
|
|
12
|
+
|
|
13
|
+
## 0.1.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 06a6725: New auth backend module to add `azure-easyauth` provider. Note that as part of this change the default provider ID has been changed from `easyAuth` to `azureEasyAuth`, which means that if you switch to this new module you need to update your app config as well as the `provider` prop of the `ProxiedSignInPage` in the frontend.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
- @backstage/backend-plugin-api@0.6.17
|
|
23
|
+
- @backstage/plugin-auth-node@0.4.12
|
|
24
|
+
- @backstage/catalog-model@1.4.5
|
|
25
|
+
- @backstage/errors@1.2.4
|
package/README.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
6
|
+
var pluginAuthNode = require('@backstage/plugin-auth-node');
|
|
7
|
+
var errors = require('@backstage/errors');
|
|
8
|
+
var jose = require('jose');
|
|
9
|
+
|
|
10
|
+
const ID_TOKEN_HEADER = "x-ms-token-aad-id-token";
|
|
11
|
+
const ACCESS_TOKEN_HEADER = "x-ms-token-aad-access-token";
|
|
12
|
+
const azureEasyAuthAuthenticator = pluginAuthNode.createProxyAuthenticator({
|
|
13
|
+
defaultProfileTransform: async (result) => {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
return {
|
|
16
|
+
profile: {
|
|
17
|
+
displayName: result.fullProfile.displayName,
|
|
18
|
+
email: (_a = result.fullProfile.emails) == null ? void 0 : _a[0].value,
|
|
19
|
+
picture: (_b = result.fullProfile.photos) == null ? void 0 : _b[0].value
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
initialize() {
|
|
24
|
+
},
|
|
25
|
+
async authenticate({ req }) {
|
|
26
|
+
const result = await getResult(req);
|
|
27
|
+
return {
|
|
28
|
+
result,
|
|
29
|
+
providerInfo: {
|
|
30
|
+
accessToken: result.accessToken
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
async function getResult(req) {
|
|
36
|
+
const idToken = req.header(ID_TOKEN_HEADER);
|
|
37
|
+
const accessToken = req.header(ACCESS_TOKEN_HEADER);
|
|
38
|
+
if (idToken === void 0) {
|
|
39
|
+
throw new errors.AuthenticationError(`Missing ${ID_TOKEN_HEADER} header`);
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
fullProfile: idTokenToProfile(idToken),
|
|
43
|
+
accessToken
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function idTokenToProfile(idToken) {
|
|
47
|
+
const claims = jose.decodeJwt(idToken);
|
|
48
|
+
if (claims.ver !== "2.0") {
|
|
49
|
+
throw new Error("id_token is not version 2.0 ");
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
id: claims.oid,
|
|
53
|
+
displayName: claims.name,
|
|
54
|
+
provider: "easyauth",
|
|
55
|
+
emails: [{ value: claims.email }],
|
|
56
|
+
username: claims.preferred_username
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
exports.azureEasyAuthSignInResolvers = void 0;
|
|
61
|
+
((azureEasyAuthSignInResolvers2) => {
|
|
62
|
+
azureEasyAuthSignInResolvers2.idMatchingUserEntityAnnotation = pluginAuthNode.createSignInResolverFactory({
|
|
63
|
+
create() {
|
|
64
|
+
return async (info, ctx) => {
|
|
65
|
+
const {
|
|
66
|
+
fullProfile: { id }
|
|
67
|
+
} = info.result;
|
|
68
|
+
if (!id) {
|
|
69
|
+
throw new Error("User profile contained no id");
|
|
70
|
+
}
|
|
71
|
+
return await ctx.signInWithCatalogUser({
|
|
72
|
+
annotations: {
|
|
73
|
+
"graph.microsoft.com/user-id": id
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
})(exports.azureEasyAuthSignInResolvers || (exports.azureEasyAuthSignInResolvers = {}));
|
|
80
|
+
|
|
81
|
+
const authModuleAzureEasyAuthProvider = backendPluginApi.createBackendModule({
|
|
82
|
+
pluginId: "auth",
|
|
83
|
+
moduleId: "azure-easyauth-provider",
|
|
84
|
+
register(reg) {
|
|
85
|
+
reg.registerInit({
|
|
86
|
+
deps: {
|
|
87
|
+
providers: pluginAuthNode.authProvidersExtensionPoint
|
|
88
|
+
},
|
|
89
|
+
async init({ providers }) {
|
|
90
|
+
validateAppServiceConfiguration(process.env);
|
|
91
|
+
providers.registerProvider({
|
|
92
|
+
providerId: "azureEasyAuth",
|
|
93
|
+
factory: pluginAuthNode.createProxyAuthProviderFactory({
|
|
94
|
+
authenticator: azureEasyAuthAuthenticator,
|
|
95
|
+
signInResolverFactories: {
|
|
96
|
+
...pluginAuthNode.commonSignInResolvers,
|
|
97
|
+
...exports.azureEasyAuthSignInResolvers
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
function validateAppServiceConfiguration(env) {
|
|
106
|
+
var _a, _b, _c;
|
|
107
|
+
if (env.WEBSITE_SKU === void 0) {
|
|
108
|
+
throw new Error("Backstage is not running on Azure App Services");
|
|
109
|
+
}
|
|
110
|
+
if (((_a = env.WEBSITE_AUTH_ENABLED) == null ? void 0 : _a.toLocaleLowerCase("en-US")) !== "true") {
|
|
111
|
+
throw new Error("Azure App Services does not have authentication enabled");
|
|
112
|
+
}
|
|
113
|
+
if (((_b = env.WEBSITE_AUTH_DEFAULT_PROVIDER) == null ? void 0 : _b.toLocaleLowerCase("en-US")) !== "azureactivedirectory") {
|
|
114
|
+
throw new Error("Authentication provider is not Entra ID");
|
|
115
|
+
}
|
|
116
|
+
if (((_c = env.WEBSITE_AUTH_TOKEN_STORE) == null ? void 0 : _c.toLocaleLowerCase("en-US")) !== "true") {
|
|
117
|
+
throw new Error("Token Store is not enabled");
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
exports.azureEasyAuthAuthenticator = azureEasyAuthAuthenticator;
|
|
122
|
+
exports.default = authModuleAzureEasyAuthProvider;
|
|
123
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/authenticator.ts","../src/resolvers.ts","../src/module.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AuthenticationError } from '@backstage/errors';\nimport { createProxyAuthenticator } from '@backstage/plugin-auth-node';\nimport { AzureEasyAuthResult } from './types';\nimport { Request } from 'express';\nimport { Profile } from 'passport';\nimport { decodeJwt } from 'jose';\n\nexport const ID_TOKEN_HEADER = 'x-ms-token-aad-id-token';\nexport const ACCESS_TOKEN_HEADER = 'x-ms-token-aad-access-token';\n\n/** @public */\nexport const azureEasyAuthAuthenticator = createProxyAuthenticator({\n defaultProfileTransform: async (result: AzureEasyAuthResult) => {\n return {\n profile: {\n displayName: result.fullProfile.displayName,\n email: result.fullProfile.emails?.[0].value,\n picture: result.fullProfile.photos?.[0].value,\n },\n };\n },\n initialize() {},\n async authenticate({ req }) {\n const result = await getResult(req);\n return {\n result,\n providerInfo: {\n accessToken: result.accessToken,\n },\n };\n },\n});\n\nasync function getResult(req: Request): Promise<AzureEasyAuthResult> {\n const idToken = req.header(ID_TOKEN_HEADER);\n const accessToken = req.header(ACCESS_TOKEN_HEADER);\n if (idToken === undefined) {\n throw new AuthenticationError(`Missing ${ID_TOKEN_HEADER} header`);\n }\n\n return {\n fullProfile: idTokenToProfile(idToken),\n accessToken: accessToken,\n };\n}\n\nfunction idTokenToProfile(idToken: string) {\n const claims = decodeJwt(idToken);\n\n if (claims.ver !== '2.0') {\n throw new Error('id_token is not version 2.0 ');\n }\n\n return {\n id: claims.oid,\n displayName: claims.name,\n provider: 'easyauth',\n emails: [{ value: claims.email }],\n username: claims.preferred_username,\n } as Profile;\n}\n","/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createSignInResolverFactory,\n SignInInfo,\n} from '@backstage/plugin-auth-node';\nimport { AzureEasyAuthResult } from './types';\n\n/** @public */\nexport namespace azureEasyAuthSignInResolvers {\n export const idMatchingUserEntityAnnotation = createSignInResolverFactory({\n create() {\n return async (info: SignInInfo<AzureEasyAuthResult>, ctx) => {\n const {\n fullProfile: { id },\n } = info.result;\n\n if (!id) {\n throw new Error('User profile contained no id');\n }\n\n return await ctx.signInWithCatalogUser({\n annotations: {\n 'graph.microsoft.com/user-id': id,\n },\n });\n };\n },\n });\n}\n","/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createBackendModule } from '@backstage/backend-plugin-api';\nimport {\n authProvidersExtensionPoint,\n commonSignInResolvers,\n createProxyAuthProviderFactory,\n} from '@backstage/plugin-auth-node';\nimport { azureEasyAuthAuthenticator } from './authenticator';\nimport { azureEasyAuthSignInResolvers } from './resolvers';\n\n/** @public */\nexport const authModuleAzureEasyAuthProvider = createBackendModule({\n pluginId: 'auth',\n moduleId: 'azure-easyauth-provider',\n register(reg) {\n reg.registerInit({\n deps: {\n providers: authProvidersExtensionPoint,\n },\n async init({ providers }) {\n validateAppServiceConfiguration(process.env);\n providers.registerProvider({\n providerId: 'azureEasyAuth',\n factory: createProxyAuthProviderFactory({\n authenticator: azureEasyAuthAuthenticator,\n signInResolverFactories: {\n ...commonSignInResolvers,\n ...azureEasyAuthSignInResolvers,\n },\n }),\n });\n },\n });\n },\n});\n\nfunction validateAppServiceConfiguration(env: NodeJS.ProcessEnv) {\n // Based on https://github.com/AzureAD/microsoft-identity-web/blob/f7403779d1a91f4a3fec0ed0993bd82f50f299e1/src/Microsoft.Identity.Web/AppServicesAuth/AppServicesAuthenticationInformation.cs#L38-L59\n //\n // It's critical to validate we're really running in a correctly configured Azure App Services,\n // As we rely on App Services to manage & validate the ID and Access Token headers\n // Without that, this users can be trivially impersonated.\n if (env.WEBSITE_SKU === undefined) {\n throw new Error('Backstage is not running on Azure App Services');\n }\n if (env.WEBSITE_AUTH_ENABLED?.toLocaleLowerCase('en-US') !== 'true') {\n throw new Error('Azure App Services does not have authentication enabled');\n }\n if (\n env.WEBSITE_AUTH_DEFAULT_PROVIDER?.toLocaleLowerCase('en-US') !==\n 'azureactivedirectory'\n ) {\n throw new Error('Authentication provider is not Entra ID');\n }\n if (env.WEBSITE_AUTH_TOKEN_STORE?.toLocaleLowerCase('en-US') !== 'true') {\n throw new Error('Token Store is not enabled');\n }\n}\n"],"names":["createProxyAuthenticator","AuthenticationError","decodeJwt","azureEasyAuthSignInResolvers","createSignInResolverFactory","createBackendModule","authProvidersExtensionPoint","createProxyAuthProviderFactory","commonSignInResolvers"],"mappings":";;;;;;;;;AAuBO,MAAM,eAAkB,GAAA,yBAAA,CAAA;AACxB,MAAM,mBAAsB,GAAA,6BAAA,CAAA;AAG5B,MAAM,6BAA6BA,uCAAyB,CAAA;AAAA,EACjE,uBAAA,EAAyB,OAAO,MAAgC,KAAA;AA5BlE,IAAA,IAAA,EAAA,EAAA,EAAA,CAAA;AA6BI,IAAO,OAAA;AAAA,MACL,OAAS,EAAA;AAAA,QACP,WAAA,EAAa,OAAO,WAAY,CAAA,WAAA;AAAA,QAChC,KAAO,EAAA,CAAA,EAAA,GAAA,MAAA,CAAO,WAAY,CAAA,MAAA,KAAnB,mBAA4B,CAAG,CAAA,CAAA,KAAA;AAAA,QACtC,OAAS,EAAA,CAAA,EAAA,GAAA,MAAA,CAAO,WAAY,CAAA,MAAA,KAAnB,mBAA4B,CAAG,CAAA,CAAA,KAAA;AAAA,OAC1C;AAAA,KACF,CAAA;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AAED,SAAS,gCAAgC,GAAwB,EAAA;AAnDjE,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AAyDE,EAAI,IAAA,GAAA,CAAI,gBAAgB,KAAW,CAAA,EAAA;AACjC,IAAM,MAAA,IAAI,MAAM,gDAAgD,CAAA,CAAA;AAAA,GAClE;AACA,EAAA,IAAA,CAAA,CAAI,EAAI,GAAA,GAAA,CAAA,oBAAA,KAAJ,IAA0B,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,iBAAA,CAAkB,cAAa,MAAQ,EAAA;AACnE,IAAM,MAAA,IAAI,MAAM,yDAAyD,CAAA,CAAA;AAAA,GAC3E;AACA,EAAA,IAAA,CAAA,CACE,EAAI,GAAA,GAAA,CAAA,6BAAA,KAAJ,IAAmC,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,iBAAA,CAAkB,cACrD,sBACA,EAAA;AACA,IAAM,MAAA,IAAI,MAAM,yCAAyC,CAAA,CAAA;AAAA,GAC3D;AACA,EAAA,IAAA,CAAA,CAAI,EAAI,GAAA,GAAA,CAAA,wBAAA,KAAJ,IAA8B,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,iBAAA,CAAkB,cAAa,MAAQ,EAAA;AACvE,IAAM,MAAA,IAAI,MAAM,4BAA4B,CAAA,CAAA;AAAA,GAC9C;AACF;;;;;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
+
import * as _backstage_plugin_auth_node from '@backstage/plugin-auth-node';
|
|
3
|
+
import { Profile } from 'passport';
|
|
4
|
+
|
|
5
|
+
/** @public */
|
|
6
|
+
declare const authModuleAzureEasyAuthProvider: () => _backstage_backend_plugin_api.BackendFeature;
|
|
7
|
+
|
|
8
|
+
/** @public */
|
|
9
|
+
type AzureEasyAuthResult = {
|
|
10
|
+
fullProfile: Profile;
|
|
11
|
+
accessToken?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @public */
|
|
15
|
+
declare const azureEasyAuthAuthenticator: _backstage_plugin_auth_node.ProxyAuthenticator<void, AzureEasyAuthResult, {
|
|
16
|
+
accessToken: string | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
|
|
19
|
+
/** @public */
|
|
20
|
+
declare namespace azureEasyAuthSignInResolvers {
|
|
21
|
+
const idMatchingUserEntityAnnotation: _backstage_plugin_auth_node.SignInResolverFactory<AzureEasyAuthResult, unknown>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { type AzureEasyAuthResult, azureEasyAuthAuthenticator, azureEasyAuthSignInResolvers, authModuleAzureEasyAuthProvider as default };
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@backstage/plugin-auth-backend-module-azure-easyauth-provider",
|
|
3
|
+
"version": "0.0.0-nightly-20240420021132",
|
|
4
|
+
"description": "The azure-easyauth-provider backend module for the auth plugin.",
|
|
5
|
+
"backstage": {
|
|
6
|
+
"role": "backend-plugin-module"
|
|
7
|
+
},
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public",
|
|
10
|
+
"main": "dist/index.cjs.js",
|
|
11
|
+
"types": "dist/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/backstage/backstage",
|
|
16
|
+
"directory": "plugins/auth-backend-module-azure-easyauth-provider"
|
|
17
|
+
},
|
|
18
|
+
"license": "Apache-2.0",
|
|
19
|
+
"main": "dist/index.cjs.js",
|
|
20
|
+
"types": "dist/index.d.ts",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "backstage-cli package build",
|
|
26
|
+
"clean": "backstage-cli package clean",
|
|
27
|
+
"lint": "backstage-cli package lint",
|
|
28
|
+
"prepack": "backstage-cli package prepack",
|
|
29
|
+
"postpack": "backstage-cli package postpack",
|
|
30
|
+
"start": "backstage-cli package start",
|
|
31
|
+
"test": "backstage-cli package test"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@backstage/backend-plugin-api": "^0.0.0-nightly-20240420021132",
|
|
35
|
+
"@backstage/catalog-model": "^1.4.5",
|
|
36
|
+
"@backstage/errors": "^1.2.4",
|
|
37
|
+
"@backstage/plugin-auth-node": "^0.0.0-nightly-20240420021132",
|
|
38
|
+
"@types/passport": "^1.0.16",
|
|
39
|
+
"express": "^4.19.2",
|
|
40
|
+
"jose": "^5.0.0",
|
|
41
|
+
"passport": "^0.7.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@backstage/backend-test-utils": "^0.0.0-nightly-20240420021132",
|
|
45
|
+
"@backstage/cli": "^0.0.0-nightly-20240420021132",
|
|
46
|
+
"@backstage/plugin-auth-backend": "^0.0.0-nightly-20240420021132"
|
|
47
|
+
}
|
|
48
|
+
}
|