-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix(spec): Fix/1251 clarify authentication scheme #1256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ub.com/a2aproject/A2A into fix/1251-clarify-authentication-scheme
Summary of ChangesHello @darrelmiller, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on improving the clarity and precision of documentation within the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request improves the clarity of comments related to push notification authentication in the a2a.proto specification. The changes fix a grammatical error and provide much more specific and helpful descriptions for authentication schemes and credentials, including links to relevant standards. While the changes are a definite improvement, they also bring to light a potential ambiguity in how credentials should be handled when multiple authentication schemes are specified. I've added a comment to discuss this further.
| message AuthenticationInfo { | ||
| // A list of supported authentication schemes (e.g., 'Basic', 'Bearer'). | ||
| // HTTP Authentication Schemes from the [IANA registry](https://www.iana.org/assignments/http-authschemes/). | ||
| // Common values: `Bearer`, `Basic`, `Digest`. Scheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1). | ||
| repeated string schemes = 1 [(google.api.field_behavior) = REQUIRED]; | ||
| // Optional credentials | ||
| // Push Notification credentials. Format depends on the scheme (e.g., token for Bearer). | ||
| string credentials = 2; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the updated comments provide much-needed clarity, they also highlight a potential ambiguity in the design of AuthenticationInfo. The schemes field is a repeated string, allowing a client to specify multiple supported authentication schemes for its webhook (e.g., Bearer and Basic). However, the credentials field is a single string.
This becomes problematic because the format of credentials is often scheme-specific. For example, a Bearer token is different from Basic auth credentials (base64(user:pass)).
How is an agent supposed to use the single credentials string if multiple schemes are listed? It's unclear which scheme the credentials belong to or how to format the Authorization header.
To resolve this, you could consider one of the following:
-
Clarify in comments (non-breaking): Add a comment recommending that clients specify only one scheme in the
schemeslist if credentials are required, to avoid ambiguity. -
Refactor the message (breaking change): A more robust long-term solution would be to refactor this message to explicitly link credentials to their scheme. For example:
message AuthSchemeWithCredentials { string scheme = 1; string credentials = 2; } message AuthenticationInfo { repeated AuthSchemeWithCredentials schemes = 1; }
Given this PR is focused on clarification, option 1 might be more appropriate for now. A follow-up issue could be created to discuss a potential breaking change for a future version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@darrelmiller Gemini makes a good point here. Maybe not the specific refactor it suggests, but it could make sense to use AuthenticationInfo as a repeated field in PushNotificationConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@holtskinner Yes, we need to fix this. I would choose to remove the repeated completely. Why would a calling agent provide multiple options for the server agent to use, considering it is providing all the information needed for the server agent to authenticate the callback. I think a single scheme should be sufficient.
|
/vote |
Vote created@muscariello has called for a vote on The members of the following teams have binding votes:
Non-binding votes are also appreciated as a sign of support! How to voteYou can cast your vote by reacting to
Please note that voting for multiple options is not allowed and those votes won't be counted. The vote will be open for |
Vote statusSo far Summary
Binding votes (1)
|
2 similar comments
Vote statusSo far Summary
Binding votes (1)
|
Vote statusSo far Summary
Binding votes (1)
|
Vote statusSo far Summary
Binding votes (2)
|
13 similar comments
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
5 similar comments
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Vote statusSo far Summary
Binding votes (2)
|
Fixes #1251