Skip to content

Commit

Permalink
Remove size check on whylabs api keys (#1581)
Browse files Browse the repository at this point in the history
This constraint isn't true. Keys can actually be arbitrarily long now
that they include the org id as well, which is customizable.
  • Loading branch information
naddeoa authored Oct 31, 2024
1 parent c9b9b8b commit 7d18b98
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions python/whylogs/api/whylabs/session/whylabs_client_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ def _validate_api_key(self, api_key: Optional[str]) -> str:
raise ValueError("Missing API key. Set it via WHYLABS_API_KEY environment variable or as an api_key option")
if len(api_key) < 12:
raise ValueError("API key too short")
if len(api_key) > 80:
raise ValueError("API key too long")
if api_key[10] != ".":
raise ValueError("Invalid format. Expecting a dot at an index 10")
return api_key[:10]
Expand Down

0 comments on commit 7d18b98

Please sign in to comment.