diff --git a/api/chalicelib/core/assist.py b/api/chalicelib/core/assist.py index 29fb2708c..d87cb90bd 100644 --- a/api/chalicelib/core/assist.py +++ b/api/chalicelib/core/assist.py @@ -84,7 +84,7 @@ def __get_agent_token(project_id, project_key, session_id): "projectId": project_id, "sessionId": session_id, "iat": iat // 1000, - "exp": iat // 1000 + config("jwt_exp_delta_seconds", cast=int) + TimeUTC.get_utc_offset() // 1000, + "exp": iat // 1000 + config("ASSIST_JWT_EXPIRATION", cast=int) + TimeUTC.get_utc_offset() // 1000, "iss": config("jwt_issuer"), "aud": f"openreplay:agent" }, diff --git a/api/env.default b/api/env.default index aa14fc993..fd2e47142 100644 --- a/api/env.default +++ b/api/env.default @@ -47,4 +47,6 @@ sessions_region=us-east-1 sourcemaps_bucket=sourcemaps sourcemaps_reader=http://127.0.0.1:9000/sourcemaps stage=default-foss -version_number=1.4.0 \ No newline at end of file +version_number=1.4.0 +ASSIST_JWT_EXPIRATION=14400 +ASSIST_JWT_SECRET= \ No newline at end of file diff --git a/ee/api/env.default b/ee/api/env.default index 7687566d7..6da914c7c 100644 --- a/ee/api/env.default +++ b/ee/api/env.default @@ -57,3 +57,5 @@ sourcemaps_bucket=sourcemaps sourcemaps_reader=http://127.0.0.1:9000/sourcemaps stage=default-ee version_number=1.0.0 +ASSIST_JWT_EXPIRATION=14400 +ASSIST_JWT_SECRET= \ No newline at end of file