Skip to content
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

Add datapolicy tags to pkg/kubelet/ #96004

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

serathius
Copy link
Contributor

@serathius serathius commented Oct 29, 2020

/kind feature

What this PR does / why we need it:
This PR adds "datapolicy" tags to golang structures as described in Defend against logging secrets via static analysis. Those tags will be used by for ensuring this data will not be written to logs by Kubernetes system components.

List of datapolicy tags available:

  • security-key - for TLS certificate keys. Keywords: key, cert, pem
  • token - for HTTP authorization tokens. Keywords: token, secret, header, auth
  • password - anything passwordlike. Keywords: password

Special notes for your reviewer:

Due to size of Kubernetes codebase first iteration of tagging was done based on greping for particular keyword. Please ensure that tagged fields do contain type of sensitive data that matches their tag. Feel free to suggest any additional places that you think should be tagged.

Does this PR introduce a user-facing change?:
No

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://github.com/kubernetes/enhancements/issues/1933

/cc @PurelyApplied
/sig instrumentation security
/priority important-soon
/milestone v1.20

@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Oct 29, 2020
@k8s-ci-robot
Copy link
Contributor

@serathius: GitHub didn't allow me to request PR reviews from the following users: PurelyApplied.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/kind feature

What this PR does / why we need it:
This PR adds "datapolicy" tags to golang structures as described in Kubernetes system components logs sanitization KEP. Those tags will be used by for ensuring this data will not be written to logs written by Kubernetes system components.

List of datapolicy tags available:

  • security-key - for TLS certificate keys. Keywords: key, cert, pem
  • token - for HTTP authorization tokens. Keywords: token, secret, header, auth
  • password - anything passwordlike. Keywords: password

Special notes for your reviewer:

Due to size of Kubernetes codebase first iteration of tagging was done based on greping for particular keyword. Please ensure that tagged fields do contain type of sensitive data that matches their tag. Feel free to suggest any additional places that you think should be tagged.

Does this PR introduce a user-facing change?:
No

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/1753-logs-sanitization

/cc @PurelyApplied
/sig instrumentation security
/priority important-soon
/milestone v1.20

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. labels Oct 29, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Oct 29, 2020
@k8s-ci-robot k8s-ci-robot added sig/security Categorizes an issue or PR as relevant to SIG Security. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. labels Oct 29, 2020
@serathius
Copy link
Contributor Author

/assign @yujuhong

@serathius
Copy link
Contributor Author

/retest

@serathius
Copy link
Contributor Author

ping @yujuhong

@serathius
Copy link
Contributor Author

/milestone clear

@k8s-ci-robot k8s-ci-robot removed this from the v1.20 milestone Nov 10, 2020
@ehashman ehashman added this to Needs Reviewer in SIG Node PR Triage Jan 6, 2021
Copy link
Member

@ehashman ehashman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

As per #95997 I'm assuming the StaticPodURLHeader headers could potentially contain auth info.

@ehashman ehashman moved this from Needs Reviewer to Needs Approver in SIG Node PR Triage Jan 6, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 6, 2021
@dashpole
Copy link
Contributor

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 13, 2021
@serathius serathius closed this May 29, 2021
@ehashman
Copy link
Member

ehashman commented Mar 3, 2022

/remove-lifecycle rotten
/reopen

@k8s-ci-robot k8s-ci-robot reopened this Mar 3, 2022
@k8s-ci-robot
Copy link
Contributor

@ehashman: Reopened this PR.

In response to this:

/remove-lifecycle rotten
/reopen

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Mar 3, 2022
@ehashman
Copy link
Member

ehashman commented Mar 3, 2022

/assign @liggitt

see #107121 (review)

@liggitt liggitt added the api-review Categorizes an issue or PR as actively needing an API review. label Mar 3, 2022
@liggitt liggitt added this to In progress in API Reviews Mar 3, 2022
@@ -92,7 +92,7 @@ type KubeletConfiguration struct {
// staticPodURL is the URL for accessing static pods to run
StaticPodURL string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the URL can contain sensitive info as well as query parameters, right?

@liggitt
Copy link
Member

liggitt commented Mar 3, 2022

The description links to a KEP marked as deprecated. Is there an updated link or doc describing why we're adding these tags (for static analysis only, I assume)

@liggitt
Copy link
Member

liggitt commented Mar 3, 2022

/approve
from API perspective, adding the tag is fine
/hold for additional tag on the URL field and an updated PR description to a non-deprecated doc/reference

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 3, 2022
@liggitt liggitt moved this from In progress to API review completed, 1.24 in API Reviews Mar 3, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ehashman, liggitt, mrunalp, serathius

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 3, 2022
@ehashman
Copy link
Member

ehashman commented Mar 3, 2022

The description links to a KEP marked as deprecated. Is there an updated link or doc describing why we're adding these tags (for static analysis only, I assume)

While the linked KEP is deprecated, these are still used by the stable KEP 1933. Let me see if someone can edit that into the docs release note.

@liggitt
Copy link
Member

liggitt commented Mar 3, 2022

I updated the PR description to link to that KEP instead, thanks

@ehashman
Copy link
Member

ehashman commented Mar 3, 2022

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 3, 2022
@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

1 similar comment
@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

@serathius
Copy link
Contributor Author

The description links to a KEP marked as deprecated. Is there an updated link or doc describing why we're adding these tags (for static analysis only, I assume)

Done

@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

2 similar comments
@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

@k8s-ci-robot k8s-ci-robot merged commit 5d6ef39 into kubernetes:master Mar 4, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.24 milestone Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review Categorizes an issue or PR as actively needing an API review. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/security Categorizes an issue or PR as relevant to SIG Security. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: API review completed, 1.24
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

10 participants