Skip to content

support authentication from OS_* environment variables - #81

Merged
akyriako merged 1 commit into
akyriako:mainfrom
thomaslaurenson:env-var-auth
Oct 2, 2026
Merged

akyriako merged 1 commit into
akyriako:mainfrom
thomaslaurenson:env-var-auth

Conversation

@thomaslaurenson

Copy link
Copy Markdown
Contributor

Firstly, very cool project - I have been using a local build against our OpenStack environment. However, one issue for us is that most team member using the standard OS_* environment variables, either sourced from an openrc file or injected per process by a secret manager - I have a password store extension I use (https://github.com/thomaslaurenson/pass-env).

Changes

  • When OS_AUTH_URL is set, the Contexts screen lists an extra context named envvars (name taken from openstacksdk)
  • Activating envvars authenticates with gophercloud from the OS_* variables; everything downstream sees an ordinary context
  • Startup no longer requires a clouds.yaml when OS_AUTH_URL is set; without either, the error and exit code are unchanged
  • README: new "Environment variables" subsection under Usage plus one sentence in the plugin notes (couldn't find a good place for this, but seems to work)

Limitations

  • As with clouds.yaml, user and project are assumed to be in the same domain; use OS_PROJECT_ID otherwise
  • OS_CACERT, OS_CERT and OS_KEY are not applied to this context yet

This was a first effort to add envvar support. I did some testing locally with envvars set, and clouds.yml files in default locations. Open to any feedback and changes, and have "allowed edits by maintainers".

@akyriako
akyriako merged commit f4d21f2 into akyriako:main Oct 2, 2026
2 checks passed
@akyriako

akyriako commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Hej @thomaslaurenson, thanks a lot taking an interest in the project and taking the time to contribute as well. The OS_* env var support is a very useful addition, and I really appreciate the effort you put into the implementation, testing, and docs.

Which other OpenStack services are you using regularly? and are there particular commands/actions you’d like to see implemented in o7k? Real-world feedback in this phase is extremely useful for figuring out where to take the project next.

Thanks again and feel free to ⭐ the repo and spread the word so more OpenStack folks get to know the project.

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.

2 participants