Skip to content

Commit

Permalink
[Auth] Fix httpdb init from env [1.6.x] (#5497)
Browse files Browse the repository at this point in the history
  • Loading branch information
theSaarco committed May 2, 2024
1 parent dbb53dc commit d777f65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mlrun/db/httpdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ def _enrich_and_validate(self, url):
self.base_url = base_url
username = parsed_url.username or config.httpdb.user
password = parsed_url.password or config.httpdb.password
self.user = username
self.password = password
self.token_provider = None

if config.auth_with_client_id.enabled:
Expand All @@ -156,6 +154,9 @@ def _enrich_and_validate(self, url):
if token:
self.token_provider = StaticTokenProvider(token)

self.user = username
self.password = password

def __repr__(self):
cls = self.__class__.__name__
return f"{cls}({self.base_url!r})"
Expand Down

0 comments on commit d777f65

Please sign in to comment.