Skip to content

Commit

Permalink
enforce login on the redirected node
Browse files Browse the repository at this point in the history
  • Loading branch information
boonhapus committed Jan 28, 2025
1 parent 7f6f89d commit 2b7d080
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cs_tools/api/middlewares/tsload.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,13 @@ def _check_for_redirect_auth(self, *, cycle_id: CycleID) -> None:
self.ts.api.v1._redirected_url_due_to_tsload_load_balancer = redirected

log.info(f"The tsload API is redirecting CS Tools to node -> {redirected}")
self.ts.login()
d = {
"username": self.ts.config.thoughtspot.username,
"password": self.ts.config.thoughtspot.decoded_password,
}
r = self.ts.api.v1.dataservice_dataload_session(**d)
log.debug(r.text)
r.raise_for_status()

def _check_privileges(self) -> None:
"""
Expand Down

0 comments on commit 2b7d080

Please sign in to comment.