Skip to content

Implement static ct log support#99

Merged
d-Rickyy-b merged 30 commits intomasterfrom
static-ct
Apr 3, 2026
Merged

Implement static ct log support#99
d-Rickyy-b merged 30 commits intomasterfrom
static-ct

Conversation

@d-Rickyy-b
Copy link
Copy Markdown
Owner

No description provided.

mimi89999 and others added 30 commits January 9, 2026 13:35
Add support for tiled CT logs
Previously, metrics only reflected logs that were present at the initial start of the server. In order to track all the logs watched by certstream, each new log watcher must register with the prometheus metrics.

The whole prometheus metrics logic was rewritten to be centered around a PrometheusExporter struct. The logmetrics file is moved to the metrics package in order to remove import dependencies. Also the prometheus file now relies stronger on dependency injection/callback functions. That prevents issues regarding circular imports.

Also that prevents expensive nested loops to obtain certain data, since each metric now calls a single callback function to obtain the relevant data.

fixes #96
This can be reintroduced with slog as debug output.
The wrong tags broke the links to the git commit comparison.
Seemingly, the sample config file is often used by default. Hence it should not only show off what's possible but also default to sane values. Adding unnecessary additional logs is not sane, so I removed it.
BREAKING CHANGE!

Before this change, we had to map the config and index file (for the recovery feature) individually in order to persist current download progress.

This also prevents permission issues regarding the ct_index file.

Also this commit adds a config.docker.yml in order to have more control over the specific default config for docker containers.
If the baseURL already contains a slash in the end, another slash will be appended which leads to 403 errors.
When using the -create-index-file CLI parameter, previously the latest checkpoint size was not stored in the ct-index file.
fixes #67

Using viper gives us the ability to override options via environment variables. This means that I don't need to provide a config file but can configure the tool fully via env vars. This is especially useful for docker setups.
With `certstream-server-go validate` you can validate a config file before starting the server.
Previously ctIndex was always >= 0, and hence this always evaluated to true. Until we have a better solution, we should just ignore the value of ctIndex at all for the decision whether to continue downloading from a specific point.
@d-Rickyy-b d-Rickyy-b merged commit 7003f1d into master Apr 3, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants