@backstage/plugin-auth-backend 0.11.0 → 0.12.0
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 +16 -0
- package/dist/index.cjs.js +5 -0
- package/dist/index.cjs.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @backstage/plugin-auth-backend
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0c8ba31d72: **BREAKING**: The `TokenFactory.issueToken` used by custom sign-in resolvers now ensures that the sub claim given is a full entity reference of the format `<kind>:<namespace>/<name>`. Any existing custom sign-in resolver functions that do not supply a full entity reference must be updated.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 899f196af5: Use `getEntityByRef` instead of `getEntityByName` in the catalog client
|
|
12
|
+
- 36aa63022b: Use `CompoundEntityRef` instead of `EntityName`, and `getCompoundEntityRef` instead of `getEntityName`, from `@backstage/catalog-model`.
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @backstage/catalog-model@0.12.0
|
|
15
|
+
- @backstage/catalog-client@0.8.0
|
|
16
|
+
- @backstage/backend-common@0.12.0
|
|
17
|
+
- @backstage/plugin-auth-node@0.1.4
|
|
18
|
+
|
|
3
19
|
## 0.11.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -2786,6 +2786,11 @@ class TokenFactory {
|
|
|
2786
2786
|
const aud = "backstage";
|
|
2787
2787
|
const iat = Math.floor(Date.now() / MS_IN_S);
|
|
2788
2788
|
const exp = iat + this.keyDurationSeconds;
|
|
2789
|
+
try {
|
|
2790
|
+
catalogModel.parseEntityRef(sub);
|
|
2791
|
+
} catch (error) {
|
|
2792
|
+
throw new Error('"sub" claim provided by the auth resolver is not a valid EntityRef.');
|
|
2793
|
+
}
|
|
2789
2794
|
this.logger.info(`Issuing token for ${sub}, with entities ${ent != null ? ent : []}`);
|
|
2790
2795
|
return jose.JWS.sign({ iss, sub, aud, iat, exp, ent }, key, {
|
|
2791
2796
|
alg: key.alg,
|