diff --git a/packages/aws/package-lock.json b/packages/aws/package-lock.json index d0133bfe2..15e64b3c3 100644 --- a/packages/aws/package-lock.json +++ b/packages/aws/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@pristine-ts/aws", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "@aws-sdk/client-cloudformation": "^3.441.0", @@ -30,16 +30,16 @@ }, "../common": { "name": "@pristine-ts/common", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "reflect-metadata": "^0.1.13", - "tsyringe": "^4.4.0" + "tsyringe": "^4.8.0" } }, "../core": { "name": "@pristine-ts/core", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "@pristine-ts/common": "file:../common", @@ -47,25 +47,25 @@ "@pristine-ts/logging": "file:../logging", "@pristine-ts/security": "file:../security", "@pristine-ts/telemetry": "file:../telemetry", - "uuid": "^8.3.2" + "uuid": "^9.0.1" }, "devDependencies": { - "@types/uuid": "^8.3.4" + "@types/uuid": "^9.0.6" } }, "../logging": { "name": "@pristine-ts/logging", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "@pristine-ts/common": "file:../common", "@pristine-ts/configuration": "file:../configuration", - "date-fns": "^2.22.1" + "date-fns": "^2.30.0" } }, "../networking": { "name": "@pristine-ts/networking", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "@pristine-ts/common": "file:../common", @@ -77,14 +77,14 @@ }, "../security": { "name": "@pristine-ts/security", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "@pristine-ts/common": "file:../common", "@pristine-ts/logging": "file:../logging" }, "devDependencies": { - "@types/jsonwebtoken": "^8.5.0" + "@types/jsonwebtoken": "^8.5.1" } }, "node_modules/@aws-crypto/crc32": { @@ -3157,7 +3157,7 @@ "version": "file:../common", "requires": { "reflect-metadata": "^0.1.13", - "tsyringe": "^4.4.0" + "tsyringe": "^4.8.0" } }, "@pristine-ts/core": { @@ -3168,8 +3168,8 @@ "@pristine-ts/logging": "file:../logging", "@pristine-ts/security": "file:../security", "@pristine-ts/telemetry": "file:../telemetry", - "@types/uuid": "^8.3.4", - "uuid": "^8.3.2" + "@types/uuid": "^9.0.6", + "uuid": "^9.0.1" } }, "@pristine-ts/logging": { @@ -3177,7 +3177,7 @@ "requires": { "@pristine-ts/common": "file:../common", "@pristine-ts/configuration": "file:../configuration", - "date-fns": "^2.22.1" + "date-fns": "^2.30.0" } }, "@pristine-ts/networking": { @@ -3195,7 +3195,7 @@ "requires": { "@pristine-ts/common": "file:../common", "@pristine-ts/logging": "file:../logging", - "@types/jsonwebtoken": "^8.5.0" + "@types/jsonwebtoken": "^8.5.1" } }, "@smithy/abort-controller": { diff --git a/packages/common/package-lock.json b/packages/common/package-lock.json index fcf0c5ee0..ac00be63e 100644 --- a/packages/common/package-lock.json +++ b/packages/common/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@pristine-ts/common", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "reflect-metadata": "^0.1.13", diff --git a/packages/opensearch/package-lock.json b/packages/opensearch/package-lock.json index b5d0ec8b2..6c67903ed 100644 --- a/packages/opensearch/package-lock.json +++ b/packages/opensearch/package-lock.json @@ -6,28 +6,32 @@ "packages": { "": { "name": "@pristine-ts/opensearch", - "version": "0.0.219", + "version": "0.0.261", "license": "ISC", "dependencies": { - "@opensearch-project/opensearch": "^2.1.0", + "@opensearch-project/opensearch": "^2.4.0", "@pristine-ts/aws": "file:../aws", "@pristine-ts/common": "file:../common", "@pristine-ts/core": "file:../core" } }, "../aws": { - "version": "0.0.219", + "name": "@pristine-ts/aws", + "version": "0.0.261", "license": "ISC", "dependencies": { - "@aws-sdk/client-dynamodb": "^3.211.0", - "@aws-sdk/client-eventbridge": "^3.211.0", - "@aws-sdk/client-s3": "^3.211.0", - "@aws-sdk/client-sqs": "^3.211.0", - "@aws-sdk/client-ssm": "^3.211.0", - "@aws-sdk/s3-request-presigner": "^3.211.0", - "@awslabs-community-fork/dynamodb-data-mapper": "^0.7.9", - "@awslabs-community-fork/dynamodb-data-marshaller": "^0.7.9", - "@awslabs-community-fork/dynamodb-expressions": "^0.7.9", + "@aws-sdk/client-cloudformation": "^3.441.0", + "@aws-sdk/client-cloudfront": "^3.441.0", + "@aws-sdk/client-dynamodb": "^3.441.0", + "@aws-sdk/client-eventbridge": "^3.441.0", + "@aws-sdk/client-s3": "^3.441.0", + "@aws-sdk/client-ses": "^3.441.0", + "@aws-sdk/client-sqs": "^3.441.0", + "@aws-sdk/client-ssm": "^3.441.0", + "@aws-sdk/s3-request-presigner": "^3.441.0", + "@awslabs-community-fork/dynamodb-data-mapper": "^0.7.13", + "@awslabs-community-fork/dynamodb-data-marshaller": "^0.7.13", + "@awslabs-community-fork/dynamodb-expressions": "^0.7.13", "@pristine-ts/common": "file:../common", "@pristine-ts/core": "file:../core", "@pristine-ts/logging": "file:../logging", @@ -36,15 +40,17 @@ } }, "../common": { - "version": "0.0.219", + "name": "@pristine-ts/common", + "version": "0.0.261", "license": "ISC", "dependencies": { "reflect-metadata": "^0.1.13", - "tsyringe": "^4.4.0" + "tsyringe": "^4.8.0" } }, "../core": { - "version": "0.0.219", + "name": "@pristine-ts/core", + "version": "0.0.261", "license": "ISC", "dependencies": { "@pristine-ts/common": "file:../common", @@ -52,20 +58,20 @@ "@pristine-ts/logging": "file:../logging", "@pristine-ts/security": "file:../security", "@pristine-ts/telemetry": "file:../telemetry", - "uuid": "^8.3.2" + "uuid": "^9.0.1" }, "devDependencies": { - "@types/uuid": "^8.3.4" + "@types/uuid": "^9.0.6" } }, "node_modules/@opensearch-project/opensearch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@opensearch-project/opensearch/-/opensearch-2.1.0.tgz", - "integrity": "sha512-iM2u63j2IlUOuMSbcw1TZFpRqjK6qMwVhb3jLLa/x4aATxdKOiO1i17mgzfkeepqj85efNzXBZzN+jkq1/EXhQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@opensearch-project/opensearch/-/opensearch-2.4.0.tgz", + "integrity": "sha512-r0ZNIlDxAua1ZecOBJ8qOXshf2ZQhNKmfly7o0aNuACf0pDa6Et/8mWMZuaFOu7xlNEeRNB7IjDQUYFy2SPElw==", "dependencies": { "aws4": "^1.11.0", "debug": "^4.3.1", - "hpagent": "^0.1.1", + "hpagent": "^1.2.0", "ms": "^2.1.3", "secure-json-parse": "^2.4.0" }, @@ -113,9 +119,12 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/hpagent": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/hpagent/-/hpagent-0.1.2.tgz", - "integrity": "sha512-ePqFXHtSQWAFXYmj+JtOTHr84iNrII4/QRlAAPPE+zqnKy4xJo7Ie1Y4kC7AdB+LxLxSTTzBMASsEcy0q8YyvQ==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hpagent/-/hpagent-1.2.0.tgz", + "integrity": "sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA==", + "engines": { + "node": ">=14" + } }, "node_modules/ms": { "version": "2.1.3", @@ -130,13 +139,13 @@ }, "dependencies": { "@opensearch-project/opensearch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@opensearch-project/opensearch/-/opensearch-2.1.0.tgz", - "integrity": "sha512-iM2u63j2IlUOuMSbcw1TZFpRqjK6qMwVhb3jLLa/x4aATxdKOiO1i17mgzfkeepqj85efNzXBZzN+jkq1/EXhQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@opensearch-project/opensearch/-/opensearch-2.4.0.tgz", + "integrity": "sha512-r0ZNIlDxAua1ZecOBJ8qOXshf2ZQhNKmfly7o0aNuACf0pDa6Et/8mWMZuaFOu7xlNEeRNB7IjDQUYFy2SPElw==", "requires": { "aws4": "^1.11.0", "debug": "^4.3.1", - "hpagent": "^0.1.1", + "hpagent": "^1.2.0", "ms": "^2.1.3", "secure-json-parse": "^2.4.0" } @@ -144,15 +153,18 @@ "@pristine-ts/aws": { "version": "file:../aws", "requires": { - "@aws-sdk/client-dynamodb": "^3.211.0", - "@aws-sdk/client-eventbridge": "^3.211.0", - "@aws-sdk/client-s3": "^3.211.0", - "@aws-sdk/client-sqs": "^3.211.0", - "@aws-sdk/client-ssm": "^3.211.0", - "@aws-sdk/s3-request-presigner": "^3.211.0", - "@awslabs-community-fork/dynamodb-data-mapper": "^0.7.9", - "@awslabs-community-fork/dynamodb-data-marshaller": "^0.7.9", - "@awslabs-community-fork/dynamodb-expressions": "^0.7.9", + "@aws-sdk/client-cloudformation": "^3.441.0", + "@aws-sdk/client-cloudfront": "^3.441.0", + "@aws-sdk/client-dynamodb": "^3.441.0", + "@aws-sdk/client-eventbridge": "^3.441.0", + "@aws-sdk/client-s3": "^3.441.0", + "@aws-sdk/client-ses": "^3.441.0", + "@aws-sdk/client-sqs": "^3.441.0", + "@aws-sdk/client-ssm": "^3.441.0", + "@aws-sdk/s3-request-presigner": "^3.441.0", + "@awslabs-community-fork/dynamodb-data-mapper": "^0.7.13", + "@awslabs-community-fork/dynamodb-data-marshaller": "^0.7.13", + "@awslabs-community-fork/dynamodb-expressions": "^0.7.13", "@pristine-ts/common": "file:../common", "@pristine-ts/core": "file:../core", "@pristine-ts/logging": "file:../logging", @@ -164,7 +176,7 @@ "version": "file:../common", "requires": { "reflect-metadata": "^0.1.13", - "tsyringe": "^4.4.0" + "tsyringe": "^4.8.0" } }, "@pristine-ts/core": { @@ -175,8 +187,8 @@ "@pristine-ts/logging": "file:../logging", "@pristine-ts/security": "file:../security", "@pristine-ts/telemetry": "file:../telemetry", - "@types/uuid": "^8.3.4", - "uuid": "^8.3.2" + "@types/uuid": "^9.0.6", + "uuid": "^9.0.1" } }, "aws4": { @@ -200,9 +212,9 @@ } }, "hpagent": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/hpagent/-/hpagent-0.1.2.tgz", - "integrity": "sha512-ePqFXHtSQWAFXYmj+JtOTHr84iNrII4/QRlAAPPE+zqnKy4xJo7Ie1Y4kC7AdB+LxLxSTTzBMASsEcy0q8YyvQ==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hpagent/-/hpagent-1.2.0.tgz", + "integrity": "sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA==" }, "ms": { "version": "2.1.3", diff --git a/packages/validation/package-lock.json b/packages/validation/package-lock.json index 10bc6bb14..335a5772a 100644 --- a/packages/validation/package-lock.json +++ b/packages/validation/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@pristine-ts/validation", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "@pristine-ts/class-validator": "^1.0.20", @@ -18,7 +18,7 @@ }, "../common": { "name": "@pristine-ts/common", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "reflect-metadata": "^0.1.13", @@ -27,7 +27,7 @@ }, "../core": { "name": "@pristine-ts/core", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "@pristine-ts/common": "file:../common", @@ -43,7 +43,7 @@ }, "../networking": { "name": "@pristine-ts/networking", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "@pristine-ts/common": "file:../common", diff --git a/tests/cli/package-lock.json b/tests/cli/package-lock.json index 414e65ace..36887d049 100644 --- a/tests/cli/package-lock.json +++ b/tests/cli/package-lock.json @@ -15,7 +15,7 @@ "@pristine-ts/logging": "file:../../packages/logging", "@pristine-ts/networking": "file:../../packages/networking", "class-transformer": "^0.5.1", - "tsyringe": "^4.4.0", + "tsyringe": "^4.8.0", "uuid": "^9.0.1" }, "devDependencies": { @@ -38,7 +38,7 @@ }, "../../packages/cli": { "name": "@pristine-ts/cli", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "@pristine-ts/common": "file:../common", @@ -53,16 +53,16 @@ }, "../../packages/common": { "name": "@pristine-ts/common", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "reflect-metadata": "^0.1.13", - "tsyringe": "^4.4.0" + "tsyringe": "^4.8.0" } }, "../../packages/core": { "name": "@pristine-ts/core", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "@pristine-ts/common": "file:../common", @@ -92,7 +92,7 @@ }, "../../packages/logging": { "name": "@pristine-ts/logging", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "@pristine-ts/common": "file:../common", @@ -102,7 +102,7 @@ }, "../../packages/networking": { "name": "@pristine-ts/networking", - "version": "0.0.257", + "version": "0.0.261", "license": "ISC", "dependencies": { "@pristine-ts/common": "file:../common", @@ -245,7 +245,7 @@ "version": "file:../../packages/common", "requires": { "reflect-metadata": "^0.1.13", - "tsyringe": "^4.4.0" + "tsyringe": "^4.8.0" } }, "@pristine-ts/core": { diff --git a/tests/e2e/scenarios/modules/auth0/auth0-protected.e2e.ts b/tests/e2e/scenarios/modules/auth0/auth0-protected.e2e.ts index e348aaa21..2bc92efbb 100644 --- a/tests/e2e/scenarios/modules/auth0/auth0-protected.e2e.ts +++ b/tests/e2e/scenarios/modules/auth0/auth0-protected.e2e.ts @@ -8,41 +8,59 @@ import * as jwt from "jsonwebtoken"; import {HttpClientInterface, HttpRequestInterface, HttpResponseInterface} from "@pristine-ts/http"; import {Auth0Authenticator, Auth0Module, Auth0ModuleKeyname} from "@pristine-ts/auth0"; -const privateKey = "-----BEGIN RSA PRIVATE KEY-----\n" + - "MIIBOQIBAAJAXmWi+JMuW8v5Ng5sDso+H6wl+i9u7lwMxJrZ+j0VQNEh4E7EwHQM\n" + - "PEnPJkTO3cKg6lDwKZ4HX/5BsAQ8ST5nywIDAQABAkAwU7hrqm5BcNvVYOzRZZkI\n" + - "fgmzXDVesqGWxfByvHL1C30kB6mvPC6K9iBuaN0MrwR2YIR+LPDmKbFC3jkVzkwB\n" + - "AiEAn1BRnlbHKfv7fArL+TX/mRy8jJ4KjuQfMWATt7QnGCsCIQCXr5Iao/wCDzHL\n" + - "E5aI00CE5J1W+yU9fvbvQUtA63d+4QIhAJcusUWBNB8zcMOVu1sTUysJiiQnFf3j\n" + - "nXZNpmh+HVthAiAU1magyEQ3WDUD68XzN+oWF33R1CByiT2M8pBO88nvoQIgLVZo\n" + - "5AsRaiJAQou6tjgUqHJrP4uv+Q5kKncGzN5aEy8=\n" + - "-----END RSA PRIVATE KEY-----\n"; +const privateKey = "-----BEGIN PRIVATE KEY-----\n" + + "MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC6lQKD8qAZAL9h\n" + + "BrK7wMyIbPuhZJEe1eyZgaOpLP6RJlMasBfxO3L0i3yGBdTXOv8veNt5wqDtSoFz\n" + + "PImFWFLOJ+nNn1FcUoHoCEvUmHQrCv/2RnLwaON5126gnozQoF7sAFNPLcZ8wiTA\n" + + "Hl600H/N06czi6ksC2H8Nte4zRG/4vYUyiMx9+ySHj5KCElcaWSHdkGJXml/R76M\n" + + "PxvcsvXlrWGSMD31Ni6wJHE9rmJUtIOkQ8RlZpSb90VvZQVpJx+Vx1V4WzhVonxq\n" + + "K1fxTS3fEybFnKc3vzTWJgM43bRo+5b9IyL8jfYZRWCIxcI+0Xs0mp2Ust73Slnh\n" + + "Z+jEQrL3AgMBAAECggEBAKCm3vSXu0vr/dzgNJM/DZ1GIV+0xNOFJOSD4FQxXrvC\n" + + "APpQtzzJkFCJrd2ENeBgdwr8CBYOBBxs84syi8KZ6yqA6WpYDGjuzdXpFsnlvti0\n" + + "7vGxdRQVbBAj86gu/FZCT5jrKtBZPLd9PsGBJNCRWgnyfNwAG9jFsEfHPPVs9SR/\n" + + "IiNb6BcwxUcPVAF/vwrwHg/OKp7yiTHClwo7mNr07W8NAbOoioQmZ10TIyQFz92O\n" + + "+ezByVS8TB6RYzkrCvZSW1leIoIvqA6uaXcr1uzVdWdX0Itb8JY9x9+T83rsJxN4\n" + + "UNyTap7iPYAKE476F1Y+mpQzrgzM+WjqbMldtW/VhQkCgYEA3/4RIZ+f7Cfj0TTS\n" + + "O8d0l6+OJWcGtkjEKDmG6NJJWeQHApWxB+bIWosM2Oqff73HlftOtVELmQ8wdLJ6\n" + + "O/cdMrLBmOXI49WpAVNcZ8+0EVSCG9q8LLCWKqV5WMWNJKB/oMVweiarhY7UmfmW\n" + + "aDWSUcvDQ1uHessK3ffUIvZ6rUsCgYEA1T5sRCkX8jmZ9YdWO9gAxujmaB5PCx5l\n" + + "5UQ/yoWymSKEHsoTQXMI4FQGvYPvvclPfpb9Ij/HEKQ6mxpVyvfXjTWn3mx7Ho2C\n" + + "hPxH8b0b6EL0RPDV+yMoH3TZDpIlyQ0ho77wflWloNdrtcFW6PsNPtrzdeUVBkhG\n" + + "vCg+nsSQIYUCgYB4jX0a45Zmu3FZf1xG4CpYGRwf9TsfkDpCi/OYCtV/k8JSGc6V\n" + + "uhfK41uew2fkkHeCuSa7X0smrY4ewJAZBf6o8pxPdhyQwsWa+QqatKbtTNZZt3ff\n" + + "dYrcmQKeTHSSae9Gz/yhQX6++whhdnsEyxBdBZWqAvD/nZfTrzZ1OsL70QKBgQCP\n" + + "n1d0IOlL75fOUrS14anETqDAh4ldR8ABRpJgaOP9V838nsWRU1UrIezYP8B85tVv\n" + + "wWoEY0hD4RjH1ljqNzsqlHTXzeCul0jNIM2j92aQbGfw9vRoDSm85go7Uhu46es6\n" + + "SiPYMv828WBOLkXG7S/iob1QLlaWwJ9Doydp76HTsQKBgQDRdVYfEXDUmxHg0wzK\n" + + "9nmiE2jwVtwoR0JFIuPfYgfHyPlVKjMZakKWiWdXTPPs0R2gmipzve+nnITBHmHd\n" + + "L4Lu5XD8+E3fB+Oor6RaIZNTAlo2eRTfosEQ4bvD9ap60UTEa0dqmy3ExC3VQ/2M\nu" + + "XslcWkaEgIsqaNdIttT5ZRhKQ==\n" + + "-----END PRIVATE KEY-----\n"; const publicKey1 = "-----BEGIN PUBLIC KEY-----\n" + - "MFswDQYJKoZIhvcNAQEBBQADSgAwRwJAXmWi+JMuW8v5Ng5sDso+H6wl+i9u7lwM\n" + - "xJrZ+j0VQNEh4E7EwHQMPEnPJkTO3cKg6lDwKZ4HX/5BsAQ8ST5nywIDAQAB\n" + + "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAupUCg/KgGQC/YQayu8DM\n" + + "iGz7oWSRHtXsmYGjqSz+kSZTGrAX8Tty9It8hgXU1zr/L3jbecKg7UqBczyJhVhS\n" + + "zifpzZ9RXFKB6AhL1Jh0Kwr/9kZy8GjjedduoJ6M0KBe7ABTTy3GfMIkwB5etNB/\n" + + "zdOnM4upLAth/DbXuM0Rv+L2FMojMffskh4+SghJXGlkh3ZBiV5pf0e+jD8b3LL1\n" + + "5a1hkjA99TYusCRxPa5iVLSDpEPEZWaUm/dFb2UFaScflcdVeFs4VaJ8aitX8U0t\n" + + "3xMmxZynN7801iYDON20aPuW/SMi/I32GUVgiMXCPtF7NJqdlLLe90pZ4WfoxEKy\n" + + "9wIDAQAB\n" + "-----END PUBLIC KEY-----\n"; const tokenHeader = { alg: "RS256", - kid: "687dfb71-7ce9-42b5-b77c-c39ac2dfd21e", + kid: "_yqByxvM35ith2LEcJnZtEtz0SDalDw_H3Spk5i0DRg", typ: "JWT" }; const publicKeys = { "keys": [{ - "alg": "RS256", - "kty":"RSA", - "e":"AQAB", - "kid":"687dfb71-7ce9-42b5-b77c-c39ac2dfd21e", - "n":"XmWi-JMuW8v5Ng5sDso-H6wl-i9u7lwMxJrZ-j0VQNEh4E7EwHQMPEnPJkTO3cKg6lDwKZ4HX_5BsAQ8ST5nyw" - }, { - "alg": "RS256", - "e": "AQAB", - "kid": "fgjhlkhjlkhexample=", "kty": "RSA", - "n": "sgjhlk6jp98ugp98up34hpexample", - "use": "sig" + "e": "AQAB", + "use": "sig", + "kid": "_yqByxvM35ith2LEcJnZtEtz0SDalDw_H3Spk5i0DRg", + "alg": "RS256", + "n": "upUCg_KgGQC_YQayu8DMiGz7oWSRHtXsmYGjqSz-kSZTGrAX8Tty9It8hgXU1zr_L3jbecKg7UqBczyJhVhSzifpzZ9RXFKB6AhL1Jh0Kwr_9kZy8GjjedduoJ6M0KBe7ABTTy3GfMIkwB5etNB_zdOnM4upLAth_DbXuM0Rv-L2FMojMffskh4-SghJXGlkh3ZBiV5pf0e-jD8b3LL15a1hkjA99TYusCRxPa5iVLSDpEPEZWaUm_dFb2UFaScflcdVeFs4VaJ8aitX8U0t3xMmxZynN7801iYDON20aPuW_SMi_I32GUVgiMXCPtF7NJqdlLLe90pZ4WfoxEKy9w" }] } diff --git a/tests/e2e/scenarios/modules/aws-cognito/aws-cognito-protected.e2e.ts b/tests/e2e/scenarios/modules/aws-cognito/aws-cognito-protected.e2e.ts index f55df91e3..847c03139 100644 --- a/tests/e2e/scenarios/modules/aws-cognito/aws-cognito-protected.e2e.ts +++ b/tests/e2e/scenarios/modules/aws-cognito/aws-cognito-protected.e2e.ts @@ -8,41 +8,59 @@ import {AppModuleInterface, HttpMethod, IdentityInterface, Request, Response, ta import * as jwt from "jsonwebtoken"; import {HttpClientInterface, HttpRequestInterface, HttpResponseInterface} from "@pristine-ts/http"; -const privateKey = "-----BEGIN RSA PRIVATE KEY-----\n" + - "MIIBOQIBAAJAXmWi+JMuW8v5Ng5sDso+H6wl+i9u7lwMxJrZ+j0VQNEh4E7EwHQM\n" + - "PEnPJkTO3cKg6lDwKZ4HX/5BsAQ8ST5nywIDAQABAkAwU7hrqm5BcNvVYOzRZZkI\n" + - "fgmzXDVesqGWxfByvHL1C30kB6mvPC6K9iBuaN0MrwR2YIR+LPDmKbFC3jkVzkwB\n" + - "AiEAn1BRnlbHKfv7fArL+TX/mRy8jJ4KjuQfMWATt7QnGCsCIQCXr5Iao/wCDzHL\n" + - "E5aI00CE5J1W+yU9fvbvQUtA63d+4QIhAJcusUWBNB8zcMOVu1sTUysJiiQnFf3j\n" + - "nXZNpmh+HVthAiAU1magyEQ3WDUD68XzN+oWF33R1CByiT2M8pBO88nvoQIgLVZo\n" + - "5AsRaiJAQou6tjgUqHJrP4uv+Q5kKncGzN5aEy8=\n" + - "-----END RSA PRIVATE KEY-----\n"; +const privateKey = "-----BEGIN PRIVATE KEY-----\n" + + "MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC6lQKD8qAZAL9h\n" + + "BrK7wMyIbPuhZJEe1eyZgaOpLP6RJlMasBfxO3L0i3yGBdTXOv8veNt5wqDtSoFz\n" + + "PImFWFLOJ+nNn1FcUoHoCEvUmHQrCv/2RnLwaON5126gnozQoF7sAFNPLcZ8wiTA\n" + + "Hl600H/N06czi6ksC2H8Nte4zRG/4vYUyiMx9+ySHj5KCElcaWSHdkGJXml/R76M\n" + + "PxvcsvXlrWGSMD31Ni6wJHE9rmJUtIOkQ8RlZpSb90VvZQVpJx+Vx1V4WzhVonxq\n" + + "K1fxTS3fEybFnKc3vzTWJgM43bRo+5b9IyL8jfYZRWCIxcI+0Xs0mp2Ust73Slnh\n" + + "Z+jEQrL3AgMBAAECggEBAKCm3vSXu0vr/dzgNJM/DZ1GIV+0xNOFJOSD4FQxXrvC\n" + + "APpQtzzJkFCJrd2ENeBgdwr8CBYOBBxs84syi8KZ6yqA6WpYDGjuzdXpFsnlvti0\n" + + "7vGxdRQVbBAj86gu/FZCT5jrKtBZPLd9PsGBJNCRWgnyfNwAG9jFsEfHPPVs9SR/\n" + + "IiNb6BcwxUcPVAF/vwrwHg/OKp7yiTHClwo7mNr07W8NAbOoioQmZ10TIyQFz92O\n" + + "+ezByVS8TB6RYzkrCvZSW1leIoIvqA6uaXcr1uzVdWdX0Itb8JY9x9+T83rsJxN4\n" + + "UNyTap7iPYAKE476F1Y+mpQzrgzM+WjqbMldtW/VhQkCgYEA3/4RIZ+f7Cfj0TTS\n" + + "O8d0l6+OJWcGtkjEKDmG6NJJWeQHApWxB+bIWosM2Oqff73HlftOtVELmQ8wdLJ6\n" + + "O/cdMrLBmOXI49WpAVNcZ8+0EVSCG9q8LLCWKqV5WMWNJKB/oMVweiarhY7UmfmW\n" + + "aDWSUcvDQ1uHessK3ffUIvZ6rUsCgYEA1T5sRCkX8jmZ9YdWO9gAxujmaB5PCx5l\n" + + "5UQ/yoWymSKEHsoTQXMI4FQGvYPvvclPfpb9Ij/HEKQ6mxpVyvfXjTWn3mx7Ho2C\n" + + "hPxH8b0b6EL0RPDV+yMoH3TZDpIlyQ0ho77wflWloNdrtcFW6PsNPtrzdeUVBkhG\n" + + "vCg+nsSQIYUCgYB4jX0a45Zmu3FZf1xG4CpYGRwf9TsfkDpCi/OYCtV/k8JSGc6V\n" + + "uhfK41uew2fkkHeCuSa7X0smrY4ewJAZBf6o8pxPdhyQwsWa+QqatKbtTNZZt3ff\n" + + "dYrcmQKeTHSSae9Gz/yhQX6++whhdnsEyxBdBZWqAvD/nZfTrzZ1OsL70QKBgQCP\n" + + "n1d0IOlL75fOUrS14anETqDAh4ldR8ABRpJgaOP9V838nsWRU1UrIezYP8B85tVv\n" + + "wWoEY0hD4RjH1ljqNzsqlHTXzeCul0jNIM2j92aQbGfw9vRoDSm85go7Uhu46es6\n" + + "SiPYMv828WBOLkXG7S/iob1QLlaWwJ9Doydp76HTsQKBgQDRdVYfEXDUmxHg0wzK\n" + + "9nmiE2jwVtwoR0JFIuPfYgfHyPlVKjMZakKWiWdXTPPs0R2gmipzve+nnITBHmHd\n" + + "L4Lu5XD8+E3fB+Oor6RaIZNTAlo2eRTfosEQ4bvD9ap60UTEa0dqmy3ExC3VQ/2M\nu" + + "XslcWkaEgIsqaNdIttT5ZRhKQ==\n" + + "-----END PRIVATE KEY-----\n"; const publicKey1 = "-----BEGIN PUBLIC KEY-----\n" + - "MFswDQYJKoZIhvcNAQEBBQADSgAwRwJAXmWi+JMuW8v5Ng5sDso+H6wl+i9u7lwM\n" + - "xJrZ+j0VQNEh4E7EwHQMPEnPJkTO3cKg6lDwKZ4HX/5BsAQ8ST5nywIDAQAB\n" + + "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAupUCg/KgGQC/YQayu8DM\n" + + "iGz7oWSRHtXsmYGjqSz+kSZTGrAX8Tty9It8hgXU1zr/L3jbecKg7UqBczyJhVhS\n" + + "zifpzZ9RXFKB6AhL1Jh0Kwr/9kZy8GjjedduoJ6M0KBe7ABTTy3GfMIkwB5etNB/\n" + + "zdOnM4upLAth/DbXuM0Rv+L2FMojMffskh4+SghJXGlkh3ZBiV5pf0e+jD8b3LL1\n" + + "5a1hkjA99TYusCRxPa5iVLSDpEPEZWaUm/dFb2UFaScflcdVeFs4VaJ8aitX8U0t\n" + + "3xMmxZynN7801iYDON20aPuW/SMi/I32GUVgiMXCPtF7NJqdlLLe90pZ4WfoxEKy\n" + + "9wIDAQAB\n" + "-----END PUBLIC KEY-----\n"; const tokenHeader = { alg: "RS256", - kid: "687dfb71-7ce9-42b5-b77c-c39ac2dfd21e", + kid: "_yqByxvM35ith2LEcJnZtEtz0SDalDw_H3Spk5i0DRg", typ: "JWT" }; const publicKeys = { "keys": [{ - "alg": "RS256", - "kty":"RSA", - "e":"AQAB", - "kid":"687dfb71-7ce9-42b5-b77c-c39ac2dfd21e", - "n":"XmWi-JMuW8v5Ng5sDso-H6wl-i9u7lwMxJrZ-j0VQNEh4E7EwHQMPEnPJkTO3cKg6lDwKZ4HX_5BsAQ8ST5nyw" - }, { - "alg": "RS256", - "e": "AQAB", - "kid": "fgjhlkhjlkhexample=", "kty": "RSA", - "n": "sgjhlk6jp98ugp98up34hpexample", - "use": "sig" + "e": "AQAB", + "use": "sig", + "kid": "_yqByxvM35ith2LEcJnZtEtz0SDalDw_H3Spk5i0DRg", + "alg": "RS256", + "n": "upUCg_KgGQC_YQayu8DMiGz7oWSRHtXsmYGjqSz-kSZTGrAX8Tty9It8hgXU1zr_L3jbecKg7UqBczyJhVhSzifpzZ9RXFKB6AhL1Jh0Kwr_9kZy8GjjedduoJ6M0KBe7ABTTy3GfMIkwB5etNB_zdOnM4upLAth_DbXuM0Rv-L2FMojMffskh4-SghJXGlkh3ZBiV5pf0e-jD8b3LL15a1hkjA99TYusCRxPa5iVLSDpEPEZWaUm_dFb2UFaScflcdVeFs4VaJ8aitX8U0t3xMmxZynN7801iYDON20aPuW_SMi_I32GUVgiMXCPtF7NJqdlLLe90pZ4WfoxEKy9w" }] }