Skip to content

Comments

feat(providers): add JWT Bearer Authorization provider#152

Open
TarasSpashchenko wants to merge 4 commits intomainfrom
feat/jwt-bearer-auth
Open

feat(providers): add JWT Bearer Authorization provider#152
TarasSpashchenko wants to merge 4 commits intomainfrom
feat/jwt-bearer-auth

Conversation

@TarasSpashchenko
Copy link
Collaborator

Summary

Adds JWT Bearer Authorization as a new authentication provider for CodeMie CLI. Users can now configure JWT-based authentication where tokens are provided at
runtime via CLI or environment variables, rather than during setup. This is ideal for environments with external token management systems, CI/CD pipelines, or
testing scenarios.

Changes

  • New bearer-auth provider with simplified setup (only asks for API URL, token provided later)
  • JWT authentication proxy plugin with Bearer token injection and expiration validation
  • --jwt-token CLI option added to all agent commands for runtime token provision
  • JWT health check added to codemie doctor for token validation and expiration monitoring
  • All agents (Claude, Gemini, OpenCode, CodeMie Code) now support bearer-auth provider
  • Shared URL normalization utility (ensureApiBase) for consistent /code-assistant-api suffix handling
  • JWT credential storage with AES-256-CBC encryption matching SSO security standards
  • Configuration follows SSO pattern with codeMieUrl (user input) and baseUrl (full API URL)
  • Comprehensive documentation in docs/AUTHENTICATION.md with setup, usage examples, and troubleshooting

Impact

Before:

# Only SSO authentication
codemie setup  # Browser-based flow
codemie-claude "analyze code"

After:

# New JWT option during setup
codemie setup
? Choose provider: Bearer Authorization
? CodeMie base URL: https://codemie.lab.epam.com
✓ Configuration saved

Provide token at runtime

export CODEMIE_JWT_TOKEN="eyJhbG..."
codemie-claude "analyze code"

Or via CLI

codemie-claude --jwt-token "eyJhbG..." "analyze code"

Users benefit from simplified setup for JWT environments and flexible token management at runtime.

Checklist

  • Self-reviewed
  • Manual testing performed
  • Documentation updated
  • No breaking changes

@TarasSpashchenko TarasSpashchenko requested review from 8nevil8 and codemie-ai and removed request for 8nevil8 February 16, 2026 12:49
TarasSpashchenko and others added 4 commits February 16, 2026 13:51
…tion

- Add new JWT Bearer Authorization provider (bearer-auth)
- Implement setup flow asking only for API URL (token provided at runtime)
- Add URL normalization utility (ensureApiBase) to handle /code-assistant-api suffix
- Update agent plugins to support bearer-auth provider (Claude, Gemini, OpenCode, CodeMie Code)
- Skip apiKey validation for JWT and SSO authentication methods in AgentCLI
- Add codeMieUrl field to JWT config following SSO pattern
- Remove redundant apiUrl from jwtConfig (uses baseUrl instead)
- Add jwtConfig support to LegacyConfig type

Users can now configure JWT authentication with:
  codemie setup -> Bearer Authorization
  codemie-claude --jwt-token <token> --base-url <url>

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
- Add comprehensive JWT authentication section to AUTHENTICATION.md
- Document JWT setup flow, token provision methods, and validation
- Include CI/CD pipeline examples and troubleshooting guide
- Add JWT vs SSO comparison table
- Update README.md to mention JWT Bearer Auth in provider list

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
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