add test/tw/gen-tls-cert pipeline#389
Draft
toabctl wants to merge 3 commits into
Draft
Conversation
A reusable pipeline for fabricating self-signed RSA X.509 cert/key pairs during melange test setup. Replaces the ad-hoc `openssl req -x509 ...` boilerplate that ~340 stereo packages currently inline inside `test/daemon-check-output` setup blocks (webhook serving certs, dummy TLS for exporters, etc.). Inputs: - cn (required), san, key-out, cert-out, days, key-bits Includes a manual test under tests/manual/gen-tls-cert.yaml exercising the minimal, SAN+custom-paths, and key-bits=4096 cases. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
These are throwaway test certs — no reason to default to a 365-day validity. Callers that need longer-lived certs (e.g. clock-skew exercises) can still override via the `days` input. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 day is uncomfortably close to expiry for tests that sit idle in a debug shell or get re-run shortly after build. 7 days keeps the "throwaway" intent while giving more headroom. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test/tw/gen-tls-certpipeline that fabricates self-signed RSA X.509 cert/key pairs for melange test setup.openssl req -x509 ...insidetest/daemon-check-outputsetup blocks (webhook serving certs, dummy TLS for exporters, etc.).cn(required),san,key-out,cert-out,days,key-bits. The pipeline declaresneeds.packages: [openssl]so callers don't have to add it.Example caller usage in a stereo package's test:
Adoption in stereo is a separate sweep — this PR adds the pipeline only.
Test plan
make yam-checkcleanmake test-manual(covers minimal / SAN+custom-paths / key-bits=4096 intests/manual/gen-tls-cert.yaml)