Skip to content

feat: jobmanager token authentication - #587

Merged
cbartz merged 30 commits into
mainfrom
feat/jobmanager-token-auth-ISD-3752
Jul 15, 2025
Merged

feat: jobmanager token authentication#587
cbartz merged 30 commits into
mainfrom
feat/jobmanager-token-auth-ISD-3752

Conversation

@cbartz

@cbartz cbartz commented Jul 1, 2025

Copy link
Copy Markdown
Collaborator

Applicable spec:

Overview

Support HTTP Bearer Token authentication with the jobmanager and make it required.

Rationale

Communication with the jobmanager requires authentication.

Juju Events Changes

n/a

Module Changes

  • charm state for parsing
  • created a new module for interaction with the jobmanager api in the application and extracted the api interaction logic out of the jobmanager_provider
  • this new module sets the HTTP Bearer Authentication header

Library Changes

n/a

Checklist

jobmanager support is still considered hidden feature, so there is no official documentation

@cbartz cbartz left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self-review

Comment thread github-runner-manager/src/github_runner_manager/jobmanager_api.py
Comment thread github-runner-manager/src/github_runner_manager/jobmanager_api.py
Comment thread src/charm_state.py
Comment thread src/charm.py
@cbartz
cbartz marked this pull request as ready for review July 2, 2025 10:52
Comment thread github-runner-manager/src/github_runner_manager/jobmanager_api.py
Comment thread github-runner-manager/src/github_runner_manager/jobmanager_api.py Outdated
Comment thread github-runner-manager/src/github_runner_manager/jobmanager_api.py Outdated

@yanksyoon yanksyoon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed until srcs, tests pending.

Comment thread github-runner-manager/src/github_runner_manager/jobmanager_api.py
Comment thread github-runner-manager/src/github_runner_manager/jobmanager_api.py
Comment thread github-runner-manager/src/github_runner_manager/jobmanager_api.py
Comment thread github-runner-manager/src/github_runner_manager/jobmanager_api.py
Comment thread github-runner-manager/src/github_runner_manager/platform/jobmanager_provider.py Outdated
Comment thread github-runner-manager/src/github_runner_manager/platform/jobmanager_provider.py Outdated
Comment thread github-runner-manager/src/github_runner_manager/jobmanager_api.py
@cbartz
cbartz requested review from yanksyoon and yhaliaw July 9, 2025 19:16

@yanksyoon yanksyoon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor comment on inheritance, thanks!

Comment thread src/models.py
Comment thread src/charm_state.py

@yanksyoon yanksyoon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, non-blocking nits, thank you!

Comment thread github-runner-manager/src/github_runner_manager/platform/jobmanager_provider.py Outdated
Comment thread github-runner-manager/src/github_runner_manager/platform/jobmanager_provider.py Outdated
Comment thread github-runner-manager/tests/unit/platform/test_jobmanager_provider.py Outdated
Comment thread github-runner-manager/tests/unit/test_jobmanager_api.py
Comment thread github-runner-manager/pyproject.toml
@cbartz
cbartz enabled auto-merge (squash) July 15, 2025 05:23
@github-actions

Copy link
Copy Markdown
Contributor

Test results for commit 9bef95b

Test coverage for 9bef95b

Wrote XML report to coverage/coverage.xml

Static code analysis report

Run started:2025-07-15 10:37:13.997946

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 2021
  Total lines skipped (#nosec): 2
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 1

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@cbartz
cbartz merged commit 34cd855 into main Jul 15, 2025
93 of 99 checks passed
@cbartz
cbartz deleted the feat/jobmanager-token-auth-ISD-3752 branch July 15, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants