From 523eee5110a0013a2b97329483985282ad250f09 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Wed, 24 Jul 2024 15:10:26 -0700 Subject: [PATCH] API Key Generation - Consumer - Use length of 64, instead of 256 (#2934) --- auth-api/src/auth_api/services/api_gateway.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth-api/src/auth_api/services/api_gateway.py b/auth-api/src/auth_api/services/api_gateway.py index dd1546f421..150f4ad9ed 100644 --- a/auth-api/src/auth_api/services/api_gateway.py +++ b/auth-api/src/auth_api/services/api_gateway.py @@ -264,6 +264,6 @@ def _get_api_consumer_endpoint(cls, env): @classmethod def _make_string_compatible(cls, target: str) -> str: """Make string compatible for API gateway.""" - # Length 255 max - alphanumeric, space, and the following: . _ - + # Length 64 max - alphanumeric, space, and the following: . _ - target = re.sub(r'[^a-zA-Z0-9_\- .]', '', target) - return target[:255] + return target[:64]