Skip to content

BasicAuth for PulsarTesRunner#391

Merged
jmchilton merged 3 commits into
galaxyproject:masterfrom
BorisYourich:master
Jul 10, 2025
Merged

BasicAuth for PulsarTesRunner#391
jmchilton merged 3 commits into
galaxyproject:masterfrom
BorisYourich:master

Conversation

@BorisYourich

Copy link
Copy Markdown
Contributor

This PR implements basic authorisation functionality in job submission to TES server.
Job configuration is extended by following options:

      authorization: "basic"  # Can be "none" or "basic"
      basic_auth:
        username: "user"
        password: "password"

Following this approach the OAuth2 authorisation could be implemented, although it requires an implementation of underlying mechanism that would obtain and refresh service tokens from the configured authority.

This PR is dependent on PR#5 in pydantic-tes

@martenson

martenson commented May 15, 2025

Copy link
Copy Markdown
Member

@BorisYourich this CI error seems relevant:

py311-mypy: commands[0]> mypy pulsar test
pulsar/managers/util/tes.py:58: error: Argument "url" to "TesClient" has
incompatible type "Optional[Any]"; expected "str"  [arg-type]
        return TesClient(url=tes_url, headers=headers)
                             ^~~~~~~
Found 1 error in 1 file (checked 153 source files)
py311-mypy: exit 1 (28.30 seconds) /home/runner/work/pulsar/pulsar> mypy pulsar test pid=3198
  py311-mypy: FAIL code 1 (53.56=setup[[25](https://github.com/galaxyproject/pulsar/actions/runs/14380331051/job/40335724455?pr=391#step:6:26).26]+cmd[28.30] seconds)
  evaluation failed :( (53.76 seconds)
Error: Process completed with exit code 1.

@jmchilton

Copy link
Copy Markdown
Member

I've been on a Pulsar hiatus but this PR looks great to me. Any chance you can rebase and see if it resolves the type error?

Added private_token destination and Headers for OAuth2 Authorization in Tes client as was done in pydantic-tes TesClient .
Options for job_conf should be:
auth: "none","Basic" ("oauth2" in the future)
username:
password:
@jmchilton
jmchilton merged commit b60890c into galaxyproject:master Jul 10, 2025
8 of 13 checks passed
@jmchilton

Copy link
Copy Markdown
Member

Thank you so much - sorry for the delays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants