feat(auth): add mTLS and custom header support for A2A connections#33
feat(auth): add mTLS and custom header support for A2A connections#33dobesv wants to merge 1 commit intoalDuncanson:mainfrom
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
Hey @dobesv, I'm not trying to leave you hanging here. I'm just thinking about how I want to implement this feature—sessions and agent profiles (or saved agents)—and do so in a way that's not only a good user experience but is also scalable. I don't want to hold off on this until I finish the TUI redesign, so I've cherry-picked your mTLS contribution into my auth/profiles/session branch of work: https://github.com/alDuncanson/Handler/tree/auth-profiles-and-sessions and I'm working on getting that in soon 👍🏻 |
|
No worries I just threw this in here as an idea, do with it as you will. I'm not even sure at this point if handler will fit into my workflow in any way. |
|
I'll close this for now - you can use it as a reference for whatever you're working on. |
Summary
auth setappear as clickable buttons for one-click connectChanges
mTLS Authentication
AuthType.MTLSwithcert_path,key_path,ca_cert_pathfields onAuthCredentialsbuild_ssl_context()creates SSL context for httpx clientcreate_mtls_auth()factory with file existence validation--cert,--key,--ca-certoptions onauth setcert_path/key_path/ca_cert_pathparams on all auth-bearing toolsCustom Headers
custom_headersdict field onAuthCredentials, merged intoto_headers()--header/-H "Name: Value"onauth setandmessage send/streamparse_header_string()helper forName: Valueformatcustom_headersdict param on all toolsSaved Agents Panel (TUI)
AgentCardPanelplaceholder replaced with clickable list of saved agents from~/.handler/sessions.jsoncard,task,message) now pass saved credentials tobuild_http_client()for transport-level authBug Fixes
to_headers()against empty bearer value (Authorization: Bearerleak)set_credentials()--authenticatedflag fromcard get(credentials always applied for transport)Testing
ruff check,ruff format,ty checkall clean