@backstage/plugin-auth-backend-module-auth0-provider 0.0.0-nightly-20240910023018
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 +13 -0
- package/README.md +8 -0
- package/config.d.ts +37 -0
- package/dist/index.cjs.js +119 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/package.json +53 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @backstage/plugin-auth-backend-module-auth0-provider
|
|
2
|
+
|
|
3
|
+
## 0.0.0-nightly-20240910023018
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d908d8c: New module for `@backstage/plugin-auth-backend` that adds a Auth0 auth provider.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @backstage/backend-plugin-api@0.0.0-nightly-20240910023018
|
|
13
|
+
- @backstage/plugin-auth-node@0.0.0-nightly-20240910023018
|
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Auth Module: Auth0 Provider
|
|
2
|
+
|
|
3
|
+
This module provides an Auth0 auth provider implementation for `@backstage/plugin-auth-backend`.
|
|
4
|
+
|
|
5
|
+
## Links
|
|
6
|
+
|
|
7
|
+
- [Repository](https://gitlab.com/backstage/backstage/tree/master/plugins/auth-backend-module-auth0-provider)
|
|
8
|
+
- [Backstage Project Homepage](https://backstage.io)
|
package/config.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 The Backstage Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export interface Config {
|
|
18
|
+
auth?: {
|
|
19
|
+
providers?: {
|
|
20
|
+
/** @visibility frontend */
|
|
21
|
+
auth0?: {
|
|
22
|
+
[authEnv: string]: {
|
|
23
|
+
clientId: string;
|
|
24
|
+
/**
|
|
25
|
+
* @visibility secret
|
|
26
|
+
*/
|
|
27
|
+
clientSecret: string;
|
|
28
|
+
domain: string;
|
|
29
|
+
callbackUrl?: string;
|
|
30
|
+
audience?: string;
|
|
31
|
+
connection?: string;
|
|
32
|
+
connectionScope?: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var pluginAuthNode = require('@backstage/plugin-auth-node');
|
|
6
|
+
var Auth0InternalStrategy = require('passport-auth0');
|
|
7
|
+
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var Auth0InternalStrategy__default = /*#__PURE__*/_interopDefaultCompat(Auth0InternalStrategy);
|
|
12
|
+
|
|
13
|
+
class Auth0Strategy extends Auth0InternalStrategy__default.default {
|
|
14
|
+
constructor(options, verify) {
|
|
15
|
+
const optionsWithURLs = {
|
|
16
|
+
...options,
|
|
17
|
+
authorizationURL: `https://${options.domain}/authorize`,
|
|
18
|
+
tokenURL: `https://${options.domain}/oauth/token`,
|
|
19
|
+
userInfoURL: `https://${options.domain}/userinfo`,
|
|
20
|
+
apiUrl: `https://${options.domain}/api`
|
|
21
|
+
};
|
|
22
|
+
super(optionsWithURLs, verify);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const auth0Authenticator = pluginAuthNode.createOAuthAuthenticator({
|
|
27
|
+
defaultProfileTransform: pluginAuthNode.PassportOAuthAuthenticatorHelper.defaultProfileTransform,
|
|
28
|
+
initialize({ callbackUrl, config }) {
|
|
29
|
+
const clientID = config.getString("clientId");
|
|
30
|
+
const clientSecret = config.getString("clientSecret");
|
|
31
|
+
const domain = config.getString("domain");
|
|
32
|
+
const audience = config.getOptionalString("audience");
|
|
33
|
+
const connection = config.getOptionalString("connection");
|
|
34
|
+
const connectionScope = config.getOptionalString("connectionScope");
|
|
35
|
+
const callbackURL = config.getOptionalString("callbackUrl") ?? callbackUrl;
|
|
36
|
+
const store = {
|
|
37
|
+
store(_req, cb) {
|
|
38
|
+
cb(null, null);
|
|
39
|
+
},
|
|
40
|
+
verify(_req, _state, cb) {
|
|
41
|
+
cb(null, true);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const helper = pluginAuthNode.PassportOAuthAuthenticatorHelper.from(
|
|
45
|
+
new Auth0Strategy(
|
|
46
|
+
{
|
|
47
|
+
clientID,
|
|
48
|
+
clientSecret,
|
|
49
|
+
callbackURL,
|
|
50
|
+
domain,
|
|
51
|
+
store,
|
|
52
|
+
// We need passReqToCallback set to false to get params, but there's
|
|
53
|
+
// no matching type signature for that, so instead behold this beauty
|
|
54
|
+
passReqToCallback: false
|
|
55
|
+
},
|
|
56
|
+
(accessToken, refreshToken, params, fullProfile, done) => {
|
|
57
|
+
done(
|
|
58
|
+
void 0,
|
|
59
|
+
{
|
|
60
|
+
fullProfile,
|
|
61
|
+
accessToken,
|
|
62
|
+
params
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
refreshToken
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
return { helper, audience, connection, connectionScope };
|
|
72
|
+
},
|
|
73
|
+
async start(input, { helper, audience, connection, connectionScope: connection_scope }) {
|
|
74
|
+
return helper.start(input, {
|
|
75
|
+
accessType: "offline",
|
|
76
|
+
prompt: "consent",
|
|
77
|
+
...audience ? { audience } : {},
|
|
78
|
+
...connection ? { connection } : {},
|
|
79
|
+
...connection_scope ? { connection_scope } : {}
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
async authenticate(input, { helper, audience, connection, connectionScope: connection_scope }) {
|
|
83
|
+
return helper.authenticate(input, {
|
|
84
|
+
...audience ? { audience } : {},
|
|
85
|
+
...connection ? { connection } : {},
|
|
86
|
+
...connection_scope ? { connection_scope } : {}
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
async refresh(input, { helper }) {
|
|
90
|
+
return helper.refresh(input);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const authModuleAuth0Provider = backendPluginApi.createBackendModule({
|
|
95
|
+
pluginId: "auth",
|
|
96
|
+
moduleId: "auth0-provider",
|
|
97
|
+
register(reg) {
|
|
98
|
+
reg.registerInit({
|
|
99
|
+
deps: {
|
|
100
|
+
providers: pluginAuthNode.authProvidersExtensionPoint
|
|
101
|
+
},
|
|
102
|
+
async init({ providers }) {
|
|
103
|
+
providers.registerProvider({
|
|
104
|
+
providerId: "auth0",
|
|
105
|
+
factory: pluginAuthNode.createOAuthProviderFactory({
|
|
106
|
+
authenticator: auth0Authenticator,
|
|
107
|
+
signInResolverFactories: {
|
|
108
|
+
...pluginAuthNode.commonSignInResolvers
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
exports.auth0Authenticator = auth0Authenticator;
|
|
118
|
+
exports.default = authModuleAuth0Provider;
|
|
119
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/strategy.ts","../src/authenticator.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 Auth0InternalStrategy from 'passport-auth0';\nimport type { StateStore } from 'passport-oauth2';\n\n/** @public */\nexport interface Auth0StrategyOptionsWithRequest {\n clientID: string;\n clientSecret: string;\n callbackURL: string;\n domain: string;\n passReqToCallback: true;\n store: StateStore;\n}\n\n/** @public */\nexport class Auth0Strategy extends Auth0InternalStrategy {\n constructor(\n options: Auth0StrategyOptionsWithRequest,\n verify: Auth0InternalStrategy.VerifyFunction,\n ) {\n const optionsWithURLs = {\n ...options,\n authorizationURL: `https://${options.domain}/authorize`,\n tokenURL: `https://${options.domain}/oauth/token`,\n userInfoURL: `https://${options.domain}/userinfo`,\n apiUrl: `https://${options.domain}/api`,\n };\n super(optionsWithURLs, verify);\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 express from 'express';\nimport {\n createOAuthAuthenticator,\n PassportOAuthAuthenticatorHelper,\n PassportOAuthDoneCallback,\n PassportProfile,\n} from '@backstage/plugin-auth-node';\nimport { Auth0Strategy } from './strategy';\n\n/** @public */\nexport const auth0Authenticator = createOAuthAuthenticator({\n defaultProfileTransform:\n PassportOAuthAuthenticatorHelper.defaultProfileTransform,\n initialize({ callbackUrl, config }) {\n const clientID = config.getString('clientId');\n const clientSecret = config.getString('clientSecret');\n const domain = config.getString('domain');\n const audience = config.getOptionalString('audience');\n const connection = config.getOptionalString('connection');\n const connectionScope = config.getOptionalString('connectionScope');\n const callbackURL = config.getOptionalString('callbackUrl') ?? callbackUrl;\n // Due to passport-auth0 forcing options.state = true,\n // passport-oauth2 requires express-session to be installed\n // so that the 'state' parameter of the oauth2 flow can be stored.\n // This implementation of StateStore matches the NullStore found within\n // passport-oauth2, which is the StateStore implementation used when options.state = false,\n // allowing us to avoid using express-session in order to integrate with auth0.\n const store = {\n store(_req: express.Request, cb: any) {\n cb(null, null);\n },\n verify(_req: express.Request, _state: string, cb: any) {\n cb(null, true);\n },\n };\n\n const helper = PassportOAuthAuthenticatorHelper.from(\n new Auth0Strategy(\n {\n clientID,\n clientSecret,\n callbackURL,\n domain,\n store,\n // We need passReqToCallback set to false to get params, but there's\n // no matching type signature for that, so instead behold this beauty\n passReqToCallback: false as true,\n },\n (\n accessToken: string,\n refreshToken: string,\n params: any,\n fullProfile: PassportProfile,\n done: PassportOAuthDoneCallback,\n ) => {\n done(\n undefined,\n {\n fullProfile,\n accessToken,\n params,\n },\n {\n refreshToken,\n },\n );\n },\n ),\n );\n return { helper, audience, connection, connectionScope };\n },\n\n async start(\n input,\n { helper, audience, connection, connectionScope: connection_scope },\n ) {\n return helper.start(input, {\n accessType: 'offline',\n prompt: 'consent',\n ...(audience ? { audience } : {}),\n ...(connection ? { connection } : {}),\n ...(connection_scope ? { connection_scope } : {}),\n });\n },\n\n async authenticate(\n input,\n { helper, audience, connection, connectionScope: connection_scope },\n ) {\n return helper.authenticate(input, {\n ...(audience ? { audience } : {}),\n ...(connection ? { connection } : {}),\n ...(connection_scope ? { connection_scope } : {}),\n });\n },\n\n async refresh(input, { helper }) {\n return helper.refresh(input);\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 createOAuthProviderFactory,\n} from '@backstage/plugin-auth-node';\nimport { auth0Authenticator } from './authenticator';\n\n/** @public */\nexport const authModuleAuth0Provider = createBackendModule({\n pluginId: 'auth',\n moduleId: 'auth0-provider',\n register(reg) {\n reg.registerInit({\n deps: {\n providers: authProvidersExtensionPoint,\n },\n async init({ providers }) {\n providers.registerProvider({\n providerId: 'auth0',\n factory: createOAuthProviderFactory({\n authenticator: auth0Authenticator,\n signInResolverFactories: {\n ...commonSignInResolvers,\n },\n }),\n });\n },\n });\n },\n});\n"],"names":["Auth0InternalStrategy","createOAuthAuthenticator","PassportOAuthAuthenticatorHelper","createBackendModule","authProvidersExtensionPoint","createOAuthProviderFactory","commonSignInResolvers"],"mappings":";;;;;;;;;;;;AA8BO,MAAM,sBAAsBA,sCAAsB,CAAA;AAAA,EACvD,WAAA,CACE,SACA,MACA,EAAA;AACA,IAAA,MAAM,eAAkB,GAAA;AAAA,MACtB,GAAG,OAAA;AAAA,MACH,gBAAA,EAAkB,CAAW,QAAA,EAAA,OAAA,CAAQ,MAAM,CAAA,UAAA,CAAA;AAAA,MAC3C,QAAA,EAAU,CAAW,QAAA,EAAA,OAAA,CAAQ,MAAM,CAAA,YAAA,CAAA;AAAA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AA,GAAmB,EAAE,gBAAA,KAAqB,EAAC;AAAA,KAChD,CAAA,CAAA;AAAA,GACH;AAAA,EAEA,MAAM,OAAA,CAAQ,KAAO,EAAA,EAAE,QAAU,EAAA;AAC/B,IAAO,OAAA,MAAA,CAAO,QAAQ,KAAK,CAAA,CAAA;AAAA,GAC7B;AACF,CAAC;;AC1FM,MAAM,0BAA0BC,oCAAoB,CAAA;AAAA,EACzD,QAAU,EAAA,MAAA;AAAA,EACV,QAAU,EAAA,gBAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,SAAW,EAAAC,0CAAA;AAAA,OACb;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,SAAA,EAAa,EAAA;AACxB,QAAA,SAAA,CAAU,gBAAiB,CAAA;AAAA,UACzB,UAAY,EAAA,OAAA;AAAA,UACZ,SAASC,yCAA2B,CAAA;AAAA,YAClC,aAAe,EAAA,kBAAA;AAAA,YACf,uBAAyB,EAAA;AAAA,cACvB,GAAGC,oCAAA;AAAA,aACL;AAAA,WACD,CAAA;AAAA,SACF,CAAA,CAAA;AAAA,OACH;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as _backstage_plugin_auth_node from '@backstage/plugin-auth-node';
|
|
2
|
+
import { PassportOAuthAuthenticatorHelper, PassportProfile } from '@backstage/plugin-auth-node';
|
|
3
|
+
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
4
|
+
|
|
5
|
+
/** @public */
|
|
6
|
+
declare const auth0Authenticator: _backstage_plugin_auth_node.OAuthAuthenticator<{
|
|
7
|
+
helper: PassportOAuthAuthenticatorHelper;
|
|
8
|
+
audience: string | undefined;
|
|
9
|
+
connection: string | undefined;
|
|
10
|
+
connectionScope: string | undefined;
|
|
11
|
+
}, PassportProfile>;
|
|
12
|
+
|
|
13
|
+
/** @public */
|
|
14
|
+
declare const authModuleAuth0Provider: _backstage_backend_plugin_api.BackendFeature;
|
|
15
|
+
|
|
16
|
+
export { auth0Authenticator, authModuleAuth0Provider as default };
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@backstage/plugin-auth-backend-module-auth0-provider",
|
|
3
|
+
"version": "0.0.0-nightly-20240910023018",
|
|
4
|
+
"description": "The auth0-provider backend module for the auth plugin.",
|
|
5
|
+
"backstage": {
|
|
6
|
+
"role": "backend-plugin-module",
|
|
7
|
+
"pluginId": "auth",
|
|
8
|
+
"pluginPackage": "@backstage/plugin-auth-backend"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public",
|
|
12
|
+
"main": "dist/index.cjs.js",
|
|
13
|
+
"types": "dist/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/backstage/backstage",
|
|
18
|
+
"directory": "plugins/auth-backend-module-auth0-provider"
|
|
19
|
+
},
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"main": "dist/index.cjs.js",
|
|
22
|
+
"types": "dist/index.d.ts",
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"config.d.ts"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "backstage-cli package build",
|
|
29
|
+
"clean": "backstage-cli package clean",
|
|
30
|
+
"lint": "backstage-cli package lint",
|
|
31
|
+
"prepack": "backstage-cli package prepack",
|
|
32
|
+
"postpack": "backstage-cli package postpack",
|
|
33
|
+
"start": "backstage-cli package start",
|
|
34
|
+
"test": "backstage-cli package test"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@backstage/backend-plugin-api": "^0.0.0-nightly-20240910023018",
|
|
38
|
+
"@backstage/plugin-auth-node": "^0.0.0-nightly-20240910023018",
|
|
39
|
+
"express": "^4.17.1",
|
|
40
|
+
"passport-auth0": "^1.4.3",
|
|
41
|
+
"passport-oauth2": "^1.6.1"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@backstage/backend-defaults": "^0.0.0-nightly-20240910023018",
|
|
45
|
+
"@backstage/backend-test-utils": "^0.0.0-nightly-20240910023018",
|
|
46
|
+
"@backstage/cli": "^0.0.0-nightly-20240910023018",
|
|
47
|
+
"@backstage/plugin-auth-backend": "^0.0.0-nightly-20240910023018",
|
|
48
|
+
"@types/passport-auth0": "^1.0.5",
|
|
49
|
+
"@types/passport-oauth2": "^1.4.15",
|
|
50
|
+
"supertest": "^6.3.3"
|
|
51
|
+
},
|
|
52
|
+
"configSchema": "config.d.ts"
|
|
53
|
+
}
|