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

encryptionconfig: detect typos #124912

Merged
merged 1 commit into from
May 20, 2024

Conversation

enj
Copy link
Member

@enj enj commented May 16, 2024

/kind bug
/kind api-change
/triage accepted
/sig auth
/assign liggitt

kube-apiserver: the `--encryption-provider-config` file is now loaded with strict deserialization, which fails if the config file contains duplicate or unknown fields. This protects against accidentally running with config files that are malformed, mis-indented, or have typos in field names, and getting unexpected behavior. When `--encryption-provider-config-automatic-reload` is used, new encryption config files that contain typos after the kube-apiserver is running are treated as invalid and the last valid config is used.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API triage/accepted Indicates an issue or PR is ready to be actively worked on. labels May 16, 2024
@k8s-ci-robot k8s-ci-robot requested a review from aramase May 16, 2024 16:45
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 16, 2024
@k8s-ci-robot k8s-ci-robot added sig/auth Categorizes an issue or PR as relevant to SIG Auth. area/apiserver approved Indicates a PR has been approved by an approver from all required OWNERS files. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels May 16, 2024
@enj
Copy link
Member Author

enj commented May 16, 2024

/hold

For API review since this is not technically backwards compatible.

@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 May 16, 2024
@liggitt
Copy link
Member

liggitt commented May 16, 2024

some prior art linked from #82924:

The consequences of typos in this config file are Really Bad™, so I think there's good cause to be strict. I'm trying to think if there's any benefit to phasing this in over time at all... the only people an immediate tightening would impact in a problematic way are folks who upgraded their API server with no test of their existing invalid config.

Signed-off-by: Monis Khan <mok@microsoft.com>
@enj
Copy link
Member Author

enj commented May 16, 2024

I'm trying to think if there's any benefit to phasing this in over time at all...

I do not think people would notice a warning in the logs, and if someone really did not care about the typo and just wanted the server to start, they could delete the lines that were invalid.

@liggitt
Copy link
Member

liggitt commented May 16, 2024

I'm trying to think if there's any benefit to phasing this in over time at all...

I do not think people would notice a warning in the logs, and if someone really did not care about the typo and just wanted the server to start, they could delete the lines that were invalid.

I think I agree

@enj
Copy link
Member Author

enj commented May 16, 2024

/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 May 16, 2024
@k8s-triage-robot
Copy link

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

@liggitt
Copy link
Member

liggitt commented May 20, 2024

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 20, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 12cec93fdf914ac783aa61a3f6192cf1670d85b7

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enj, liggitt

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 merged commit 765e7ef into kubernetes:master May 20, 2024
15 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.31 milestone May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: Closed / Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants