docs: rewrite README and add Claude Code guidance #15

Manually merged
heiko merged 6 commits from dev into master 2026-04-29 10:25:17 +02:00
Owner

Summary

  • Rewrite README.md to reflect the current state of the project (Go 1.26, correct repo URL, all flags documented, API reference, hook scripts, PKCS12 support, password notation, known issues)
  • Add .claude/CLAUDE.md for Claude Code tooling context
  • Bump go.mod to 1.26.2
  • Fix misleading wildcard in client config example (authorization uses exact match, not globs)

Test plan

  • Verify all documented flags match cert-proxy-server -help and cert-proxy-client -help output
  • Verify issue tracker links resolve
  • Confirm make test passes
## Summary - Rewrite README.md to reflect the current state of the project (Go 1.26, correct repo URL, all flags documented, API reference, hook scripts, PKCS12 support, password notation, known issues) - Add `.claude/CLAUDE.md` for Claude Code tooling context - Bump go.mod to 1.26.2 - Fix misleading wildcard in client config example (authorization uses exact match, not globs) ## Test plan - [ ] Verify all documented flags match `cert-proxy-server -help` and `cert-proxy-client -help` output - [ ] Verify issue tracker links resolve - [ ] Confirm `make test` passes
Update outdated references (Go 1.14 → 1.26, old repo URL), document
all server/client flags, hook scripts, PKCS12 support, password
notation, API endpoints, and add Known Issues section linked to
the issue tracker.
The authorization check does exact domain matching (map lookup),
not glob/wildcard matching. The *.example.org example would confuse
administrators into thinking wildcards are supported.
heiko left a comment

[AI-generated review]

Overall: Approve. Massive improvement — well-structured, accurate against the codebase, and useful for both end-users and administrators. Docs-only PR with one trivial go.mod patch bump, no functional code changes.

See inline comments for suggestions.

**[AI-generated review]** Overall: **Approve.** Massive improvement — well-structured, accurate against the codebase, and useful for both end-users and administrators. Docs-only PR with one trivial `go.mod` patch bump, no functional code changes. See inline comments for suggestions.
@ -0,0 +40,4 @@
| `GET /v1/chain/<domain>` | none | CA chain (public) |
| `GET /v1/fullchain/<domain>` | none | Full chain (public) |
| `GET /v1/privkey/<domain>` | authz | Private key |
| `GET /v1/bundle/<domain>` | authz | PKCS12 bundle (generated on-the-fly via openssl) |
Author
Owner

[AI] Nit: "one domain pattern per line" — the word "pattern" implies glob/wildcard matching, but auth.go:58 does exact map lookup (allowedDomains[ctx[DOMAIN]]). Suggest changing to "one domain per line" for consistency with the wildcard fix in the README.

[AI] **Nit:** "one domain pattern per line" — the word "pattern" implies glob/wildcard matching, but `auth.go:58` does exact map lookup (`allowedDomains[ctx[DOMAIN]]`). Suggest changing to "one domain per line" for consistency with the wildcard fix in the README.
Author
Owner

@claude: please fix

@claude: please fix
@ -55,2 +86,2 @@
git clone http://gitea.schlittermann.de/heiko/cert-proxy
```
The `-ssl.pem` bundle contains the certificate, private key, and CA
certificate in a single PEM file.
Author
Owner

[AI] Suggestion: The old README showed bin/mkssl-pem cert-proxy.example.com cert-proxy — giving a short CN (cert-proxy) with the FQDN as a SAN. This was useful because clients default -servername to the connect hostname. With just one argument, the cert CN will be cert-proxy.example.com, which works if the client connects to that exact hostname. Both are valid, but you may want to mention the SAN variant for cases where the server is reachable under multiple names.

[AI] **Suggestion:** The old README showed `bin/mkssl-pem cert-proxy.example.com cert-proxy` — giving a short CN (`cert-proxy`) with the FQDN as a SAN. This was useful because clients default `-servername` to the connect hostname. With just one argument, the cert CN will be `cert-proxy.example.com`, which works if the client connects to that exact hostname. Both are valid, but you may want to mention the SAN variant for cases where the server is reachable under multiple names.
Author
Owner

@claude: please improve the docs

@claude: please improve the docs
README.md Outdated
@ -197,2 +126,3 @@
```shell
cert-proxy-client -help
cd /etc/cert-proxy/ca
bin/mkssl-pem <client-name>
Author
Owner

[AI] Suggestion: The systemd units source EnvironmentFile=-/etc/default/cert-proxy-{server,client} and pass $OPTS to the binary. Admins can add extra flags there without editing the unit file. A one-liner mentioning this would help:

Additional flags can be set in `/etc/default/cert-proxy-server` (variable `OPTS`).
[AI] **Suggestion:** The systemd units source `EnvironmentFile=-/etc/default/cert-proxy-{server,client}` and pass `$OPTS` to the binary. Admins can add extra flags there without editing the unit file. A one-liner mentioning this would help: ``` Additional flags can be set in `/etc/default/cert-proxy-server` (variable `OPTS`). ```
Author
Owner

@claude: please fix

@claude: please fix
@ -203,0 +172,4 @@
|------|---------|-------------|
| `-connect` | `https://localhost:4433` | Server address |
| `-sslfile` | `client-ssl.pem` | SSL auth file (crt+key+ca) PEM |
| `-certbase` | `certs` | Base directory for downloaded certificates |
Author
Owner

[AI] Suggestion: The PKCS12 hook invocation is documented as <script> deploy_cert <DOMAIN> <BUNDLEFILE> <TIMESTAMP> (3 meaningful args). However, the code at cert/cert.go:243-248 always allocates an 8-element Args slice with empty strings at positions 3-6 — so the actual call is deploy_cert <DOMAIN> "" "" "" "" <TIMESTAMP> with BUNDLEFILE only in the environment. This is likely the root cause of #14. The README documents intended behavior, which is fine, but a parenthetical "(see [#14])" after the PKCS12 example would save admins debugging time.

[AI] **Suggestion:** The PKCS12 hook invocation is documented as `<script> deploy_cert <DOMAIN> <BUNDLEFILE> <TIMESTAMP>` (3 meaningful args). However, the code at `cert/cert.go:243-248` always allocates an 8-element Args slice with empty strings at positions 3-6 — so the actual call is `deploy_cert <DOMAIN> "" "" "" "" <TIMESTAMP>` with BUNDLEFILE only in the environment. This is likely the root cause of #14. The README documents *intended* behavior, which is fine, but a parenthetical "(see [#14])" after the PKCS12 example would save admins debugging time.
Author
Owner

@claude: provide a fix for this issue #14 in a new branch fix/14-pkcs12, and create a separate PR for it.

@claude: provide a fix for this issue #14 in a new branch fix/14-pkcs12, and create a separate PR for it.
- Fix "domain pattern" → "domain" in CLAUDE.md (no glob matching)
- Add $OPTS/EnvironmentFile note for systemd customization
- Document SAN variant for server cert creation
- Reference #14 in PKCS12 hook section
heiko manually merged commit ce9c89f6e3 into master 2026-04-29 10:25:17 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
heiko/cert-proxy!15
No description provided.