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

OpenShiftControllerManagerConfig: add serviceAccountSigningPublicKeyFile #1893

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sanchezl
Copy link
Contributor

@sanchezl sanchezl commented May 15, 2024

OCM needs access to the service account bound API token signing public key. On standalone, the crypto materials are available in a secret. On Hypershift, the secret is not made available to the hosted clusters. KCM has a similar requirement, which hypershift satisfies by projecting the secret into a volume on the KCM pod and then specifying the appropriate file name via a cli parameter. OCM is completey configured via a config file. This PR adds the serviceAccountSigningPublicKeyFile field to the OCM config file.

Copy link
Contributor

openshift-ci bot commented May 15, 2024

Hello @sanchezl! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@sanchezl sanchezl changed the title ocm config: add serviceAccountSigningPublicKeyFile ocmconfig: add serviceAccountSigningPublicKeyFile May 15, 2024
@sanchezl sanchezl changed the title ocmconfig: add serviceAccountSigningPublicKeyFile OpenShiftControllerManagerConfig: add serviceAccountSigningPublicKeyFile May 15, 2024
@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 15, 2024
@openshift-ci openshift-ci bot requested review from JoelSpeed and mfojtik May 15, 2024 18:21
Copy link
Contributor

openshift-ci bot commented May 15, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sanchezl
Once this PR has been reviewed and has the lgtm label, please assign knobunc for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

// serviceAccountSigningPublicKeyFile specifies the path to a file that contains the current public key of the
// service account token issuer. The issuer signs issued ID tokens with this private key.
// +optional
ServiceAccountSigningPublicKeyFile string `json:"serviceAccountSigningPublicKeyFile,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens when this is omitted?
Does this interact with any other fields nearby?
Is there a format for this? Any characters not allowed?
How long can this be? Infinitely?

I would expect to see each of the above documented in the godoc, and where appropriate validated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JoelSpeed I've updated the doc with the omission info, but as to the questions related to validation, I do not think any further validation is appropriate for a field meant to contain a file name. Beyond, the complexity of coming up with a format that could encompass every valid file name, even a "valid" file name can be wrong if the file does not exist. I see no other validation of file name value fields in this repo.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should at least impose a maximal length to the string, 4096 I think would be reasonable, it's the maximum path length on most Unix based systems

@openshift-ci openshift-ci bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 16, 2024
Copy link
Contributor

openshift-ci bot commented May 16, 2024

@sanchezl: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants