diff --git a/ee/api/chalicelib/blueprints/bp_saml.py b/ee/api/chalicelib/blueprints/bp_saml.py index 4a0f057df..79adde8c7 100644 --- a/ee/api/chalicelib/blueprints/bp_saml.py +++ b/ee/api/chalicelib/blueprints/bp_saml.py @@ -85,7 +85,7 @@ def process_sso_assertion(): if jwt is None: return {"errors": ["null JWT"]} return Response( - status_code=307, + status_code=302, body='', headers={'Location': SAML2_helper.get_landing_URL(jwt), 'Content-Type': 'text/plain'}) diff --git a/ee/api/chalicelib/core/users.py b/ee/api/chalicelib/core/users.py index f6609aae4..80fd5f0de 100644 --- a/ee/api/chalicelib/core/users.py +++ b/ee/api/chalicelib/core/users.py @@ -693,7 +693,8 @@ def authenticate_sso(email, internal_id, exp=None): return authorizers.generate_jwt(r['id'], r['tenantId'], TimeUTC.datetime_to_timestamp(cur.fetchone()["jwt_iat"]), aud=f"front:{helper.get_stage_name()}", - exp=exp) + exp=exp + TimeUTC.datetime_to_timestamp(cur.fetchone()["jwt_iat"]) \ + if exp is not None else None) return None diff --git a/ee/api/entrypoint.sh b/ee/api/entrypoint.sh deleted file mode 100755 index 0b87bc311..000000000 --- a/ee/api/entrypoint.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -python env_handler.py -chalice local --host 0.0.0.0 --stage ${ENTERPRISE_BUILD}