Skip to content

Add support for device auth flow#100

Merged
Mark-Powers merged 5 commits into
masterfrom
wip/deviceauth
Jun 26, 2026
Merged

Add support for device auth flow#100
Mark-Powers merged 5 commits into
masterfrom
wip/deviceauth

Conversation

@Mark-Powers

Copy link
Copy Markdown
Contributor

This changes makes it so if a user enables device auth flow with chi.context.use_device_auth() that will be used when setting up the python-chi session.

@Mark-Powers Mark-Powers requested review from msherman64 and pdmars June 15, 2026 18:48

@pdmars pdmars left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good!

Comment thread requirements.txt
matplotlib
pandas

git+https://github.com/ChameleonCloud/ccauth.git

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

a reminder to me to get this on pypi

@msherman64 msherman64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It all seems like it works to me, just some nits based on how we package it.

changing python versions and setting the project domain seem fine, but I feel like they should be top level changes instead of bundled into the device auth change.

for the device auth, we'll need to decide whether cc-auth is a hard dependency+import, or optional, the way python-blazarclient is used.

and finally, how are things imported? should use_device_auth be added to:
init.py's from .context import get, params, reset, session, set, use_site?

Comment on lines +13 to +20
runs-on: ubuntu-24.04
strategy:
matrix:
python:
- 3.8
- "3.10"
- "3.11"
- "3.12"
- "3.13"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this bump because cc-auth doesn't support python3.8?
I would leave this as a separate commit/pr and update tox.ini as well to match, just to make it clear that this is a "deprecate python 3.8 and 3.9, test 3.10 to 3.13" change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll leave this in the PR, but it wasn't ccauth specifically. I think it was setuptools in general was not playing nice in GHA.

Comment thread chi/context.py Outdated
Comment on lines +407 to +409
set(
"project_domain_name", DEFAULT_PROJECT_DOMAIN_NAME
) # Same for all chameleon sites

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if this is always setting the project domain name in the global context, should it be pulled out to a separate change/fix? I know it came up when using an external session from openstacksdk

Comment thread chi/context.py
Comment thread chi/context.py Outdated
"/.well-known/openid-configuration"
)
DEFAULT_PROTOCOL = "openid"
DEFAULT_RESOURCE_PROVIDER = "chameleon"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this be named DEFAULT_IDENTITY_PROVIDER ?

Comment thread chi/context.py Outdated
@Mark-Powers Mark-Powers merged commit 89498f8 into master Jun 26, 2026
6 checks passed
@Mark-Powers Mark-Powers deleted the wip/deviceauth branch June 26, 2026 16:45
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