This page provides a high-level overview of the shared utility packages and helper tools used across the Certimate codebase. These utilities provide standardized implementations for common tasks such as multi-process communication, SSH management, certificate parsing, and cryptographic operations, ensuring consistency between the backend and frontend.
The codebase segregates utilities into two primary areas: internal/tools for internal backend infrastructure and pkg/utils for general-purpose helpers. The frontend also maintains a set of specialized utilities for browser-side certificate handling, UI logic, and internationalization.
Certimate uses a multi-process execution model for sensitive operations like ACME issuance to isolate dependencies and prevent global state pollution. The mproc package facilitates secure Inter-Process Communication (IPC) using encrypted temporary files.
Sender: Generates a random AES key, encrypts input parameters, and spawns a child process using the current executable with the intercmd subcommand.Receiver: Decrypts the input file provided via command-line flags, executes a registered ReceiverHandler, and writes the encrypted result back to an output file.The certapply command is a primary consumer of this pattern, allowing the ACME logic to run in a separate process space.
Certimate provides specialized clients for interacting with external infrastructure:
Client struct that wraps ftp.ServerConn.go-mail library, supporting SSL/TLS and authentication mechanisms internal/tools/smtp/client.go64-102The following diagram maps high-level backend utility concepts to their corresponding implementations in the Go source.
Sources: internal/tools/s3/client.go40-50 internal/tools/ssh/client.go23-34 internal/tools/smtp/client.go44-62 pkg/utils/tls/config.go30-34 pkg/logging/handler_hook.go26-46
The backend utility collection covers low-level Go helpers for certificate manipulation, networking, and system interaction.
HookHandler for slog that allows intercepting log records via a WriteFunc, used for piping workflow logs to the database pkg/logging/handler_hook.go10-24smtp tool pkg/core/notifier/providers/email/email.go79-82For deep technical details on these packages, see Backend Utilities.
The frontend (React/TypeScript) includes utilities to handle file I/O, certificate validation, and internationalization.
zod and antd-zod for client-side validation of provider configurations. For example, the email provider schema validates hostnames and port numbers ui/src/components/access/forms/AccessConfigFieldsProviderEmail.tsx126-140i18next and react-i18next for translating labels and error messages ui/src/components/access/forms/AccessConfigFieldsProviderEmail.tsx1-12This diagram associates frontend utility concepts with their TypeScript domain models and potential utility locations.
Sources: ui/src/components/access/forms/AccessConfigFieldsProviderEmail.tsx7 ui/src/components/access/forms/AccessConfigFieldsProviderEmail.tsx126-140 ui/src/components/access/forms/AccessConfigFieldsProviderEmail.tsx12
For details on the frontend implementation, see Frontend Utilities.
| Package/Module | Purpose | Primary Files |
|---|---|---|
smtp | SMTP client wrapper for email notifications | internal/tools/smtp/client.go |
s3 | S3-compatible storage client for HTTP-01 challenges | internal/tools/s3/client.go |
ssh | SSH client for remote execution and file transfer | internal/tools/ssh/client.go |
logging | slog hook handler for record interception | pkg/logging/handler_hook.go |
tls | Standardized TLS configuration factory | pkg/utils/tls/config.go |
email | Email notification provider implementation | pkg/core/notifier/providers/email/email.go |
s3challenger | S3-based ACME HTTP-01 challenge provider | pkg/core/certifier/challengers/http01/s3/s3.go |
Sources: internal/tools/smtp/client.go1-16 internal/tools/s3/client.go1-21 internal/tools/ssh/client.go1-17 pkg/logging/handler_hook.go1-24 pkg/utils/tls/config.go1-5 pkg/core/notifier/providers/email/email.go1-12 pkg/core/certifier/challengers/http01/s3/s3.go1-8
Refresh this wiki
This wiki was recently refreshed. Please wait 7 days to refresh again.