-
Notifications
You must be signed in to change notification settings - Fork 394
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
feat: basic auth impl #2224
feat: basic auth impl #2224
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2224 +/- ##
==========================================
- Coverage 64.49% 64.22% -0.27%
==========================================
Files 111 112 +1
Lines 15482 15668 +186
==========================================
+ Hits 9985 10063 +78
- Misses 4881 4964 +83
- Partials 616 641 +25 ☔ View full report in Codecov by Sentry. |
5542caa
to
c4001c3
Compare
/retest |
return perRouteFilterName(basicAuthFilter, route.Name) | ||
} | ||
|
||
func basicAuthConfig(route *ir.HTTPRoute) *basicauthv3.BasicAuth { |
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.
shouldnt we be sending the data via SDS ?
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.
The password is hashed and the user list is annotated as sensitive data, so it won't be exposed to Envoy config dump.
"http_filters": [
{
"name": "envoy.filters.http.basic_auth",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.basic_auth.v3.BasicAuth",
"users": {
"inline_string": "[redacted]"
}
}
},
message BasicAuth {
// Username-password pairs used to verify user credentials in the "Authorization" header.
// The value needs to be the htpasswd format.
// Reference to https://httpd.apache.org/docs/2.4/programs/htpasswd.html
config.core.v3.DataSource users = 1 [(udpa.annotations.sensitive) = true];
}
[(udpa.annotations.sensitive) = true]
to denote sensitive fields that should be redacted in output such as logging or configuration dumps.
c2b407f
to
5b79bbd
Compare
Signed-off-by: huabing zhao <[email protected]> add referenced secrets to resource Signed-off-by: huabing zhao <[email protected]> change string to []byte Signed-off-by: huabing zhao <[email protected]>
7574319
to
f8258db
Compare
/retest |
9d90711
to
ccc69cb
Compare
Signed-off-by: huabing zhao <[email protected]>
ccc69cb
to
237b964
Compare
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.
LGTM thanks !
Related to: #1660
close #2226
@saltbo