@backstage/plugin-auth-backend 0.27.0 → 0.27.1-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 +39 -0
- package/dist/actions/createWhoAmIAction.cjs.js +59 -0
- package/dist/actions/createWhoAmIAction.cjs.js.map +1 -0
- package/dist/actions/index.cjs.js +10 -0
- package/dist/actions/index.cjs.js.map +1 -0
- package/dist/authPlugin.cjs.js +9 -2
- package/dist/authPlugin.cjs.js.map +1 -1
- package/migrations/20200619125845_init.js +1 -1
- package/migrations/20220321100910_timestamptz_again.js +1 -1
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @backstage/plugin-auth-backend
|
|
2
2
|
|
|
3
|
+
## 0.27.1-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1ccad86: Added `who-am-i` action to the auth backend actions registry. Returns the catalog entity and user info for the currently authenticated user.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/plugin-auth-node@0.6.14-next.1
|
|
10
|
+
- @backstage/plugin-catalog-node@2.1.0-next.1
|
|
11
|
+
- @backstage/backend-plugin-api@1.7.1-next.0
|
|
12
|
+
- @backstage/catalog-model@1.7.6
|
|
13
|
+
- @backstage/config@1.3.6
|
|
14
|
+
- @backstage/errors@1.2.7
|
|
15
|
+
- @backstage/types@1.2.2
|
|
16
|
+
|
|
17
|
+
## 0.27.1-next.0
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- 6738cf0: build(deps): bump `minimatch` from 9.0.5 to 10.2.1
|
|
22
|
+
- 619be54: Update migrations to be reversible
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
- @backstage/plugin-catalog-node@2.1.0-next.0
|
|
25
|
+
- @backstage/backend-plugin-api@1.7.1-next.0
|
|
26
|
+
- @backstage/catalog-model@1.7.6
|
|
27
|
+
- @backstage/config@1.3.6
|
|
28
|
+
- @backstage/errors@1.2.7
|
|
29
|
+
- @backstage/types@1.2.2
|
|
30
|
+
- @backstage/plugin-auth-node@0.6.14-next.0
|
|
31
|
+
|
|
3
32
|
## 0.27.0
|
|
4
33
|
|
|
5
34
|
### Minor Changes
|
|
@@ -39,6 +68,16 @@
|
|
|
39
68
|
|
|
40
69
|
### Patch Changes
|
|
41
70
|
|
|
71
|
+
- 7dc3dfe: Removed the `auth.experimentalDynamicClientRegistration.tokenExpiration` config option. DCR tokens now use the default 1 hour expiration.
|
|
72
|
+
|
|
73
|
+
If you need longer-lived access, use refresh tokens via the `offline_access` scope instead. DCR clients should already have the `offline_access` scope available. Enable refresh tokens by setting:
|
|
74
|
+
|
|
75
|
+
```yaml
|
|
76
|
+
auth:
|
|
77
|
+
experimentalRefreshToken:
|
|
78
|
+
enabled: true
|
|
79
|
+
```
|
|
80
|
+
|
|
42
81
|
- 7455dae: Use node prefix on native imports
|
|
43
82
|
- Updated dependencies
|
|
44
83
|
- @backstage/plugin-catalog-node@2.0.0
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var errors = require('@backstage/errors');
|
|
4
|
+
|
|
5
|
+
const createWhoAmIAction = ({
|
|
6
|
+
auth,
|
|
7
|
+
catalog,
|
|
8
|
+
userInfo,
|
|
9
|
+
actionsRegistry
|
|
10
|
+
}) => {
|
|
11
|
+
actionsRegistry.register({
|
|
12
|
+
name: "who-am-i",
|
|
13
|
+
title: "Who Am I",
|
|
14
|
+
attributes: {
|
|
15
|
+
destructive: false,
|
|
16
|
+
readOnly: true,
|
|
17
|
+
idempotent: true
|
|
18
|
+
},
|
|
19
|
+
description: "Returns the catalog entity and user info for the currently authenticated user. This action requires user credentials and cannot be used with service or unauthenticated credentials.",
|
|
20
|
+
schema: {
|
|
21
|
+
input: (z) => z.object({}),
|
|
22
|
+
output: (z) => z.object({
|
|
23
|
+
entity: z.object({}).passthrough().describe("The full catalog entity for the authenticated user"),
|
|
24
|
+
userInfo: z.object({
|
|
25
|
+
userEntityRef: z.string().describe(
|
|
26
|
+
"The entity ref of the user, e.g. user:default/jane.doe"
|
|
27
|
+
),
|
|
28
|
+
ownershipEntityRefs: z.array(z.string()).describe("Entity refs that the user claims ownership through")
|
|
29
|
+
}).describe(
|
|
30
|
+
"User identity information extracted from the authentication token"
|
|
31
|
+
)
|
|
32
|
+
})
|
|
33
|
+
},
|
|
34
|
+
action: async ({ credentials }) => {
|
|
35
|
+
if (!auth.isPrincipal(credentials, "user")) {
|
|
36
|
+
throw new errors.NotAllowedError("This action requires user credentials");
|
|
37
|
+
}
|
|
38
|
+
const { userEntityRef } = credentials.principal;
|
|
39
|
+
const [entity, info] = await Promise.all([
|
|
40
|
+
catalog.getEntityByRef(userEntityRef, { credentials }),
|
|
41
|
+
userInfo.getUserInfo(credentials)
|
|
42
|
+
]);
|
|
43
|
+
if (!entity) {
|
|
44
|
+
throw new errors.NotFoundError(
|
|
45
|
+
`User entity not found in the catalog for "${userEntityRef}"`
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
output: {
|
|
50
|
+
entity,
|
|
51
|
+
userInfo: info
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
exports.createWhoAmIAction = createWhoAmIAction;
|
|
59
|
+
//# sourceMappingURL=createWhoAmIAction.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createWhoAmIAction.cjs.js","sources":["../../src/actions/createWhoAmIAction.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { AuthService, UserInfoService } from '@backstage/backend-plugin-api';\nimport { ActionsRegistryService } from '@backstage/backend-plugin-api/alpha';\nimport { NotAllowedError, NotFoundError } from '@backstage/errors';\nimport { CatalogService } from '@backstage/plugin-catalog-node';\n\nexport const createWhoAmIAction = ({\n auth,\n catalog,\n userInfo,\n actionsRegistry,\n}: {\n auth: AuthService;\n catalog: CatalogService;\n userInfo: UserInfoService;\n actionsRegistry: ActionsRegistryService;\n}) => {\n actionsRegistry.register({\n name: 'who-am-i',\n title: 'Who Am I',\n attributes: {\n destructive: false,\n readOnly: true,\n idempotent: true,\n },\n description:\n 'Returns the catalog entity and user info for the currently authenticated user. This action requires user credentials and cannot be used with service or unauthenticated credentials.',\n schema: {\n input: z => z.object({}),\n output: z =>\n z.object({\n entity: z\n .object({})\n .passthrough()\n .describe('The full catalog entity for the authenticated user'),\n userInfo: z\n .object({\n userEntityRef: z\n .string()\n .describe(\n 'The entity ref of the user, e.g. user:default/jane.doe',\n ),\n ownershipEntityRefs: z\n .array(z.string())\n .describe('Entity refs that the user claims ownership through'),\n })\n .describe(\n 'User identity information extracted from the authentication token',\n ),\n }),\n },\n action: async ({ credentials }) => {\n if (!auth.isPrincipal(credentials, 'user')) {\n throw new NotAllowedError('This action requires user credentials');\n }\n\n const { userEntityRef } = credentials.principal;\n\n const [entity, info] = await Promise.all([\n catalog.getEntityByRef(userEntityRef, { credentials }),\n userInfo.getUserInfo(credentials),\n ]);\n\n if (!entity) {\n throw new NotFoundError(\n `User entity not found in the catalog for \"${userEntityRef}\"`,\n );\n }\n\n return {\n output: {\n entity,\n userInfo: info,\n },\n };\n },\n });\n};\n"],"names":["NotAllowedError","NotFoundError"],"mappings":";;;;AAoBO,MAAM,qBAAqB,CAAC;AAAA,EACjC,IAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;A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CAAS,YAAY,WAAW;AAAA,OACjC,CAAA;AAED,MAAA,IAAI,CAAC,MAAA,EAAQ;AACX,QAAA,MAAM,IAAIC,oBAAA;AAAA,UACR,6CAA6C,aAAa,CAAA,CAAA;AAAA,SAC5D;AAAA,MACF;AAEA,MAAA,OAAO;AAAA,QACL,MAAA,EAAQ;AAAA,UACN,MAAA;AAAA,UACA,QAAA,EAAU;AAAA;AACZ,OACF;AAAA,IACF;AAAA,GACD,CAAA;AACH;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var createWhoAmIAction = require('./createWhoAmIAction.cjs.js');
|
|
4
|
+
|
|
5
|
+
const createAuthActions = (options) => {
|
|
6
|
+
createWhoAmIAction.createWhoAmIAction(options);
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
exports.createAuthActions = createAuthActions;
|
|
10
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../src/actions/index.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { AuthService, UserInfoService } from '@backstage/backend-plugin-api';\nimport { ActionsRegistryService } from '@backstage/backend-plugin-api/alpha';\nimport { CatalogService } from '@backstage/plugin-catalog-node';\nimport { createWhoAmIAction } from './createWhoAmIAction';\n\nexport const createAuthActions = (options: {\n auth: AuthService;\n actionsRegistry: ActionsRegistryService;\n catalog: CatalogService;\n userInfo: UserInfoService;\n}) => {\n createWhoAmIAction(options);\n};\n"],"names":["createWhoAmIAction"],"mappings":";;;;AAoBO,MAAM,iBAAA,GAAoB,CAAC,OAAA,KAK5B;AACJ,EAAAA,qCAAA,CAAmB,OAAO,CAAA;AAC5B;;;;"}
|
package/dist/authPlugin.cjs.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
4
4
|
var pluginAuthNode = require('@backstage/plugin-auth-node');
|
|
5
|
+
var alpha = require('@backstage/backend-plugin-api/alpha');
|
|
5
6
|
var pluginCatalogNode = require('@backstage/plugin-catalog-node');
|
|
7
|
+
var index = require('./actions/index.cjs.js');
|
|
6
8
|
var router = require('./service/router.cjs.js');
|
|
7
9
|
var OfflineAccessService = require('./service/OfflineAccessService.cjs.js');
|
|
8
10
|
|
|
@@ -39,7 +41,9 @@ const authPlugin = backendPluginApi.createBackendPlugin({
|
|
|
39
41
|
auth: backendPluginApi.coreServices.auth,
|
|
40
42
|
httpAuth: backendPluginApi.coreServices.httpAuth,
|
|
41
43
|
lifecycle: backendPluginApi.coreServices.lifecycle,
|
|
42
|
-
catalog: pluginCatalogNode.catalogServiceRef
|
|
44
|
+
catalog: pluginCatalogNode.catalogServiceRef,
|
|
45
|
+
actionsRegistry: alpha.actionsRegistryServiceRef,
|
|
46
|
+
userInfo: backendPluginApi.coreServices.userInfo
|
|
43
47
|
},
|
|
44
48
|
async init({
|
|
45
49
|
httpRouter,
|
|
@@ -50,7 +54,9 @@ const authPlugin = backendPluginApi.createBackendPlugin({
|
|
|
50
54
|
auth,
|
|
51
55
|
httpAuth,
|
|
52
56
|
lifecycle,
|
|
53
|
-
catalog
|
|
57
|
+
catalog,
|
|
58
|
+
actionsRegistry,
|
|
59
|
+
userInfo
|
|
54
60
|
}) {
|
|
55
61
|
const refreshTokensEnabled = config.getOptionalBoolean(
|
|
56
62
|
"auth.experimentalRefreshToken.enabled"
|
|
@@ -78,6 +84,7 @@ const authPlugin = backendPluginApi.createBackendPlugin({
|
|
|
78
84
|
allow: "unauthenticated"
|
|
79
85
|
});
|
|
80
86
|
httpRouter.use(router$1);
|
|
87
|
+
index.createAuthActions({ auth, catalog, userInfo, actionsRegistry });
|
|
81
88
|
}
|
|
82
89
|
});
|
|
83
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authPlugin.cjs.js","sources":["../src/authPlugin.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 */\n\nimport {\n coreServices,\n createBackendPlugin,\n} from '@backstage/backend-plugin-api';\nimport {\n authOwnershipResolutionExtensionPoint,\n AuthOwnershipResolver,\n AuthProviderFactory,\n authProvidersExtensionPoint,\n} from '@backstage/plugin-auth-node';\nimport { catalogServiceRef } from '@backstage/plugin-catalog-node';\nimport { createRouter } from './service/router';\nimport { OfflineAccessService } from './service/OfflineAccessService';\n\n/**\n * Auth plugin\n *\n * @public\n */\nexport const authPlugin = createBackendPlugin({\n pluginId: 'auth',\n register(reg) {\n const providers = new Map<string, AuthProviderFactory>();\n let ownershipResolver: AuthOwnershipResolver | undefined = undefined;\n\n reg.registerExtensionPoint(authProvidersExtensionPoint, {\n registerProvider({ providerId, factory }) {\n if (providers.has(providerId)) {\n throw new Error(\n `Auth provider '${providerId}' was already registered`,\n );\n }\n providers.set(providerId, factory);\n },\n });\n\n reg.registerExtensionPoint(authOwnershipResolutionExtensionPoint, {\n setAuthOwnershipResolver(resolver) {\n if (ownershipResolver) {\n throw new Error('Auth ownership resolver is already set');\n }\n ownershipResolver = resolver;\n },\n });\n\n reg.registerInit({\n deps: {\n httpRouter: coreServices.httpRouter,\n logger: coreServices.logger,\n config: coreServices.rootConfig,\n database: coreServices.database,\n discovery: coreServices.discovery,\n auth: coreServices.auth,\n httpAuth: coreServices.httpAuth,\n lifecycle: coreServices.lifecycle,\n catalog: catalogServiceRef,\n },\n async init({\n httpRouter,\n logger,\n config,\n database,\n discovery,\n auth,\n httpAuth,\n lifecycle,\n catalog,\n }) {\n const refreshTokensEnabled = config.getOptionalBoolean(\n 'auth.experimentalRefreshToken.enabled',\n );\n\n const offlineAccess = refreshTokensEnabled\n ? await OfflineAccessService.create({\n config,\n database,\n logger,\n lifecycle,\n })\n : undefined;\n\n const router = await createRouter({\n logger,\n config,\n database,\n discovery,\n auth,\n catalog,\n providerFactories: Object.fromEntries(providers),\n ownershipResolver,\n httpAuth,\n offlineAccess,\n });\n httpRouter.addAuthPolicy({\n path: '/',\n allow: 'unauthenticated',\n });\n httpRouter.use(router);\n },\n });\n },\n});\n"],"names":["createBackendPlugin","authProvidersExtensionPoint","authOwnershipResolutionExtensionPoint","coreServices","catalogServiceRef","OfflineAccessService","router","createRouter"],"mappings":"
|
|
1
|
+
{"version":3,"file":"authPlugin.cjs.js","sources":["../src/authPlugin.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 */\n\nimport {\n coreServices,\n createBackendPlugin,\n} from '@backstage/backend-plugin-api';\nimport {\n authOwnershipResolutionExtensionPoint,\n AuthOwnershipResolver,\n AuthProviderFactory,\n authProvidersExtensionPoint,\n} from '@backstage/plugin-auth-node';\nimport { actionsRegistryServiceRef } from '@backstage/backend-plugin-api/alpha';\nimport { catalogServiceRef } from '@backstage/plugin-catalog-node';\nimport { createAuthActions } from './actions';\nimport { createRouter } from './service/router';\nimport { OfflineAccessService } from './service/OfflineAccessService';\n\n/**\n * Auth plugin\n *\n * @public\n */\nexport const authPlugin = createBackendPlugin({\n pluginId: 'auth',\n register(reg) {\n const providers = new Map<string, AuthProviderFactory>();\n let ownershipResolver: AuthOwnershipResolver | undefined = undefined;\n\n reg.registerExtensionPoint(authProvidersExtensionPoint, {\n registerProvider({ providerId, factory }) {\n if (providers.has(providerId)) {\n throw new Error(\n `Auth provider '${providerId}' was already registered`,\n );\n }\n providers.set(providerId, factory);\n },\n });\n\n reg.registerExtensionPoint(authOwnershipResolutionExtensionPoint, {\n setAuthOwnershipResolver(resolver) {\n if (ownershipResolver) {\n throw new Error('Auth ownership resolver is already set');\n }\n ownershipResolver = resolver;\n },\n });\n\n reg.registerInit({\n deps: {\n httpRouter: coreServices.httpRouter,\n logger: coreServices.logger,\n config: coreServices.rootConfig,\n database: coreServices.database,\n discovery: coreServices.discovery,\n auth: coreServices.auth,\n httpAuth: coreServices.httpAuth,\n lifecycle: coreServices.lifecycle,\n catalog: catalogServiceRef,\n actionsRegistry: actionsRegistryServiceRef,\n userInfo: coreServices.userInfo,\n },\n async init({\n httpRouter,\n logger,\n config,\n database,\n discovery,\n auth,\n httpAuth,\n lifecycle,\n catalog,\n actionsRegistry,\n userInfo,\n }) {\n const refreshTokensEnabled = config.getOptionalBoolean(\n 'auth.experimentalRefreshToken.enabled',\n );\n\n const offlineAccess = refreshTokensEnabled\n ? await OfflineAccessService.create({\n config,\n database,\n logger,\n lifecycle,\n })\n : undefined;\n\n const router = await createRouter({\n logger,\n config,\n database,\n discovery,\n auth,\n catalog,\n providerFactories: Object.fromEntries(providers),\n ownershipResolver,\n httpAuth,\n offlineAccess,\n });\n httpRouter.addAuthPolicy({\n path: '/',\n allow: 'unauthenticated',\n });\n httpRouter.use(router);\n\n createAuthActions({ auth, catalog, userInfo, actionsRegistry });\n },\n });\n },\n});\n"],"names":["createBackendPlugin","authProvidersExtensionPoint","authOwnershipResolutionExtensionPoint","coreServices","catalogServiceRef","actionsRegistryServiceRef","OfflineAccessService","router","createRouter","createAuthActions"],"mappings":";;;;;;;;;;AAqCO,MAAM,aAAaA,oCAAA,CAAoB;AAAA,EAC5C,QAAA,EAAU,MAAA;AAAA,EACV,SAAS,GAAA,EAAK;AACZ,IAAA,MAAM,SAAA,uBAAgB,GAAA,EAAiC;AACvD,IAAA,IAAI,iBAAA,GAAuD,MAAA;AAE3D,IAAA,GAAA,CAAI,uBAAuBC,0CAAA,EAA6B;AAAA,MACtD,gBAAA,CAAiB,EAAE,UAAA,EAAY,OAAA,EAAQ,EAAG;AACxC,QAAA,IAAI,SAAA,CAAU,GAAA,CAAI,UAAU,CAAA,EAAG;AAC7B,UAAA,MAAM,IAAI,KAAA;AAAA,YACR,kBAAkB,UAAU,CAAA,wBAAA;AAAA,WAC9B;AAAA,QACF;AACA,QAAA,SAAA,CAAU,GAAA,CAAI,YAAY,OAAO,CAAA;AAAA,MACnC;AAAA,KACD,CAAA;AAED,IAAA,GAAA,CAAI,uBAAuBC,oDAAA,EAAuC;AAAA,MAChE,yBAAyB,QAAA,EAAU;AACjC,QAAA,IAAI,iBAAA,EAAmB;AACrB,UAAA,MAAM,IAAI,MAAM,wCAAwC,CAAA;AAAA,QAC1D;AACA,QAAA,iBAAA,GAAoB,QAAA;AAAA,MACtB;AAAA,KACD,CAAA;AAED,IAAA,GAAA,CAAI,YAAA,CAAa;AAAA,MACf,IAAA,EAAM;AAAA,QACJ,YAAYC,6BAAA,CAAa,UAAA;AAAA,QACzB,QAAQA,6BAAA,CAAa,MAAA;AAAA,QACrB,QAAQA,6BAAA,CAAa,UAAA;AAAA,QACrB,UAAUA,6BAAA,CAAa,QAAA;AAAA,QACvB,WAAWA,6BAAA,CAAa,SAAA;AAAA,QACxB,MAAMA,6BAAA,CAAa,IAAA;AAAA,QACnB,UAAUA,6BAAA,CA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|
48
48
|
if (!knex.client.config.client.includes('sqlite3')) {
|
|
49
49
|
await knex.schema.alterTable('signing_keys', table => {
|
|
50
50
|
table
|
|
51
|
-
.timestamp('created_at', { useTz:
|
|
51
|
+
.timestamp('created_at', { useTz: true, precision: 0 })
|
|
52
52
|
.notNullable()
|
|
53
53
|
.defaultTo(knex.fn.now())
|
|
54
54
|
.comment('The creation time of the key')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-auth-backend",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.1-next.1",
|
|
4
4
|
"description": "A Backstage backend plugin that handles authentication",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "backend-plugin",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"test": "backstage-cli package test"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@backstage/backend-plugin-api": "
|
|
51
|
-
"@backstage/catalog-model": "
|
|
52
|
-
"@backstage/config": "
|
|
53
|
-
"@backstage/errors": "
|
|
54
|
-
"@backstage/plugin-auth-node": "
|
|
55
|
-
"@backstage/plugin-catalog-node": "
|
|
56
|
-
"@backstage/types": "
|
|
50
|
+
"@backstage/backend-plugin-api": "1.7.1-next.0",
|
|
51
|
+
"@backstage/catalog-model": "1.7.6",
|
|
52
|
+
"@backstage/config": "1.3.6",
|
|
53
|
+
"@backstage/errors": "1.2.7",
|
|
54
|
+
"@backstage/plugin-auth-node": "0.6.14-next.1",
|
|
55
|
+
"@backstage/plugin-catalog-node": "2.1.0-next.1",
|
|
56
|
+
"@backstage/types": "1.2.2",
|
|
57
57
|
"@google-cloud/firestore": "^7.0.0",
|
|
58
58
|
"connect-session-knex": "^4.0.0",
|
|
59
59
|
"cookie-parser": "^1.4.5",
|
|
@@ -66,18 +66,18 @@
|
|
|
66
66
|
"lodash": "^4.17.21",
|
|
67
67
|
"luxon": "^3.0.0",
|
|
68
68
|
"matcher": "^4.0.0",
|
|
69
|
-
"minimatch": "^
|
|
69
|
+
"minimatch": "^10.2.1",
|
|
70
70
|
"passport": "^0.7.0",
|
|
71
71
|
"uuid": "^11.0.0",
|
|
72
72
|
"zod": "^4.3.5",
|
|
73
73
|
"zod-validation-error": "^5.0.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@backstage/backend-defaults": "
|
|
77
|
-
"@backstage/backend-test-utils": "
|
|
78
|
-
"@backstage/cli": "
|
|
79
|
-
"@backstage/plugin-auth-backend-module-google-provider": "
|
|
80
|
-
"@backstage/plugin-auth-backend-module-guest-provider": "
|
|
76
|
+
"@backstage/backend-defaults": "0.16.0-next.1",
|
|
77
|
+
"@backstage/backend-test-utils": "1.11.1-next.1",
|
|
78
|
+
"@backstage/cli": "0.36.0-next.1",
|
|
79
|
+
"@backstage/plugin-auth-backend-module-google-provider": "0.3.13-next.0",
|
|
80
|
+
"@backstage/plugin-auth-backend-module-guest-provider": "0.2.17-next.0",
|
|
81
81
|
"@types/cookie-parser": "^1.4.2",
|
|
82
82
|
"@types/express": "^4.17.6",
|
|
83
83
|
"@types/express-session": "^1.17.2",
|