Skip to content

feat(auth): add --no-browser flag and stream auth stderr to broker log#23

Open
brianm wants to merge 4 commits intomainfrom
pr-no-browser
Open

feat(auth): add --no-browser flag and stream auth stderr to broker log#23
brianm wants to merge 4 commits intomainfrom
pr-no-browser

Conversation

@brianm
Copy link
Collaborator

@brianm brianm commented Jan 16, 2026

Summary

  • Add --no-browser flag to epithet auth oidc command for automated testing/headless environments
  • Stream auth command stderr to broker log in real-time (allows users to see auth URL in logs)
  • Pass logger to NewAuth() constructor for proper dependency injection
  • Add os.Stderr.Sync() calls to ensure stderr is flushed when connected to a pipe

Changes included

This PR includes 4 commits since main:

  1. docs: add manual local testing instructions to CLAUDE.md
  2. feat(agent): add --run-dir flag to customize runtime directory
  3. feat(auth): add --browser flag to specify browser for OIDC auth
  4. feat(auth): add --no-browser flag for automated testing

Test plan

  • All existing tests pass (go test ./pkg/auth/oidc/... ./pkg/broker/...)
  • Manual testing: auth URL appears in broker log when using --no-browser
  • Manual testing: user can navigate to URL and complete auth flow

🤖 Generated with Claude Code

Document how to run the full epithet stack locally for end-to-end testing
using oidc-provider-mock, including policy/CA/agent configuration and SSH
with the Include wildcard pattern.

Also adds task files for --run-dir and --browser flags.
Adds the --run-dir flag to the agent command, allowing users to specify
a custom directory for broker socket and agent sockets instead of the
default ~/.epithet/run. The flag supports ~ expansion for convenience.

This is useful for testing scenarios where users want to avoid using
their home directory.

Closes task rcpb0pp0
Adds the --browser flag to 'epithet auth oidc', allowing users to specify
a custom browser command for authentication instead of using the system
default browser. The flag accepts a shell command string, with the URL
appended (e.g., 'open -a "Google Chrome"' on macOS).

This is useful when the system default browser is different from the
user's preferred browser for authentication.

Also updates the manual testing instructions in CLAUDE.md to use both
--run-dir and --browser flags.

Closes task cqaz0g0r
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.

1 participant