-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
api: HTTP APIKey Auth Filter #36709
api: HTTP APIKey Auth Filter #36709
Conversation
Hi @sanposhiho, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
Signed-off-by: Kensei Nakada <[email protected]>
ca1f281
to
b7fe36b
Compare
api/envoy/extensions/filters/http/api_key_auth/v3/api_key_auth.proto
Outdated
Show resolved
Hide resolved
/assign |
Can we potentially just include this functionality in the basic auth filter? We could have config in that filter to use different header names, etc. It seems not needed to have a new filter for this? /wait |
Basically, they have different logic and configuration format. Or we need to extend the meaning of |
The logic is basically identical just swapping out different header names. Doesn't seem worth it to have a new filter just to have different header names. Is there anything else different? |
Both the configration parsing and verification is a little different, although we can abstract them by a virtual interface. 🤔 |
I agree there's some similarity though, wouldn't it be weird to implement the features proposed here into BasicAuth filter since the responsibility of the filter would no longer be "Basic Auth"? |
Yeah, If we insist on to merge them to one, then I think we need to document this very clear in the document of basic auth filter that the filter is not only be used for cc @mattklein123 WDYT |
api/envoy/extensions/filters/http/api_key_auth/v3/api_key_auth.proto
Outdated
Show resolved
Hide resolved
api/envoy/extensions/filters/http/api_key_auth/v3/api_key_auth.proto
Outdated
Show resolved
Hide resolved
api/envoy/extensions/filters/http/api_key_auth/v3/api_key_auth.proto
Outdated
Show resolved
Hide resolved
Signed-off-by: Kensei Nakada <[email protected]>
735a9e3
to
38d893b
Compare
While basic authentication and API key authentication share some similarities, their authentication logic is fundamentally different:
From a UI perspective, it would also be clearer to separate these two methods into different APIs, as they serve distinct purposes and follow different workflows. Some existing arts in this area:
|
api/envoy/extensions/filters/http/api_key_auth/v3/api_key_auth.proto
Outdated
Show resolved
Hide resolved
// The header name to forward an authenticated user. | ||
// | ||
// If it is not specified, the username will not be forwarded. | ||
string forward_username_header = 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.
I suggest removing this at the first run. We can use a metadata to pass it(username or clientid) to later filters if it's required in the future.
api/envoy/extensions/filters/http/api_key_auth/v3/api_key_auth.proto
Outdated
Show resolved
Hide resolved
OK fair enough we can do different filters. |
api/envoy/extensions/filters/http/api_key_auth/v3/api_key_auth.proto
Outdated
Show resolved
Hide resolved
Signed-off-by: Kensei Nakada <[email protected]>
Will make it ready for review again when the implementation is ready. |
api/envoy/extensions/filters/http/api_key_auth/v3/api_key_auth.proto
Outdated
Show resolved
Hide resolved
Signed-off-by: Kensei Nakada <[email protected]>
243bebd
to
1f5cfad
Compare
Updated the PR description + the title |
Signed-off-by: Kensei Nakada <[email protected]>
f0d2169
to
cf09592
Compare
api/envoy/extensions/filters/http/api_key_auth/v3/api_key_auth.proto
Outdated
Show resolved
Hide resolved
Signed-off-by: Kensei Nakada <[email protected]>
1a10ca2
to
39d32d5
Compare
Signed-off-by: Kensei Nakada <[email protected]>
Signed-off-by: Kensei Nakada <[email protected]>
Signed-off-by: Kensei Nakada <[email protected]>
Signed-off-by: wangbaiping(wbpcode) <[email protected]>
Signed-off-by: wangbaiping(wbpcode) <[email protected]>
Signed-off-by: wangbaiping(wbpcode) <[email protected]>
CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to |
Signed-off-by: wangbaiping(wbpcode) <[email protected]>
This PR adds the API for HTTP APIKey Auth Filter that is proposed at #34877 and envoyproxy/gateway#2630.
Commit Message: api: HTTP APIKey Auth Filter
Risk Level: Low (only API)
Testing: WIP (will be done after we agree on the API)
Docs Changes: WIP
Release Notes: WIP
Platform Specific Features: No
Part of: #34877