fix(ci): text=auto catch-all for line endings, and qualify the genrsa pitfall - #392
Merged
Conversation
.gitattributes forced `text eol=lf` for eight extensions and nothing else, so every text type added since — *.tsx, *.mjs, *.mts, *.astro, *.mdx, *.css, *.sql, *.toml, *.rs — fell through it. On a checkout with core.autocrlf=true (the Windows default) those check out CRLF against LF blobs, and both `prettier --check` and the `prettier/prettier` ESLint rule reject them with `Delete ␍` on lines the developer never touched. `git status` stays clean throughout, because the CRLF is introduced by checkout normalisation rather than by an edit, so the failure carries no diff to explain itself. CI runs ubuntu-latest and never reproduces it. Enumerating extensions is the bug, not the missing four: the list was correct when written and rotted as the tree grew. `* text=auto eol=lf` cannot rot the same way, which is the option #363 asks to consider. Binary types are marked explicitly rather than left to detection, and pnpm-lock.yaml is marked generated. Closes #363 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TopYtHXg4tTs3B2xasjNQR
Both the certification runbook and .env.example warned that `openssl genrsa` emits PKCS#1, which `importPKCS8` rejects. That stopped being true at OpenSSL 3.0 — `genrsa` defaults to PKCS#8 now, and `-traditional` is what produces the old format. Verified locally on 3.6.3: $ openssl genrsa 2048 | head -1 → -----BEGIN PRIVATE KEY----- $ openssl genrsa -traditional 2048 | head -1 → -----BEGIN RSA PRIVATE KEY----- An operator on any current OpenSSL cannot reproduce the pitfall as written, which puts the rest of the key guidance in doubt for no reason. The underlying requirement is unchanged and stays stated plainly: private keys MUST be PKCS#8 (key-management.ts calls importPKCS8 directly), `openssl genpkey` stays the recommendation because it emits PKCS#8 on every version, and the `pkcs8 -topk8 -nocrypt` conversion recipe stays for anyone holding a PKCS#1 key. Only the version-free claim about genrsa's default is corrected. Closes #364 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TopYtHXg4tTs3B2xasjNQR
…enrsa-pitfall # Conflicts: # .gitattributes
✅ Deploy Preview for qauth-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Closes #363
Closes #364
Two small operator-facing corrections from
documentation-findings.md, kept in one PR becauseeach is a few lines and neither touches runtime code.
fix(ci)—.gitattributesline endings (#363).gitattributesforcedtext eol=lffor eight extensions and nothing else. Every text typeadded since —
*.tsx,*.mjs,*.mts,*.astro,*.mdx,*.css,*.sql,*.toml,*.rs—fell through it. On a checkout with
core.autocrlf=true(the Windows default) those land CRLFagainst LF blobs, and both
prettier --checkand theprettier/prettierESLint rule reject themwith
Delete ␍on lines the developer never touched.git statusstays clean throughout, becausecheckout normalisation introduced the CRLF rather than an edit — so the failure carries no diff to
explain itself. CI runs
ubuntu-latestand never reproduces it.The enumeration is the bug, not the four missing entries. The list was correct when written and
rotted as the tree grew;
* text=auto eol=lfcannot rot the same way. That is the option #363 asksto consider, and it is the one taken here. Binary types are marked explicitly rather than left to
detection, and
pnpm-lock.yamlis marked generated.Verification — the exact
check-attrevidence from the issue, inverted:git add --renormalize .produced no changes — committed blobs were already LF, as the issuerecords — so there is no renormalisation commit to review.
docs(config)— thegenrsaPKCS#1 pitfall (#364)docs/oidf-op-certification-runbook.md:44and.env.example:226both warned thatopenssl genrsaemits PKCS#1. Untrue since OpenSSL 3.0. Verified locally on 3.6.3:
The underlying requirement is unchanged and still stated plainly: private keys MUST be PKCS#8
(
key-management.tscallsimportPKCS8directly),openssl genpkeystays the recommendationbecause it emits PKCS#8 on every version, and the
pkcs8 -topk8 -nocryptconversion recipestays for anyone holding a PKCS#1 key. Only the version-free claim is corrected.
Note
#364's third task — "check whether any other doc repeats it" — is satisfied for
main(
grep -rn genrsafinds only these two). But #389 introduces three new occurrences on itsbranch:
apps/docs-site/src/content/docs/operate/keys.mdstates the version split correctly,while
operate/docker.md:55,docker.md:512andapps/auth-server/src/openapi-export.ts:55still carry the unqualified claim. Those want a follow-up commit on #389 before it merges —
flagging rather than editing a PR that is already under review.
Testing
nx run-many -t test typecheck lint -p server-federation— cleangit check-attrverified above;git add --renormalize .is a no-opcore.autocrlf=true— no Windows machine here. Thecheck-attroutput is the mechanism the issue identifies, so this is the right fix, but theend-to-end confirmation in fix(ci): .gitattributes omits .tsx/.mjs/.astro/.css, so lint fails locally on Windows with CRLF errors #363's third task remains unrun.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TopYtHXg4tTs3B2xasjNQR