Skip to content

Add auth-secure subcommand - #108

Merged
afujiwara-roblox merged 10 commits into
mainfrom
feature/keyring-core-auth
May 1, 2026
Merged

afujiwara-roblox merged 10 commits into
mainfrom
feature/keyring-core-auth

Conversation

@afujiwara-roblox

@afujiwara-roblox afujiwara-roblox commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Store GitHub/GitLab tokens in the OS credential manager (macOS Keychain, Windows Credential Manager) instead of plaintext ~/.foreman/auth.toml
  • Uses keyring-core with platform-specific store crates (apple-native-keyring-store, windows-native-keyring-store, dbus-secret-service-keyring-store)
  • Token lookup checks the OS keyring first, then falls back to auth.toml for backward compatibility
  • Existing github-auth / gitlab-auth commands are unchanged
  • New auth-secure subcommand with add, remove, and migrate actions:
foreman auth-secure add <github|gitlab> [token]                                                                                                                                                                                                    
foreman auth-secure remove <github|gitlab>                                                                                                                                                                                                         
foreman auth-secure remove --all                                                                                                                                                                                                                   
foreman auth-secure migrate                                                                                                                                                                                                                                                                                  

Motivation

Personal access tokens are currently stored in ~/.foreman/auth.toml are plaintext on disk. This change moves token storage to the OS-native credential manager while maintain backwards compatibility with the exisiting auth system

Comment thread src/error.rs
ArtiAAError {
error: ArtifactoryAuthError,
},
KeyringError {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

teeny tiny nit: we refer to the keychain as an auth store elsewhere in the codebase, is this technically conflicting terminology?

@afujiwara-roblox afujiwara-roblox Apr 29, 2026 •

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.

Keychain is the specific MacOs password management system whereas is Keyring is the cross-platform password retrieval library we are using. The naming is slightly confusing but appropriate.

@afujiwara-roblox
afujiwara-roblox merged commit 6bc8e9d into main May 1, 2026
9 checks passed
@afujiwara-roblox
afujiwara-roblox deleted the feature/keyring-core-auth branch May 1, 2026 18:41
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