From 6192b5e1c7bd1afbf04ef8f1c12170275adb3c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20MORI?= Date: Mon, 26 Jul 2021 14:22:12 +0200 Subject: [PATCH 1/5] Allow to configure SAML auth acceptedClockSkewMs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane MORI --- plugins/auth-backend/config.d.ts | 1 + plugins/auth-backend/src/providers/saml/provider.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/auth-backend/config.d.ts b/plugins/auth-backend/config.d.ts index e9f24382d9..537999b694 100644 --- a/plugins/auth-backend/config.d.ts +++ b/plugins/auth-backend/config.d.ts @@ -53,6 +53,7 @@ export interface Config { decryptionPvk?: string; signatureAlgorithm?: 'sha256' | 'sha512'; digestAlgorithm?: string; + acceptedClockSkewMs: number; }; okta?: { [authEnv: string]: { [key: string]: string }; diff --git a/plugins/auth-backend/src/providers/saml/provider.ts b/plugins/auth-backend/src/providers/saml/provider.ts index fa8519ea1a..fe721fa376 100644 --- a/plugins/auth-backend/src/providers/saml/provider.ts +++ b/plugins/auth-backend/src/providers/saml/provider.ts @@ -132,6 +132,7 @@ export const createSamlProvider = ( | SignatureAlgorithm | undefined, digestAlgorithm: config.getOptionalString('digestAlgorithm'), + acceptedClockSkewMs: config.getOptionalNumber('acceptedClockSkewMs'), tokenIssuer, appUrl: globalConfig.appUrl, From 4edca1bd0c1afb311f6bdebb1ab88f73409cc648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20MORI?= Date: Mon, 26 Jul 2021 14:53:54 +0200 Subject: [PATCH 2/5] Added changeset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane MORI --- .changeset/lazy-apples-scream.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/lazy-apples-scream.md diff --git a/.changeset/lazy-apples-scream.md b/.changeset/lazy-apples-scream.md new file mode 100644 index 0000000000..317297d03d --- /dev/null +++ b/.changeset/lazy-apples-scream.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': minor +--- + +Allow to configure SAML auth acceptedClockSkewMs From 6a5d98d1afdb3ebac479e41f7230d574e30e6cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20MORI?= Date: Tue, 27 Jul 2021 09:36:51 +0200 Subject: [PATCH 3/5] Update changeset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane MORI --- .changeset/lazy-apples-scream.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/lazy-apples-scream.md b/.changeset/lazy-apples-scream.md index 317297d03d..7109bacb64 100644 --- a/.changeset/lazy-apples-scream.md +++ b/.changeset/lazy-apples-scream.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-auth-backend': minor +'@backstage/plugin-auth-backend': patch --- Allow to configure SAML auth acceptedClockSkewMs From 04be344a8ffe6af5380b5a2706f5daeeb114dbca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20MORI?= Date: Tue, 27 Jul 2021 15:01:54 +0200 Subject: [PATCH 4/5] Set acceptedClockSkewMs SAML configuration optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane MORI --- plugins/auth-backend/config.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/auth-backend/config.d.ts b/plugins/auth-backend/config.d.ts index 537999b694..ed6417850c 100644 --- a/plugins/auth-backend/config.d.ts +++ b/plugins/auth-backend/config.d.ts @@ -53,7 +53,7 @@ export interface Config { decryptionPvk?: string; signatureAlgorithm?: 'sha256' | 'sha512'; digestAlgorithm?: string; - acceptedClockSkewMs: number; + acceptedClockSkewMs?: number; }; okta?: { [authEnv: string]: { [key: string]: string }; From 63215cf33cb1b7f85442f6b0d73157735353d57c Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 27 Jul 2021 15:32:34 +0200 Subject: [PATCH 5/5] chore: fix vale complaints Signed-off-by: blam --- .changeset/lazy-apples-scream.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/lazy-apples-scream.md b/.changeset/lazy-apples-scream.md index 7109bacb64..b666c3498a 100644 --- a/.changeset/lazy-apples-scream.md +++ b/.changeset/lazy-apples-scream.md @@ -2,4 +2,4 @@ '@backstage/plugin-auth-backend': patch --- -Allow to configure SAML auth acceptedClockSkewMs +Allow to configure SAML auth `acceptedClockSkewMs`