diff --git a/pyiceberg/catalog/rest/auth.py b/pyiceberg/catalog/rest/auth.py index 48e49f08da..7f56f6300b 100644 --- a/pyiceberg/catalog/rest/auth.py +++ b/pyiceberg/catalog/rest/auth.py @@ -95,7 +95,7 @@ def __init__( def _fetch_access_token(self, credential: str) -> str: if COLON in credential: - client_id, client_secret = credential.split(COLON) + client_id, client_secret = credential.split(COLON, maxsplit=1) else: client_id, client_secret = None, credential diff --git a/tests/catalog/test_rest.py b/tests/catalog/test_rest.py index fb0e2607c9..d2ecd02aba 100644 --- a/tests/catalog/test_rest.py +++ b/tests/catalog/test_rest.py @@ -50,7 +50,7 @@ from pyiceberg.utils.config import Config TEST_URI = "https://iceberg-test-catalog/" -TEST_CREDENTIALS = "client:secret" +TEST_CREDENTIALS = "client:secret_with:colon" TEST_OAUTH2_SERVER_URI = "https://auth-endpoint/" TEST_TOKEN = "some_jwt_token" TEST_SCOPE = "openid_offline_corpds_ds_profile"