SRVOCF-1078: Reduce deploy ServiceAccount token lifetime to a configurable 30 days - #174
Conversation
The deploy ServiceAccount token was minted with a 365 day (1 year) lifetime and stored in a GitHub Actions secret. A credential that long-lived is unnecessary exposure if the secret leaks, since it far outlasts the interval between deployments. Reduce the default lifetime to 30 days and make it configurable via the SA_TOKEN_EXPIRY env var, accepting common duration notation such as 30d, 10h, or 7d12h. The value is wired through a Helm value (plugin.saTokenExpiry) into the deployment's container env. The token is still a one-shot credential with no in-product refresh, so a function's CI stops deploying once the token expires. A user-triggered re-issue path and keyless rotation are tracked as follow-ups. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@dsimansk: This pull request references SRVOCF-1078 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "5.1.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@dsimansk: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Summary
(1 year) to 30 days, shrinking the exposure window for the credential
stored in the repo's GitHub Actions KUBECONFIG secret.
accepting common duration notation (30d, 10h, 7d12h). Empty falls back
to the 30 day default. Exposed as the plugin.saTokenExpiry Helm value
and wired into the deployment container env.
RequestToken; add unit tests for the parser and for the configured
expiry reaching the TokenRequest.
Fixes SRVOCF-1078
Checklist
docs/ARCHITECTURE.md(if there are relevant changes to our layered architecture)Additional Info
The token is still a one-shot credential with no in-product refresh, so a
function's CI stops deploying once the token expires. A user-triggered
re-issue path and keyless rotation (GitHub OIDC federation or a GitOps
pull model) are tracked as follow-ups on the Jira issue; they are out of
scope here.