-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Do not expose the AWS role external id in the logs #4706
Do not expose the AWS role external id in the logs #4706
Conversation
|
Welcome @iul1an! |
Hi @iul1an. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
/lgtm |
@@ -86,7 +86,7 @@ type Config struct { | |||
AWSZoneTagFilter []string | |||
AWSAssumeRole string | |||
AWSProfiles []string | |||
AWSAssumeRoleExternalID string | |||
AWSAssumeRoleExternalID string `secure:"yes"` |
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.
why do we need this?
I guess we do not need this, so please cleanup
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.
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.
relevant code:
external-dns/pkg/apis/externaldns/types.go
Lines 37 to 39 in f5f7d23
const ( passwordMask = "******" ) external-dns/pkg/apis/externaldns/types.go
Lines 375 to 394 in f5f7d23
func (cfg *Config) String() string { // prevent logging of sensitive information temp := *cfg t := reflect.TypeOf(temp) for i := 0; i < t.NumField(); i++ { f := t.Field(i) if val, ok := f.Tag.Lookup("secure"); ok && val == "yes" { if f.Type.Kind() != reflect.String { continue } v := reflect.ValueOf(&temp).Elem().Field(i) if v.String() != "" { v.SetString(passwordMask) } } } return fmt.Sprintf("%+v", temp) }
f5f7d23
to
454fce1
Compare
454fce1
to
90c15d7
Compare
@mloiseleur Can you review again, please? I had to rebase. |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: szuecs The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
debug logs enable the user to figure out if the role id is wrong or something like that, so seems fine. |
Description
This change conceals the AWS
ExternalId
from application logs to mitigate security risks, as exposing this identifier could enable attackers to exploit it for unauthorized cross-account access or privilege escalation.Fixes #4277
Checklist