@backstage/plugin-auth-backend-module-vmware-cloud-provider 0.3.0 → 0.4.0-next.1
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 +23 -0
- package/dist/authenticator.cjs.js +158 -0
- package/dist/authenticator.cjs.js.map +1 -0
- package/dist/index.cjs.js +4 -214
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -15
- package/dist/module.cjs.js +29 -0
- package/dist/module.cjs.js.map +1 -0
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @backstage/plugin-auth-backend-module-vmware-cloud-provider
|
|
2
2
|
|
|
3
|
+
## 0.4.0-next.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d0edfec: **BREAKING**: The `profileEmailMatchingUserEntityEmail` sign-in resolver has been removed as it was using an insecure fallback for resolving user identities. See https://backstage.io/docs/auth/identity-resolver#sign-in-without-users-in-the-catalog for how to create a custom sign-in resolver if needed as a replacement.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 217458a: Updated configuration schema to include the new `allowedDomains` option for the `emailLocalPartMatchingUserEntityName` sign-in resolver.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @backstage/plugin-auth-node@0.5.3-next.1
|
|
14
|
+
- @backstage/backend-plugin-api@1.0.1-next.1
|
|
15
|
+
- @backstage/catalog-model@1.7.0
|
|
16
|
+
|
|
17
|
+
## 0.3.1-next.0
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
- @backstage/plugin-auth-node@0.5.3-next.0
|
|
23
|
+
- @backstage/backend-plugin-api@1.0.1-next.0
|
|
24
|
+
- @backstage/catalog-model@1.7.0
|
|
25
|
+
|
|
3
26
|
## 0.3.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var pluginAuthNode = require('@backstage/plugin-auth-node');
|
|
4
|
+
var jose = require('jose');
|
|
5
|
+
var passportOauth2 = require('passport-oauth2');
|
|
6
|
+
|
|
7
|
+
const vmwareCloudAuthenticator = pluginAuthNode.createOAuthAuthenticator({
|
|
8
|
+
defaultProfileTransform: async (input) => {
|
|
9
|
+
if (!input.session.idToken) {
|
|
10
|
+
throw new Error(
|
|
11
|
+
`Failed to parse id token and get profile info, missing token from session`
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
const vmwareClaims = ["email", "given_name", "family_name", "context_name"];
|
|
15
|
+
const identity = jose.decodeJwt(input.session.idToken);
|
|
16
|
+
const missingClaims = vmwareClaims.filter((key) => !(key in identity));
|
|
17
|
+
if (missingClaims.length > 0) {
|
|
18
|
+
throw new Error(
|
|
19
|
+
`ID token missing required claims: ${missingClaims.join(", ")}`
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
const typeMismatchClaims = vmwareClaims.filter(
|
|
23
|
+
(key) => typeof identity[key] !== "string"
|
|
24
|
+
);
|
|
25
|
+
if (typeMismatchClaims.length > 0) {
|
|
26
|
+
throw new Error(
|
|
27
|
+
`ID token claims type mismatch: ${typeMismatchClaims.join(", ")}`
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
const { email, given_name, family_name, context_name } = identity;
|
|
31
|
+
if (context_name !== input.fullProfile.organizationId) {
|
|
32
|
+
throw new Error(`ID token organizationId mismatch`);
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
profile: {
|
|
36
|
+
displayName: `${given_name} ${family_name}`,
|
|
37
|
+
email
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
scopes: {
|
|
42
|
+
required: ["openid", "offline_access"]
|
|
43
|
+
},
|
|
44
|
+
initialize({ callbackUrl, config }) {
|
|
45
|
+
const consoleEndpoint = config.getOptionalString("consoleEndpoint") ?? "https://console.cloud.vmware.com";
|
|
46
|
+
const organizationId = config.getString("organizationId");
|
|
47
|
+
const clientId = config.getString("clientId");
|
|
48
|
+
const clientSecret = "";
|
|
49
|
+
const authorizationUrl = `${consoleEndpoint}/csp/gateway/discovery`;
|
|
50
|
+
const tokenUrl = `${consoleEndpoint}/csp/gateway/am/api/auth/token`;
|
|
51
|
+
if (config.has("scope")) {
|
|
52
|
+
throw new Error(
|
|
53
|
+
'The vmware-cloud provider no longer supports the "scope" configuration option. Please use the "additionalScopes" option instead.'
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
const providerStrategy = new passportOauth2.Strategy(
|
|
57
|
+
{
|
|
58
|
+
clientID: clientId,
|
|
59
|
+
clientSecret,
|
|
60
|
+
callbackURL: callbackUrl,
|
|
61
|
+
authorizationURL: authorizationUrl,
|
|
62
|
+
tokenURL: tokenUrl,
|
|
63
|
+
passReqToCallback: false,
|
|
64
|
+
pkce: true,
|
|
65
|
+
state: true,
|
|
66
|
+
customHeaders: {
|
|
67
|
+
Authorization: `Basic ${encodeClientCredentials(
|
|
68
|
+
clientId,
|
|
69
|
+
clientSecret
|
|
70
|
+
)}`
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
(accessToken, refreshToken, params, fullProfile, done) => {
|
|
74
|
+
done(void 0, { fullProfile, params, accessToken }, { refreshToken });
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
const pkceSessionStore = Object.create(
|
|
78
|
+
providerStrategy._stateStore
|
|
79
|
+
);
|
|
80
|
+
providerStrategy._stateStore = {
|
|
81
|
+
verify(req, state, callback) {
|
|
82
|
+
pkceSessionStore.verify(
|
|
83
|
+
req,
|
|
84
|
+
pluginAuthNode.decodeOAuthState(state).handle,
|
|
85
|
+
callback
|
|
86
|
+
);
|
|
87
|
+
},
|
|
88
|
+
store(req, verifier, state, meta, callback) {
|
|
89
|
+
pkceSessionStore.store(
|
|
90
|
+
req,
|
|
91
|
+
verifier,
|
|
92
|
+
state,
|
|
93
|
+
meta,
|
|
94
|
+
(err, handle) => {
|
|
95
|
+
callback(
|
|
96
|
+
err,
|
|
97
|
+
pluginAuthNode.encodeOAuthState({
|
|
98
|
+
handle,
|
|
99
|
+
...state,
|
|
100
|
+
...req.state
|
|
101
|
+
})
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
return {
|
|
108
|
+
organizationId,
|
|
109
|
+
providerStrategy,
|
|
110
|
+
helper: pluginAuthNode.PassportOAuthAuthenticatorHelper.from(providerStrategy)
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
async start(input, ctx) {
|
|
114
|
+
return new Promise((resolve, reject) => {
|
|
115
|
+
const strategy = Object.create(ctx.providerStrategy);
|
|
116
|
+
strategy.redirect = (url, status) => {
|
|
117
|
+
const parsed = new URL(url);
|
|
118
|
+
if (ctx.organizationId) {
|
|
119
|
+
parsed.searchParams.set("orgId", ctx.organizationId);
|
|
120
|
+
}
|
|
121
|
+
resolve({ url: parsed.toString(), status: status ?? void 0 });
|
|
122
|
+
};
|
|
123
|
+
strategy.error = (error) => {
|
|
124
|
+
reject(error);
|
|
125
|
+
};
|
|
126
|
+
strategy.authenticate(input.req, {
|
|
127
|
+
scope: input.scope,
|
|
128
|
+
state: pluginAuthNode.decodeOAuthState(input.state),
|
|
129
|
+
accessType: "offline",
|
|
130
|
+
prompt: "consent"
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
async authenticate(input, ctx) {
|
|
135
|
+
return ctx.helper.authenticate(input).then((result) => ({
|
|
136
|
+
...result,
|
|
137
|
+
fullProfile: {
|
|
138
|
+
...result.fullProfile,
|
|
139
|
+
organizationId: ctx.organizationId
|
|
140
|
+
}
|
|
141
|
+
}));
|
|
142
|
+
},
|
|
143
|
+
async refresh(input, ctx) {
|
|
144
|
+
return ctx.helper.refresh(input).then((result) => ({
|
|
145
|
+
...result,
|
|
146
|
+
fullProfile: {
|
|
147
|
+
...result.fullProfile,
|
|
148
|
+
organizationId: ctx.organizationId
|
|
149
|
+
}
|
|
150
|
+
}));
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
function encodeClientCredentials(clientID, clientSecret) {
|
|
154
|
+
return Buffer.from(`${clientID}:${clientSecret}`).toString("base64");
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
exports.vmwareCloudAuthenticator = vmwareCloudAuthenticator;
|
|
158
|
+
//# sourceMappingURL=authenticator.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticator.cjs.js","sources":["../src/authenticator.ts"],"sourcesContent":["/*\n * Copyright 2023 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 */\nimport {\n createOAuthAuthenticator,\n decodeOAuthState,\n encodeOAuthState,\n OAuthState,\n PassportOAuthAuthenticatorHelper,\n PassportOAuthDoneCallback,\n PassportProfile,\n} from '@backstage/plugin-auth-node';\nimport { decodeJwt } from 'jose';\nimport {\n Metadata,\n StateStoreStoreCallback,\n StateStoreVerifyCallback,\n Strategy as OAuth2Strategy,\n} from 'passport-oauth2';\n\n/** @public */\nexport interface VMwareCloudAuthenticatorContext {\n organizationId?: string;\n providerStrategy: OAuth2Strategy;\n helper: PassportOAuthAuthenticatorHelper;\n}\n\n/** @public */\nexport type VMwarePassportProfile = PassportProfile & {\n organizationId?: string;\n};\n\n/**\n * VMware Cloud Authenticator to be used by `createOAuthProviderFactory`\n *\n * @public\n */\nexport const vmwareCloudAuthenticator = createOAuthAuthenticator<\n VMwareCloudAuthenticatorContext,\n VMwarePassportProfile\n>({\n defaultProfileTransform: async input => {\n if (!input.session.idToken) {\n throw new Error(\n `Failed to parse id token and get profile info, missing token from session`,\n );\n }\n\n const vmwareClaims = ['email', 'given_name', 'family_name', 'context_name'];\n\n const identity = decodeJwt(input.session.idToken);\n const missingClaims = vmwareClaims.filter(key => !(key in identity));\n\n if (missingClaims.length > 0) {\n throw new Error(\n `ID token missing required claims: ${missingClaims.join(', ')}`,\n );\n }\n\n const typeMismatchClaims = vmwareClaims.filter(\n key => typeof identity[key] !== 'string',\n );\n\n if (typeMismatchClaims.length > 0) {\n throw new Error(\n `ID token claims type mismatch: ${typeMismatchClaims.join(', ')}`,\n );\n }\n\n // These claims were checked for presence & type\n const { email, given_name, family_name, context_name } = identity as Record<\n string,\n string\n >;\n\n if (context_name !== input.fullProfile.organizationId) {\n throw new Error(`ID token organizationId mismatch`);\n }\n\n return {\n profile: {\n displayName: `${given_name} ${family_name}`,\n email,\n },\n };\n },\n scopes: {\n required: ['openid', 'offline_access'],\n },\n initialize({ callbackUrl, config }) {\n const consoleEndpoint =\n config.getOptionalString('consoleEndpoint') ??\n 'https://console.cloud.vmware.com';\n const organizationId = config.getString('organizationId');\n\n const clientId = config.getString('clientId');\n const clientSecret = '';\n const authorizationUrl = `${consoleEndpoint}/csp/gateway/discovery`;\n const tokenUrl = `${consoleEndpoint}/csp/gateway/am/api/auth/token`;\n\n if (config.has('scope')) {\n throw new Error(\n 'The vmware-cloud provider no longer supports the \"scope\" configuration option. Please use the \"additionalScopes\" option instead.',\n );\n }\n\n const providerStrategy = new OAuth2Strategy(\n {\n clientID: clientId,\n clientSecret: clientSecret,\n callbackURL: callbackUrl,\n authorizationURL: authorizationUrl,\n tokenURL: tokenUrl,\n passReqToCallback: false,\n pkce: true,\n state: true,\n customHeaders: {\n Authorization: `Basic ${encodeClientCredentials(\n clientId,\n clientSecret,\n )}`,\n },\n },\n (\n accessToken: any,\n refreshToken: any,\n params: any,\n fullProfile: PassportProfile,\n done: PassportOAuthDoneCallback,\n ) => {\n done(undefined, { fullProfile, params, accessToken }, { refreshToken });\n },\n );\n\n // Both VMware & OAuth2Strategy fight over control of the state when PKCE is on, thus this hack\n const pkceSessionStore = Object.create(\n (providerStrategy as any)._stateStore,\n );\n (providerStrategy as any)._stateStore = {\n verify(req: Request, state: string, callback: StateStoreVerifyCallback) {\n pkceSessionStore.verify(\n req,\n (decodeOAuthState(state) as any).handle,\n callback,\n );\n },\n store(\n req: Request & {\n scope: string;\n state: OAuthState;\n },\n verifier: string,\n state: any,\n meta: Metadata,\n callback: StateStoreStoreCallback,\n ) {\n pkceSessionStore.store(\n req,\n verifier,\n state,\n meta,\n (err: Error, handle: string) => {\n callback(\n err,\n encodeOAuthState({\n handle,\n ...state,\n ...req.state,\n } as OAuthState),\n );\n },\n );\n },\n };\n\n return {\n organizationId,\n providerStrategy,\n helper: PassportOAuthAuthenticatorHelper.from(providerStrategy),\n };\n },\n\n async start(input, ctx) {\n return new Promise((resolve, reject) => {\n const strategy: OAuth2Strategy = Object.create(ctx.providerStrategy);\n\n strategy.redirect = (url: string, status?: number) => {\n const parsed = new URL(url);\n if (ctx.organizationId) {\n parsed.searchParams.set('orgId', ctx.organizationId);\n }\n resolve({ url: parsed.toString(), status: status ?? undefined });\n };\n strategy.error = (error: Error) => {\n reject(error);\n };\n strategy.authenticate(input.req, {\n scope: input.scope,\n state: decodeOAuthState(input.state),\n accessType: 'offline',\n prompt: 'consent',\n });\n });\n },\n\n async authenticate(input, ctx) {\n return ctx.helper.authenticate(input).then(result => ({\n ...result,\n fullProfile: {\n ...result.fullProfile,\n organizationId: ctx.organizationId,\n } as VMwarePassportProfile,\n }));\n },\n\n async refresh(input, ctx) {\n return ctx.helper.refresh(input).then(result => ({\n ...result,\n fullProfile: {\n ...result.fullProfile,\n organizationId: ctx.organizationId,\n } as VMwarePassportProfile,\n }));\n },\n});\n\n/** @private */\nfunction encodeClientCredentials(\n clientID: string,\n clientSecret: string,\n): string {\n return Buffer.from(`${clientID}:${clientSecret}`).toString('base64');\n}\n"],"names":["createOAuthAuthenticator","decodeJwt","OAuth2Strategy","decodeOAuthState","encodeOAuthState","PassportOAuthAuthenticatorHelper"],"mappings":";;;;;;AAiDO,MAAM,2BAA2BA,uCAGtC,CAAA;AAAA,EACA,uBAAA,EAAyB,OAAM,KAAS,KAAA;AACtC,IAAI,IAAA,CAAC,KAAM,CAAA,OAAA,CAAQ,OAAS,EAAA;AAC1B,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,CAAA,yEAAA,CAAA;AAAA,OACF,CAAA;AAAA,KACF;AAEA,IAAA,MAAM,YAAe,GAAA,CAAC,OAAS,EAAA,YAAA,EAAc,eAAe,cAAc,CAAA,CAAA;AAE1E,IAAA,MAAM,QAAW,GAAAC,cAAA,CAAU,KAAM,CAAA,OAAA,CAAQ,OAAO,CAAA,CAAA;AAChD,IAAA,MAAM,gBAAgB,YAAa,CAAA,MAAA,CAAO,CAAO,GAAA,KAAA,EAAE,OAAO,QAAS,CAAA,CAAA,CAAA;AAEnE,IAAI,IAAA,aAAA,CAAc,SAAS,CAAG,EAAA;AAC5B,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,CAAqC,kCAAA,EAAA,aAAA,CAAc,IAAK,CAAA,IAAI,CAAC,CAAA,CAAA;AAAA,OAC/D,CAAA;AAAA,KACF;AAEA,IAAA,MAAM,qBAAqB,YAAa,CAAA,MAAA;AAAA,MACtC,CAAO,GAAA,KAAA,OAAO,QAAS,CAAA,GAAG,CAAM,KAAA,QAAA;AAAA,KAClC,CAAA;AAEA,IAAI,IAAA,kBAAA,CAAmB,SAAS,CAAG,EAAA;AACjC,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,CAAkC,+BAAA,EAAA,kBAAA,CAAmB,IAAK,CAAA,IAAI,CAAC,CAAA,CAAA;AAAA,OACjE,CAAA;AAAA,KACF;AAGA,IAAA,MAAM,EAAE,KAAA,EAAO,UAAY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AA,YAAA,CAAa,KAAK,CAAA,CAAE,KAAK,CAAW,MAAA,MAAA;AAAA,MACpD,GAAG,MAAA;AAAA,MACH,WAAa,EAAA;AAAA,QACX,GAAG,MAAO,CAAA,WAAA;AAAA,QACV,gBAAgB,GAAI,CAAA,cAAA;AAAA,OACtB;AAAA,KACA,CAAA,CAAA,CAAA;AAAA,GACJ;AAAA,EAEA,MAAM,OAAQ,CAAA,KAAA,EAAO,GAAK,EAAA;AACxB,IAAA,OAAO,IAAI,MAAO,CAAA,OAAA,CAAQ,KAAK,CAAA,CAAE,KAAK,CAAW,MAAA,MAAA;AAAA,MAC/C,GAAG,MAAA;AAAA,MACH,WAAa,EAAA;AAAA,QACX,GAAG,MAAO,CAAA,WAAA;AAAA,QACV,gBAAgB,GAAI,CAAA,cAAA;AAAA,OACtB;AAAA,KACA,CAAA,CAAA,CAAA;AAAA,GACJ;AACF,CAAC,EAAA;AAGD,SAAS,uBAAA,CACP,UACA,YACQ,EAAA;AACR,EAAO,OAAA,MAAA,CAAO,KAAK,CAAG,EAAA,QAAQ,IAAI,YAAY,CAAA,CAAE,CAAE,CAAA,QAAA,CAAS,QAAQ,CAAA,CAAA;AACrE;;;;"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -2,221 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var passportOauth2 = require('passport-oauth2');
|
|
8
|
-
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
9
|
-
var catalogModel = require('@backstage/catalog-model');
|
|
5
|
+
var authenticator = require('./authenticator.cjs.js');
|
|
6
|
+
var module$1 = require('./module.cjs.js');
|
|
10
7
|
|
|
11
|
-
const vmwareCloudAuthenticator = pluginAuthNode.createOAuthAuthenticator({
|
|
12
|
-
defaultProfileTransform: async (input) => {
|
|
13
|
-
if (!input.session.idToken) {
|
|
14
|
-
throw new Error(
|
|
15
|
-
`Failed to parse id token and get profile info, missing token from session`
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
const vmwareClaims = ["email", "given_name", "family_name", "context_name"];
|
|
19
|
-
const identity = jose.decodeJwt(input.session.idToken);
|
|
20
|
-
const missingClaims = vmwareClaims.filter((key) => !(key in identity));
|
|
21
|
-
if (missingClaims.length > 0) {
|
|
22
|
-
throw new Error(
|
|
23
|
-
`ID token missing required claims: ${missingClaims.join(", ")}`
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
const typeMismatchClaims = vmwareClaims.filter(
|
|
27
|
-
(key) => typeof identity[key] !== "string"
|
|
28
|
-
);
|
|
29
|
-
if (typeMismatchClaims.length > 0) {
|
|
30
|
-
throw new Error(
|
|
31
|
-
`ID token claims type mismatch: ${typeMismatchClaims.join(", ")}`
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
const { email, given_name, family_name, context_name } = identity;
|
|
35
|
-
if (context_name !== input.fullProfile.organizationId) {
|
|
36
|
-
throw new Error(`ID token organizationId mismatch`);
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
profile: {
|
|
40
|
-
displayName: `${given_name} ${family_name}`,
|
|
41
|
-
email
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
},
|
|
45
|
-
scopes: {
|
|
46
|
-
required: ["openid", "offline_access"]
|
|
47
|
-
},
|
|
48
|
-
initialize({ callbackUrl, config }) {
|
|
49
|
-
const consoleEndpoint = config.getOptionalString("consoleEndpoint") ?? "https://console.cloud.vmware.com";
|
|
50
|
-
const organizationId = config.getString("organizationId");
|
|
51
|
-
const clientId = config.getString("clientId");
|
|
52
|
-
const clientSecret = "";
|
|
53
|
-
const authorizationUrl = `${consoleEndpoint}/csp/gateway/discovery`;
|
|
54
|
-
const tokenUrl = `${consoleEndpoint}/csp/gateway/am/api/auth/token`;
|
|
55
|
-
if (config.has("scope")) {
|
|
56
|
-
throw new Error(
|
|
57
|
-
'The vmware-cloud provider no longer supports the "scope" configuration option. Please use the "additionalScopes" option instead.'
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
const providerStrategy = new passportOauth2.Strategy(
|
|
61
|
-
{
|
|
62
|
-
clientID: clientId,
|
|
63
|
-
clientSecret,
|
|
64
|
-
callbackURL: callbackUrl,
|
|
65
|
-
authorizationURL: authorizationUrl,
|
|
66
|
-
tokenURL: tokenUrl,
|
|
67
|
-
passReqToCallback: false,
|
|
68
|
-
pkce: true,
|
|
69
|
-
state: true,
|
|
70
|
-
customHeaders: {
|
|
71
|
-
Authorization: `Basic ${encodeClientCredentials(
|
|
72
|
-
clientId,
|
|
73
|
-
clientSecret
|
|
74
|
-
)}`
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
(accessToken, refreshToken, params, fullProfile, done) => {
|
|
78
|
-
done(void 0, { fullProfile, params, accessToken }, { refreshToken });
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
const pkceSessionStore = Object.create(
|
|
82
|
-
providerStrategy._stateStore
|
|
83
|
-
);
|
|
84
|
-
providerStrategy._stateStore = {
|
|
85
|
-
verify(req, state, callback) {
|
|
86
|
-
pkceSessionStore.verify(
|
|
87
|
-
req,
|
|
88
|
-
pluginAuthNode.decodeOAuthState(state).handle,
|
|
89
|
-
callback
|
|
90
|
-
);
|
|
91
|
-
},
|
|
92
|
-
store(req, verifier, state, meta, callback) {
|
|
93
|
-
pkceSessionStore.store(
|
|
94
|
-
req,
|
|
95
|
-
verifier,
|
|
96
|
-
state,
|
|
97
|
-
meta,
|
|
98
|
-
(err, handle) => {
|
|
99
|
-
callback(
|
|
100
|
-
err,
|
|
101
|
-
pluginAuthNode.encodeOAuthState({
|
|
102
|
-
handle,
|
|
103
|
-
...state,
|
|
104
|
-
...req.state
|
|
105
|
-
})
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
return {
|
|
112
|
-
organizationId,
|
|
113
|
-
providerStrategy,
|
|
114
|
-
helper: pluginAuthNode.PassportOAuthAuthenticatorHelper.from(providerStrategy)
|
|
115
|
-
};
|
|
116
|
-
},
|
|
117
|
-
async start(input, ctx) {
|
|
118
|
-
return new Promise((resolve, reject) => {
|
|
119
|
-
const strategy = Object.create(ctx.providerStrategy);
|
|
120
|
-
strategy.redirect = (url, status) => {
|
|
121
|
-
const parsed = new URL(url);
|
|
122
|
-
if (ctx.organizationId) {
|
|
123
|
-
parsed.searchParams.set("orgId", ctx.organizationId);
|
|
124
|
-
}
|
|
125
|
-
resolve({ url: parsed.toString(), status: status ?? void 0 });
|
|
126
|
-
};
|
|
127
|
-
strategy.error = (error) => {
|
|
128
|
-
reject(error);
|
|
129
|
-
};
|
|
130
|
-
strategy.authenticate(input.req, {
|
|
131
|
-
scope: input.scope,
|
|
132
|
-
state: pluginAuthNode.decodeOAuthState(input.state),
|
|
133
|
-
accessType: "offline",
|
|
134
|
-
prompt: "consent"
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
},
|
|
138
|
-
async authenticate(input, ctx) {
|
|
139
|
-
return ctx.helper.authenticate(input).then((result) => ({
|
|
140
|
-
...result,
|
|
141
|
-
fullProfile: {
|
|
142
|
-
...result.fullProfile,
|
|
143
|
-
organizationId: ctx.organizationId
|
|
144
|
-
}
|
|
145
|
-
}));
|
|
146
|
-
},
|
|
147
|
-
async refresh(input, ctx) {
|
|
148
|
-
return ctx.helper.refresh(input).then((result) => ({
|
|
149
|
-
...result,
|
|
150
|
-
fullProfile: {
|
|
151
|
-
...result.fullProfile,
|
|
152
|
-
organizationId: ctx.organizationId
|
|
153
|
-
}
|
|
154
|
-
}));
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
function encodeClientCredentials(clientID, clientSecret) {
|
|
158
|
-
return Buffer.from(`${clientID}:${clientSecret}`).toString("base64");
|
|
159
|
-
}
|
|
160
8
|
|
|
161
|
-
exports.vmwareCloudSignInResolvers = void 0;
|
|
162
|
-
((vmwareCloudSignInResolvers2) => {
|
|
163
|
-
vmwareCloudSignInResolvers2.profileEmailMatchingUserEntityEmail = pluginAuthNode.createSignInResolverFactory({
|
|
164
|
-
create() {
|
|
165
|
-
return async (info, ctx) => {
|
|
166
|
-
const email = info.profile.email;
|
|
167
|
-
if (!email) {
|
|
168
|
-
throw new Error(
|
|
169
|
-
"VMware login failed, user profile does not contain an email"
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
const userEntityRef = catalogModel.stringifyEntityRef({
|
|
173
|
-
kind: "User",
|
|
174
|
-
name: email
|
|
175
|
-
});
|
|
176
|
-
try {
|
|
177
|
-
return await ctx.signInWithCatalogUser({
|
|
178
|
-
filter: {
|
|
179
|
-
"spec.profile.email": email
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
} catch (e) {
|
|
183
|
-
if (e.name !== "NotFoundError") {
|
|
184
|
-
throw e;
|
|
185
|
-
}
|
|
186
|
-
return ctx.issueToken({
|
|
187
|
-
claims: {
|
|
188
|
-
sub: userEntityRef,
|
|
189
|
-
ent: [userEntityRef]
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
})(exports.vmwareCloudSignInResolvers || (exports.vmwareCloudSignInResolvers = {}));
|
|
197
9
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
moduleId: "vmware-cloud-provider",
|
|
201
|
-
register(reg) {
|
|
202
|
-
reg.registerInit({
|
|
203
|
-
deps: { providers: pluginAuthNode.authProvidersExtensionPoint },
|
|
204
|
-
async init({ providers }) {
|
|
205
|
-
providers.registerProvider({
|
|
206
|
-
providerId: "vmwareCloudServices",
|
|
207
|
-
factory: pluginAuthNode.createOAuthProviderFactory({
|
|
208
|
-
authenticator: vmwareCloudAuthenticator,
|
|
209
|
-
signInResolverFactories: {
|
|
210
|
-
...exports.vmwareCloudSignInResolvers,
|
|
211
|
-
...pluginAuthNode.commonSignInResolvers
|
|
212
|
-
}
|
|
213
|
-
})
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
exports.default = authModuleVmwareCloudProvider;
|
|
221
|
-
exports.vmwareCloudAuthenticator = vmwareCloudAuthenticator;
|
|
10
|
+
exports.vmwareCloudAuthenticator = authenticator.vmwareCloudAuthenticator;
|
|
11
|
+
exports.default = module$1.authModuleVmwareCloudProvider;
|
|
222
12
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/authenticator.ts","../src/resolvers.ts","../src/module.ts"],"sourcesContent":["/*\n * Copyright 2023 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 */\nimport {\n createOAuthAuthenticator,\n decodeOAuthState,\n encodeOAuthState,\n OAuthState,\n PassportOAuthAuthenticatorHelper,\n PassportOAuthDoneCallback,\n PassportProfile,\n} from '@backstage/plugin-auth-node';\nimport { decodeJwt } from 'jose';\nimport {\n Metadata,\n StateStoreStoreCallback,\n StateStoreVerifyCallback,\n Strategy as OAuth2Strategy,\n} from 'passport-oauth2';\n\n/** @public */\nexport interface VMwareCloudAuthenticatorContext {\n organizationId?: string;\n providerStrategy: OAuth2Strategy;\n helper: PassportOAuthAuthenticatorHelper;\n}\n\n/** @public */\nexport type VMwarePassportProfile = PassportProfile & {\n organizationId?: string;\n};\n\n/**\n * VMware Cloud Authenticator to be used by `createOAuthProviderFactory`\n *\n * @public\n */\nexport const vmwareCloudAuthenticator = createOAuthAuthenticator<\n VMwareCloudAuthenticatorContext,\n VMwarePassportProfile\n>({\n defaultProfileTransform: async input => {\n if (!input.session.idToken) {\n throw new Error(\n `Failed to parse id token and get profile info, missing token from session`,\n );\n }\n\n const vmwareClaims = ['email', 'given_name', 'family_name', 'context_name'];\n\n const identity = decodeJwt(input.session.idToken);\n const missingClaims = vmwareClaims.filter(key => !(key in identity));\n\n if (missingClaims.length > 0) {\n throw new Error(\n `ID token missing required claims: ${missingClaims.join(', ')}`,\n );\n }\n\n const typeMismatchClaims = vmwareClaims.filter(\n key => typeof identity[key] !== 'string',\n );\n\n if (typeMismatchClaims.length > 0) {\n throw new Error(\n `ID token claims type mismatch: ${typeMismatchClaims.join(', ')}`,\n );\n }\n\n // These claims were checked for presence & type\n const { email, given_name, family_name, context_name } = identity as Record<\n string,\n string\n >;\n\n if (context_name !== input.fullProfile.organizationId) {\n throw new Error(`ID token organizationId mismatch`);\n }\n\n return {\n profile: {\n displayName: `${given_name} ${family_name}`,\n email,\n },\n };\n },\n scopes: {\n required: ['openid', 'offline_access'],\n },\n initialize({ callbackUrl, config }) {\n const consoleEndpoint =\n config.getOptionalString('consoleEndpoint') ??\n 'https://console.cloud.vmware.com';\n const organizationId = config.getString('organizationId');\n\n const clientId = config.getString('clientId');\n const clientSecret = '';\n const authorizationUrl = `${consoleEndpoint}/csp/gateway/discovery`;\n const tokenUrl = `${consoleEndpoint}/csp/gateway/am/api/auth/token`;\n\n if (config.has('scope')) {\n throw new Error(\n 'The vmware-cloud provider no longer supports the \"scope\" configuration option. Please use the \"additionalScopes\" option instead.',\n );\n }\n\n const providerStrategy = new OAuth2Strategy(\n {\n clientID: clientId,\n clientSecret: clientSecret,\n callbackURL: callbackUrl,\n authorizationURL: authorizationUrl,\n tokenURL: tokenUrl,\n passReqToCallback: false,\n pkce: true,\n state: true,\n customHeaders: {\n Authorization: `Basic ${encodeClientCredentials(\n clientId,\n clientSecret,\n )}`,\n },\n },\n (\n accessToken: any,\n refreshToken: any,\n params: any,\n fullProfile: PassportProfile,\n done: PassportOAuthDoneCallback,\n ) => {\n done(undefined, { fullProfile, params, accessToken }, { refreshToken });\n },\n );\n\n // Both VMware & OAuth2Strategy fight over control of the state when PKCE is on, thus this hack\n const pkceSessionStore = Object.create(\n (providerStrategy as any)._stateStore,\n );\n (providerStrategy as any)._stateStore = {\n verify(req: Request, state: string, callback: StateStoreVerifyCallback) {\n pkceSessionStore.verify(\n req,\n (decodeOAuthState(state) as any).handle,\n callback,\n );\n },\n store(\n req: Request & {\n scope: string;\n state: OAuthState;\n },\n verifier: string,\n state: any,\n meta: Metadata,\n callback: StateStoreStoreCallback,\n ) {\n pkceSessionStore.store(\n req,\n verifier,\n state,\n meta,\n (err: Error, handle: string) => {\n callback(\n err,\n encodeOAuthState({\n handle,\n ...state,\n ...req.state,\n } as OAuthState),\n );\n },\n );\n },\n };\n\n return {\n organizationId,\n providerStrategy,\n helper: PassportOAuthAuthenticatorHelper.from(providerStrategy),\n };\n },\n\n async start(input, ctx) {\n return new Promise((resolve, reject) => {\n const strategy: OAuth2Strategy = Object.create(ctx.providerStrategy);\n\n strategy.redirect = (url: string, status?: number) => {\n const parsed = new URL(url);\n if (ctx.organizationId) {\n parsed.searchParams.set('orgId', ctx.organizationId);\n }\n resolve({ url: parsed.toString(), status: status ?? undefined });\n };\n strategy.error = (error: Error) => {\n reject(error);\n };\n strategy.authenticate(input.req, {\n scope: input.scope,\n state: decodeOAuthState(input.state),\n accessType: 'offline',\n prompt: 'consent',\n });\n });\n },\n\n async authenticate(input, ctx) {\n return ctx.helper.authenticate(input).then(result => ({\n ...result,\n fullProfile: {\n ...result.fullProfile,\n organizationId: ctx.organizationId,\n } as VMwarePassportProfile,\n }));\n },\n\n async refresh(input, ctx) {\n return ctx.helper.refresh(input).then(result => ({\n ...result,\n fullProfile: {\n ...result.fullProfile,\n organizationId: ctx.organizationId,\n } as VMwarePassportProfile,\n }));\n },\n});\n\n/** @private */\nfunction encodeClientCredentials(\n clientID: string,\n clientSecret: string,\n): string {\n return Buffer.from(`${clientID}:${clientSecret}`).toString('base64');\n}\n","/*\n * Copyright 2023 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 */\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport {\n createSignInResolverFactory,\n OAuthAuthenticatorResult,\n PassportProfile,\n SignInInfo,\n} from '@backstage/plugin-auth-node';\n\n/**\n * Available sign-in resolvers for the VMware Cloud auth provider.\n *\n * @public\n */\nexport namespace vmwareCloudSignInResolvers {\n /**\n * Looks up the user by matching their profile email to the entity's profile email.\n * If that fails, sign in the user without associating with a catalog user.\n */\n export const profileEmailMatchingUserEntityEmail =\n createSignInResolverFactory({\n create() {\n return async (\n info: SignInInfo<OAuthAuthenticatorResult<PassportProfile>>,\n ctx,\n ) => {\n const email = info.profile.email;\n\n if (!email) {\n throw new Error(\n 'VMware login failed, user profile does not contain an email',\n );\n }\n\n const userEntityRef = stringifyEntityRef({\n kind: 'User',\n name: email,\n });\n\n try {\n // we await here so that signInWithCatalogUser throws in the current `try`\n return await ctx.signInWithCatalogUser({\n filter: {\n 'spec.profile.email': email,\n },\n });\n } catch (e) {\n if (e.name !== 'NotFoundError') {\n throw e;\n }\n return ctx.issueToken({\n claims: {\n sub: userEntityRef,\n ent: [userEntityRef],\n },\n });\n }\n };\n },\n });\n}\n","/*\n * Copyright 2023 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 */\nimport { createBackendModule } from '@backstage/backend-plugin-api';\nimport {\n authProvidersExtensionPoint,\n commonSignInResolvers,\n createOAuthProviderFactory,\n} from '@backstage/plugin-auth-node';\n\nimport { vmwareCloudAuthenticator } from './authenticator';\nimport { vmwareCloudSignInResolvers } from './resolvers';\n\n/**\n * VMware Cloud Provider backend module for the auth plugin\n *\n * @public\n */\nexport const authModuleVmwareCloudProvider = createBackendModule({\n pluginId: 'auth',\n moduleId: 'vmware-cloud-provider',\n register(reg) {\n reg.registerInit({\n deps: { providers: authProvidersExtensionPoint },\n async init({ providers }) {\n providers.registerProvider({\n providerId: 'vmwareCloudServices',\n factory: createOAuthProviderFactory({\n authenticator: vmwareCloudAuthenticator,\n signInResolverFactories: {\n ...vmwareCloudSignInResolvers,\n ...commonSignInResolvers,\n },\n }),\n });\n },\n });\n },\n});\n"],"names":["createOAuthAuthenticator","decodeJwt","OAuth2Strategy","decodeOAuthState","encodeOAuthState","PassportOAuthAuthenticatorHelper","vmwareCloudSignInResolvers","createSignInResolverFactory","stringifyEntityRef","createBackendModule","authProvidersExtensionPoint","createOAuthProviderFactory","commonSignInResolvers"],"mappings":";;;;;;;;;;AAiDO,MAAM,2BAA2BA,uCAGtC,CAAA;AAAA,EACA,uBAAA,EAAyB,OAAM,KAAS,KAAA;AACtC,IAAI,IAAA,CAAC,KAAM,CAAA,OAAA,CAAQ,OAAS,EAAA;AAC1B,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,CAAA,yEAAA,CAAA;AAAA,OACF,CAAA;AAAA,KACF;AAEA,IAAA,MAAM,YAAe,GAAA,CAAC,OAAS,EAAA,YAAA,EAAc,eAAe,cAAc,CAAA,CAAA;AAE1E,IAAA,MAAM,QAAW,GAAAC,cAAA,CAAU,KAAM,CAAA,OAAA,CAAQ,OAAO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A;AAAA,EAC/D,QAAU,EAAA,MAAA;AAAA,EACV,QAAU,EAAA,uBAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAA,EAAM,EAAE,SAAA,EAAWC,0CAA4B,EAAA;AAAA,MAC/C,MAAM,IAAA,CAAK,EAAE,SAAA,EAAa,EAAA;AACxB,QAAA,SAAA,CAAU,gBAAiB,CAAA;AAAA,UACzB,UAAY,EAAA,qBAAA;AAAA,UACZ,SAASC,yCAA2B,CAAA;AAAA,YAClC,aAAe,EAAA,wBAAA;AAAA,YACf,uBAAyB,EAAA;AAAA,cACvB,GAAGL,kCAAA;AAAA,cACH,GAAGM,oCAAA;AAAA,aACL;AAAA,WACD,CAAA;AAAA,SACF,CAAA,CAAA;AAAA,OACH;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _backstage_plugin_auth_node from '@backstage/plugin-auth-node';
|
|
2
|
-
import { PassportOAuthAuthenticatorHelper, PassportProfile
|
|
2
|
+
import { PassportOAuthAuthenticatorHelper, PassportProfile } from '@backstage/plugin-auth-node';
|
|
3
3
|
import { Strategy } from 'passport-oauth2';
|
|
4
4
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
5
5
|
|
|
@@ -27,17 +27,4 @@ declare const vmwareCloudAuthenticator: _backstage_plugin_auth_node.OAuthAuthent
|
|
|
27
27
|
*/
|
|
28
28
|
declare const authModuleVmwareCloudProvider: _backstage_backend_plugin_api.BackendFeature;
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
* Available sign-in resolvers for the VMware Cloud auth provider.
|
|
32
|
-
*
|
|
33
|
-
* @public
|
|
34
|
-
*/
|
|
35
|
-
declare namespace vmwareCloudSignInResolvers {
|
|
36
|
-
/**
|
|
37
|
-
* Looks up the user by matching their profile email to the entity's profile email.
|
|
38
|
-
* If that fails, sign in the user without associating with a catalog user.
|
|
39
|
-
*/
|
|
40
|
-
const profileEmailMatchingUserEntityEmail: _backstage_plugin_auth_node.SignInResolverFactory<OAuthAuthenticatorResult<PassportProfile>, unknown>;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { type VMwareCloudAuthenticatorContext, type VMwarePassportProfile, authModuleVmwareCloudProvider as default, vmwareCloudAuthenticator, vmwareCloudSignInResolvers };
|
|
30
|
+
export { type VMwareCloudAuthenticatorContext, type VMwarePassportProfile, authModuleVmwareCloudProvider as default, vmwareCloudAuthenticator };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
4
|
+
var pluginAuthNode = require('@backstage/plugin-auth-node');
|
|
5
|
+
var authenticator = require('./authenticator.cjs.js');
|
|
6
|
+
|
|
7
|
+
const authModuleVmwareCloudProvider = backendPluginApi.createBackendModule({
|
|
8
|
+
pluginId: "auth",
|
|
9
|
+
moduleId: "vmware-cloud-provider",
|
|
10
|
+
register(reg) {
|
|
11
|
+
reg.registerInit({
|
|
12
|
+
deps: { providers: pluginAuthNode.authProvidersExtensionPoint },
|
|
13
|
+
async init({ providers }) {
|
|
14
|
+
providers.registerProvider({
|
|
15
|
+
providerId: "vmwareCloudServices",
|
|
16
|
+
factory: pluginAuthNode.createOAuthProviderFactory({
|
|
17
|
+
authenticator: authenticator.vmwareCloudAuthenticator,
|
|
18
|
+
signInResolverFactories: {
|
|
19
|
+
...pluginAuthNode.commonSignInResolvers
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
exports.authModuleVmwareCloudProvider = authModuleVmwareCloudProvider;
|
|
29
|
+
//# sourceMappingURL=module.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.cjs.js","sources":["../src/module.ts"],"sourcesContent":["/*\n * Copyright 2023 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 */\nimport { createBackendModule } from '@backstage/backend-plugin-api';\nimport {\n authProvidersExtensionPoint,\n commonSignInResolvers,\n createOAuthProviderFactory,\n} from '@backstage/plugin-auth-node';\n\nimport { vmwareCloudAuthenticator } from './authenticator';\n\n/**\n * VMware Cloud Provider backend module for the auth plugin\n *\n * @public\n */\nexport const authModuleVmwareCloudProvider = createBackendModule({\n pluginId: 'auth',\n moduleId: 'vmware-cloud-provider',\n register(reg) {\n reg.registerInit({\n deps: { providers: authProvidersExtensionPoint },\n async init({ providers }) {\n providers.registerProvider({\n providerId: 'vmwareCloudServices',\n factory: createOAuthProviderFactory({\n authenticator: vmwareCloudAuthenticator,\n signInResolverFactories: {\n ...commonSignInResolvers,\n },\n }),\n });\n },\n });\n },\n});\n"],"names":["createBackendModule","authProvidersExtensionPoint","createOAuthProviderFactory","vmwareCloudAuthenticator","commonSignInResolvers"],"mappings":";;;;;;AA6BO,MAAM,gCAAgCA,oCAAoB,CAAA;AAAA,EAC/D,QAAU,EAAA,MAAA;AAAA,EACV,QAAU,EAAA,uBAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAA,EAAM,EAAE,SAAA,EAAWC,0CAA4B,EAAA;AAAA,MAC/C,MAAM,IAAA,CAAK,EAAE,SAAA,EAAa,EAAA;AACxB,QAAA,SAAA,CAAU,gBAAiB,CAAA;AAAA,UACzB,UAAY,EAAA,qBAAA;AAAA,UACZ,SAASC,yCAA2B,CAAA;AAAA,YAClC,aAAe,EAAAC,sCAAA;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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-auth-backend-module-vmware-cloud-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-next.1",
|
|
4
4
|
"description": "The vmware-cloud-provider backend module for the auth plugin.",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "backend-plugin-module",
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
"test": "backstage-cli package test"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@backstage/backend-plugin-api": "
|
|
37
|
-
"@backstage/catalog-model": "
|
|
38
|
-
"@backstage/plugin-auth-node": "
|
|
36
|
+
"@backstage/backend-plugin-api": "1.0.1-next.1",
|
|
37
|
+
"@backstage/catalog-model": "1.7.0",
|
|
38
|
+
"@backstage/plugin-auth-node": "0.5.3-next.1",
|
|
39
39
|
"@types/passport-oauth2": "^1.4.15",
|
|
40
40
|
"jose": "^5.0.0",
|
|
41
41
|
"passport-oauth2": "^1.6.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@backstage/backend-defaults": "
|
|
45
|
-
"@backstage/backend-test-utils": "
|
|
46
|
-
"@backstage/cli": "
|
|
47
|
-
"@backstage/config": "
|
|
48
|
-
"@backstage/errors": "
|
|
49
|
-
"@backstage/plugin-auth-backend": "
|
|
44
|
+
"@backstage/backend-defaults": "0.5.1-next.2",
|
|
45
|
+
"@backstage/backend-test-utils": "1.0.1-next.2",
|
|
46
|
+
"@backstage/cli": "0.28.0-next.2",
|
|
47
|
+
"@backstage/config": "1.2.0",
|
|
48
|
+
"@backstage/errors": "1.2.4",
|
|
49
|
+
"@backstage/plugin-auth-backend": "0.23.1-next.1",
|
|
50
50
|
"msw": "^2.0.8",
|
|
51
51
|
"supertest": "^7.0.0"
|
|
52
52
|
}
|