From 7e2918d05c0dd4adadb0ded5aca3764d992521c8 Mon Sep 17 00:00:00 2001 From: hdavey-gds <129174608+hdavey-gds@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:06:44 +0000 Subject: [PATCH] DAC-1880 Enhancements to RP Onboarding to Cognito/QuickSight (#451) Make session lifetime 55 minutes in production --- src/handlers/cognito-quicksight-access/handler.spec.ts | 2 +- src/handlers/cognito-quicksight-access/handler.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/cognito-quicksight-access/handler.spec.ts b/src/handlers/cognito-quicksight-access/handler.spec.ts index 91e49e7f7..7b84d5e68 100644 --- a/src/handlers/cognito-quicksight-access/handler.spec.ts +++ b/src/handlers/cognito-quicksight-access/handler.spec.ts @@ -184,7 +184,7 @@ test('session duration', async () => { await expectSessionDuration('dev', 15); await expectSessionDuration('test', 15); await expectSessionDuration('feature', 15); - await expectSessionDuration('production', 600); + await expectSessionDuration('production', 55); expect(mockQuicksightClient.calls()).toHaveLength(4); }); diff --git a/src/handlers/cognito-quicksight-access/handler.ts b/src/handlers/cognito-quicksight-access/handler.ts index 4213fd62c..4099dd888 100644 --- a/src/handlers/cognito-quicksight-access/handler.ts +++ b/src/handlers/cognito-quicksight-access/handler.ts @@ -112,7 +112,7 @@ const getEmbedUrl = async (accountId: string, username: string): Promise const request = new GenerateEmbedUrlForRegisteredUserCommand({ AwsAccountId: accountId, UserArn: userArn, - SessionLifetimeInMinutes: getAWSEnvironment() === 'production' ? 600 : 15, + SessionLifetimeInMinutes: getAWSEnvironment() === 'production' ? 55 : 15, ExperienceConfiguration: { QuickSightConsole: { InitialPath: '/start/dashboards',