@backstage/plugin-auth-backend 0.14.1-next.0 → 0.14.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 CHANGED
@@ -1,5 +1,42 @@
1
1
  # @backstage/plugin-auth-backend
2
2
 
3
+ ## 0.14.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 5e055079f0: Increased key field size for signing_keys table to account for larger signature keys
8
+ - f6aae90e4e: Added configurable algorithm field for TokenFactory
9
+ - 8f7b1835df: Updated dependency `msw` to `^0.41.0`.
10
+ - bc6fb57094: Updated dependency `passport` to `^0.6.0`.
11
+ - 467facc6ea: Fix improper binding of 'this' in ALB Auth provider
12
+ - Updated dependencies
13
+ - @backstage/backend-common@0.14.0
14
+ - @backstage/plugin-auth-node@0.2.2
15
+ - @backstage/catalog-client@1.0.3
16
+ - @backstage/catalog-model@1.0.3
17
+
18
+ ## 0.14.1-next.2
19
+
20
+ ### Patch Changes
21
+
22
+ - bc6fb57094: Updated dependency `passport` to `^0.6.0`.
23
+ - Updated dependencies
24
+ - @backstage/backend-common@0.14.0-next.2
25
+ - @backstage/plugin-auth-node@0.2.2-next.2
26
+
27
+ ## 0.14.1-next.1
28
+
29
+ ### Patch Changes
30
+
31
+ - 5e055079f0: Increased key field size for signing_keys table to account for larger signature keys
32
+ - 8f7b1835df: Updated dependency `msw` to `^0.41.0`.
33
+ - 467facc6ea: Fix improper binding of 'this' in ALB Auth provider
34
+ - Updated dependencies
35
+ - @backstage/backend-common@0.13.6-next.1
36
+ - @backstage/catalog-client@1.0.3-next.0
37
+ - @backstage/plugin-auth-node@0.2.2-next.1
38
+ - @backstage/catalog-model@1.0.3-next.0
39
+
3
40
  ## 0.14.1-next.0
4
41
 
5
42
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -764,6 +764,19 @@ const ALB_JWT_HEADER = "x-amzn-oidc-data";
764
764
  const ALB_ACCESS_TOKEN_HEADER = "x-amzn-oidc-accesstoken";
765
765
  class AwsAlbAuthProvider {
766
766
  constructor(options) {
767
+ this.getKey = async (header) => {
768
+ if (!header.kid) {
769
+ throw new errors.AuthenticationError("No key id was specified in header");
770
+ }
771
+ const optionalCacheKey = this.keyCache.get(header.kid);
772
+ if (optionalCacheKey) {
773
+ return crypto__namespace.createPublicKey(optionalCacheKey);
774
+ }
775
+ const keyText = await fetch__default["default"](`https://public-keys.auth.elb.${encodeURIComponent(this.region)}.amazonaws.com/${encodeURIComponent(header.kid)}`).then((response) => response.text());
776
+ const keyValue = crypto__namespace.createPublicKey(keyText);
777
+ this.keyCache.set(header.kid, keyValue.export({ format: "pem", type: "spki" }));
778
+ return keyValue;
779
+ };
767
780
  this.region = options.region;
768
781
  this.issuer = options.issuer;
769
782
  this.authHandler = options.authHandler;
@@ -837,19 +850,6 @@ class AwsAlbAuthProvider {
837
850
  profile
838
851
  };
839
852
  }
840
- async getKey(header) {
841
- if (!header.kid) {
842
- throw new errors.AuthenticationError("No key id was specified in header");
843
- }
844
- const optionalCacheKey = this.keyCache.get(header.kid);
845
- if (optionalCacheKey) {
846
- return crypto__namespace.createPublicKey(optionalCacheKey);
847
- }
848
- const keyText = await fetch__default["default"](`https://public-keys.auth.elb.${encodeURIComponent(this.region)}.amazonaws.com/${encodeURIComponent(header.kid)}`).then((response) => response.text());
849
- const keyValue = crypto__namespace.createPublicKey(keyText);
850
- this.keyCache.set(header.kid, keyValue.export({ format: "pem", type: "spki" }));
851
- return keyValue;
852
- }
853
853
  }
854
854
  const awsAlb = createAuthProviderIntegration({
855
855
  create(options) {