From 75168e31f9b178bb8f77bca9634b16661c7e4f49 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 16 Oct 2024 13:30:12 +0200 Subject: [PATCH] auth-backend-module-aws-alb-provider: no longer lowercase username and email Signed-off-by: Patrik Oldsberg --- .changeset/healthy-lions-judge.md | 6 ++++++ .../src/authenticator.ts | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changeset/healthy-lions-judge.md diff --git a/.changeset/healthy-lions-judge.md b/.changeset/healthy-lions-judge.md new file mode 100644 index 0000000000..f9ead85d2e --- /dev/null +++ b/.changeset/healthy-lions-judge.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-auth-backend-module-aws-alb-provider': minor +'@backstage/plugin-auth-backend': minor +--- + +**BREAKING**: The AWS ALB `fullProfile` will no longer have the its username or email converted to lowercase. This is to ensure unique handling of the users. You may need to update and configure a custom sign-in resolver or profile transform as a result. diff --git a/plugins/auth-backend-module-aws-alb-provider/src/authenticator.ts b/plugins/auth-backend-module-aws-alb-provider/src/authenticator.ts index 2e7fe1cd26..b6969c5432 100644 --- a/plugins/auth-backend-module-aws-alb-provider/src/authenticator.ts +++ b/plugins/auth-backend-module-aws-alb-provider/src/authenticator.ts @@ -77,12 +77,12 @@ export const awsAlbAuthenticator = createProxyAuthenticator({ provider: 'unknown', id: claims.sub, displayName: claims.name, - username: claims.email.split('@')[0].toLowerCase(), + username: claims.email.split('@')[0], name: { familyName: claims.family_name, givenName: claims.given_name, }, - emails: [{ value: claims.email.toLowerCase() }], + emails: [{ value: claims.email }], photos: [{ value: claims.picture }], };