Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
cd87941
refactor: better handling of reverse proxy headers
d-Rickyy-b Apr 9, 2026
887cb71
refactor: use helper method for generating an IP whitelist
d-Rickyy-b Apr 9, 2026
75ac2df
docs: add trusted_proxies option and comments to sample config
d-Rickyy-b Apr 9, 2026
00e7250
fix(static-ct): defer partial tile fetching
d-Rickyy-b Apr 19, 2026
cd48ef0
build: reformat goreleaser config
d-Rickyy-b May 1, 2026
dacd033
build: run build workflow on pushes to dev branch
d-Rickyy-b May 1, 2026
b062edc
Merge branch 'reverse-proxy' into dev
d-Rickyy-b May 1, 2026
4b3547f
refactor: stop background task when context is canceled
d-Rickyy-b May 1, 2026
31d74d8
test(logmetrics): add various unit tests
d-Rickyy-b May 11, 2026
80fcbbe
fix(logmetrics): prevent nil pointer in m.index
d-Rickyy-b May 11, 2026
30c441f
refactor: merge multiple log lines into one
d-Rickyy-b May 11, 2026
3ec9251
refactor: update batch size from 100 to 256 for rfc6962 logs
d-Rickyy-b May 12, 2026
36f197e
refactor: add logging for unregistering clients
d-Rickyy-b May 12, 2026
ffaaedb
refactor: reformat code
d-Rickyy-b May 12, 2026
3c07493
test: handle errors in test cases properly
d-Rickyy-b May 12, 2026
96ace02
docs: add changes to changelog
d-Rickyy-b May 12, 2026
27bb5c6
refactor: use proper variable name
d-Rickyy-b May 12, 2026
9b3b093
Merge branch 'dev' into static-ct-backoff
d-Rickyy-b May 13, 2026
0fe6a1e
Merge pull request #106 from d-Rickyy-b/static-ct-backoff
d-Rickyy-b May 13, 2026
e53d468
refactor: reformat code and use slices package
d-Rickyy-b May 13, 2026
8e7c090
test(ct-tiled): add test for encodeTilePath
d-Rickyy-b May 13, 2026
cbbd438
fix: properly handle uint64-int64 conversions
d-Rickyy-b May 13, 2026
5984ab9
refactor(ct-watcher): wrap error
d-Rickyy-b May 13, 2026
df0ce9e
refactor: decrease code nesting by reversing condition
d-Rickyy-b May 13, 2026
aac6364
refactor: reformat test code
d-Rickyy-b May 13, 2026
3d94136
refactor: disable tile fetching logging
d-Rickyy-b May 13, 2026
258c28d
chore: update golangci config
d-Rickyy-b May 13, 2026
15fcfcc
build: update goreleaser config to properly handle dev branch builds
d-Rickyy-b May 13, 2026
fa78b6b
build: add own dev runner config to github action release_build
d-Rickyy-b May 13, 2026
f6219d9
build: revert goreleaser to version "latest"
d-Rickyy-b May 13, 2026
973d48b
chore: add task for building arm binary
d-Rickyy-b Jun 30, 2026
e3962de
docs: update changelog
d-Rickyy-b Jul 5, 2026
c8bd735
fix: ensure all additionalLogs entries are processed correctly
d-Rickyy-b Jul 5, 2026
55627b7
test: remove print statement from unit test
d-Rickyy-b Jul 5, 2026
092efbb
refactor: improve LogListFetcher by using interface and struct
d-Rickyy-b Jul 5, 2026
e57d3f6
refactor: centralize log list logic
d-Rickyy-b Jul 5, 2026
170fbeb
feat: add ability to exclude log operators or specific logs
d-Rickyy-b Jul 5, 2026
37c32a9
refactor: reformat ct-tiled.go
d-Rickyy-b Jul 5, 2026
69b24b3
build: update setup-go in release_build workflow to v6
d-Rickyy-b Jul 5, 2026
bcfc0af
docs: fix typo in docker-compose config
d-Rickyy-b Aug 3, 2025
6865b6b
feat: first implementation for streaming proessors such as kafka
d-Rickyy-b Aug 3, 2025
8e7e430
chore: surround yaml strings by quotes
d-Rickyy-b Aug 3, 2025
0fdcb45
docs: add missing options to sample config
d-Rickyy-b Aug 3, 2025
6703a32
fix: add missing imports and sort them
d-Rickyy-b Aug 3, 2025
28bfc2a
docs: add comments for config
d-Rickyy-b Aug 4, 2025
92d983a
feat: add certprocessor interface
d-Rickyy-b Aug 5, 2025
e422401
feat: implement NSQ client
d-Rickyy-b Aug 5, 2025
66ba556
refactor: remove unnecessary log
d-Rickyy-b Aug 5, 2025
38c53a1
refactor: change "kafka" in comments to "nsq"
d-Rickyy-b Aug 5, 2025
543b98b
fix: broken code due to rebase
d-Rickyy-b Nov 23, 2025
dea5349
refactor: multiple code fixes after rebase
d-Rickyy-b Jul 6, 2026
d214a0c
refactor: fix typo
d-Rickyy-b Jul 6, 2026
52a5c91
refactor: fix config to use mapstructure
d-Rickyy-b Jul 6, 2026
c178128
feat: add compression options for kafka
d-Rickyy-b Jul 7, 2026
0f96e59
feat: batch kafka messages for efficiency
d-Rickyy-b Jul 7, 2026
d66529c
refactor: split config into multiple individual files
d-Rickyy-b Jul 10, 2026
8fc04de
refactor: rename config variable to cfg
d-Rickyy-b Jul 12, 2026
4d005db
refactor: make stream type configurable for stream processing
d-Rickyy-b Jul 12, 2026
258a6c5
refactor(nsqclient): improve formatting and error handling
d-Rickyy-b Jul 12, 2026
4cd6c16
refactor(nsqclient): minor logic fixes
d-Rickyy-b Jul 12, 2026
fec2d29
feat(nsqclient): add batch processing feature
d-Rickyy-b Jul 12, 2026
f8ca66e
refactor(config.sample.yml): add new options to sample config
d-Rickyy-b Jul 12, 2026
0c52b42
refactor: improve streamprocessing struct and methods
d-Rickyy-b Jul 12, 2026
4cf6d25
feat: implement custom exponential backoff handler
d-Rickyy-b Jul 13, 2026
4cbf903
feat(kafkaclient): improve error handling and logging
d-Rickyy-b Jul 13, 2026
748cf7e
chore: add task to run the server
d-Rickyy-b Jul 13, 2026
8120312
refactor: set default kafka batch size to 50
d-Rickyy-b Jul 13, 2026
0ddf935
docs: reformat and update changelog for 1.10.0
d-Rickyy-b Jul 13, 2026
b5b5d11
refactor: rename broadcastmanager to dispatcher
d-Rickyy-b Jul 13, 2026
09c6af8
Merge pull request #112 from d-Rickyy-b/kafka
d-Rickyy-b Jul 13, 2026
0423f61
fix(static-ct): make ctIndex consistently the next entry to process
filippo-agent Sep 9, 2026
b1dd703
Merge pull request #114 from filippo-agent/fix-partial-refetch
d-Rickyy-b Sep 9, 2026
783a3a3
chore: bump version to 1.10.0
d-Rickyy-b Sep 10, 2026
ed0c471
refactor: simplify code for easier extendability
d-Rickyy-b Sep 10, 2026
750ed24
fix: issue regarding disconnecting websocket clients
d-Rickyy-b Sep 10, 2026
2d4f132
refactor: rename variable name to better describe its function
d-Rickyy-b Sep 10, 2026
85e90bf
fix: reload last CTIndex for restarted workers
d-Rickyy-b Sep 10, 2026
1ec776c
docs: update changelog
d-Rickyy-b Sep 10, 2026
fc1b263
fix: forgot to rename this variable
d-Rickyy-b Sep 10, 2026
38e1529
docs(changelog): add latest 1.10 related changes
d-Rickyy-b Sep 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ builds:
- darwin
- windows
goarch:
- 386
- "386"
- amd64
- arm
- arm64
ignore:
- goos: darwin
goarch: 386
goarch: "386"
- goos: darwin
goarch: arm
- goos: windows
goarch: arm
- goos: windows
goarch: arm64
- goos: windows
goarch: 386
goarch: "386"
checksum:
name_template: '{{.ProjectName}}_{{.Version}}_checksums.txt'
name_template: "{{.ProjectName}}_{{.Version}}_checksums.txt"
changelog:
disable: true

Expand All @@ -41,8 +41,8 @@ dockers_v2:
- "ghcr.io/d-rickyy-b/{{.ProjectName}}"
dockerfile: docker/Dockerfile.goreleaser
tags:
- "{{.Tag}}"
- "{{ if not .Prerelease }}latest{{ end }}"
- '{{ if eq .Branch "dev" }}dev{{ else }}{{ .Tag }}{{ end }}'
- '{{ if and (ne .Branch "dev") (not .Prerelease) }}latest{{ end }}'
platforms:
- linux/amd64
- linux/arm64
Expand All @@ -58,7 +58,7 @@ dockers_v2:
"org.opencontainers.image.source": "https://github.com/d-Rickyy-b/certstream-server-go"

archives:
- formats: [ "binary" ]
- formats: ["binary"]
name_template: >-
{{- .ProjectName }}_
{{- .Version}}_
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- "*"
branches:
- dev

jobs:
build:
Expand All @@ -15,7 +17,7 @@ jobs:

steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ^1.22
id: go
Expand Down Expand Up @@ -45,9 +47,19 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
if: startsWith(github.ref, 'refs/tags/')
uses: goreleaser/goreleaser-action@v7
with:
version: latest
args: release --clean --config .github/goreleaser.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser (dev snapshot)
if: github.ref == 'refs/heads/dev'
uses: goreleaser/goreleaser-action@v7
with:
version: latest
args: release --snapshot --clean --config .github/goreleaser.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ linters:
- godot
# - godox
- gomoddirectives
- gomodguard
- gomodguard_v2
- goprintffuncname
- gosec
- govet
Expand Down Expand Up @@ -109,6 +109,7 @@ linters:
- err error
- ctx context.Context
- v *viper.Viper
- v uint64
- c *client
- cs *Certstream
- k x509.KeyUsage
Expand Down Expand Up @@ -136,6 +137,8 @@ linters:
- varnamelen
- goconst
- err113
- gosec
- dupl
path: _test\.go
- linters:
- gochecknoinits
Expand Down
100 changes: 88 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,178 +6,254 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

### Changed

### Removed

### Fixed

## [1.10.0] - 2026-09-13

### Added

- Support for stream processing tools like kafka or nsq
- Option to configure trusted_proxies for which the X-Forwarded-For and X-Real-IP headers are used as client IP (b062edc)
- Add `excluded_logs` config option to skip specific logs and operators. Works both for classic and tiled logs. (170fbeb)
- Added multiple unit tests for ensuring correct functionality

### Changed
- Updated weak cipher suites to stronger ones (939517cd)

- Updated weak cipher suites to stronger ones (939517c)
- Updated http client settings to prevent timeouts and other connectivity issues
- Updated http server settings to allow for higher delays
- Minor code improvements and refactoring, mostly style related
### Removed
- Updated batch size from 100 to 256 (#97)

### Fixed
- Use proper websocket close code (1008) instead of 1005, which wasn't sent to the client
### Docs

- Prevent excessive tile fetching for static CT logs (#104)
- Fix off-by-one is Static CT path causing refetches of non-growing logs by @FiloSottile in https://github.com/d-Rickyy-b/certstream-server-go/pull/114
- Calculate correct starting tile index for static ct logs (a2b4a9f)
- Use proper websocket close code (1008) instead of 1005, which wasn't sent to the client (76ff240)
- Respect ct_index path in config file for the `create-index` command (67838a9)
- Ensure all additionalLog entries are processed correctly (c8bd735)
- Reload CT index from metrics before restarting the worker (85e90bf, #113)

## [1.9.0] - 2026-04-03

### Added

- Ability to store and resume processing of certs from where it left off after a restart - see sample config "recovery" (#49)
- New CLI switch for creating an index file from a CT log (#49)
- Support for [Static CT](https://github.com/C2SP/C2SP/blob/main/static-ct-api.md) logs
- Support for [Static CT](https://github.com/C2SP/C2SP/blob/main/static-ct-api.md) logs
- Check for retired CT logs and prevent them from being watched / stop watching them (#77)
- Accept websocket connections from all origins
- Option to disable the default logs provided by Google - see sample config "disable_default_logs"
- Use of cobra for CLI argument parsing. New commands for displaying version and creating an index file
- Override confiuration options via environment variables (e.g. `CERTSTREAM_WEBSERVER_LISTEN_PORT=1234` to change the listen port)
- Override configuration options via environment variables (e.g. `CERTSTREAM_WEBSERVER_LISTEN_PORT=1234` to change the listen port)
- New field in json `source.timestamp` representing the timestamp of when the cert was processed by the CT log (#98)

### Changed

- **Breaking:** The configuration file for the docker container is now read from the /app/config/ directory (b9e5e6)

### Removed

- Deleted non-functional Dodo log from sample config (#78)

### Fixed

- Properly remove stopped ct log workers (#74)
- Added missing fields certificatePolicies and ctlPoisonByte (#85)
- Prevent race condition caused by simultaneous rw access to logmetrics (#91)
- Properly display metrics for all initially watched logs (#95)
- Properly add new metrics for all newly found logs (#96)

## [1.8.2] - 2025-11-22

### Fixed

- Added missing fields certificatePolicies and ctlPoisonByte (#85)

## [1.8.1] - 2025-05-04

### Fixed

- No longer reject URLs with trailing slashes defined in the `additional_logs` config (#62)
- When using `drop_old_logs` in the config, the server won't remove logs defined in `additional_logs` anymore (#64)

## [1.8.0] - 2025-05-03

### Security

- Close several CVEs in x/crypto and x/net dependencies (#59)

### Added

- New CLI tool for fetching certificates from a CT log (#47)
- Ability to add custom CT logs to the config (#56)
- Remove old CT logs as soon as they are removed from the Google CT Loglist (#60)
- New configuration for buffer sizes (#58)

### Fixed

- Properly handle IPv6 addresses in config (#61)

## [1.7.1] - 2025-05-03

### Fixed

- Properly handle IPv6 addresses in config (#61)

## [1.7.0] - 2024-08-20

### Added

- Support for websocket compression - disabled by default (#40)
- Support for non-browsers by implementing server initiated heartbeats (#39)
- Start new ct-watchers as new ct logs become available (#42)
- More logging to document currently watched logs (03d878e)

### Changed

- Changed log output to be better grepable (5c055cc)
- Update ct log update interval to once per hour instead of once per 6 hours as previously (9b6e77d)

### Fixed

- Fixed a possible race condition when accessing metrics

## [1.6.0] - 2024-03-05

### Added

- New metric for skipped certs per client (#34)

## [1.5.2] - 2024-02-17

### Fixed

- Fixed an issue with ip whitelists for the websocket server (#33)

## [1.5.1] - 2024-01-18

### Fixed
- Fixed a rare issue where it was possible for the all_domains json property (or data property in case of the domains-only endpoint) to be null

- Fixed a rare issue where it was possible for the all_domains json property (or data property in case of the domains-only endpoint) to be null

## [1.5.0] - 2023-12-21

### Added

- New `-version` switch to print version and exit afterwards
- Print version on every run of the tool
- Count and log number of skipped certificates per client

### Changed

- Update to chi/v5
- Update ct-watcher timeout from 5 to 30 seconds

### Fixed

- Prevent invalid subscription types to be used
- Kill connection after broadcasthandler was stopped

## [1.4.0] - 2023-11-29

### Added

- Config option to use X-Forwarded-For or X-Real-IP header as client IP
- Config option to whitelist client IPs for both websocket and metrics endpoints
- Config option to enable system metrics (cpu, memory, etc.)

## [1.3.2] - 2023-11-28

### Fixed

- Memory leak related to clients disconnecting from the websocket not being handled properly

## [1.3.1] - 2023-09-18

### Changed

- Updated config.sample.yaml to run both certstream and prometheus metrics on same socket

### Docs

- Fixed wrong docker command in readme

## [1.3.0] - 2023-04-11

### Added

- Calculate and display Sha256 sum of certificate

### Changed

- Update dependencies
- Better logging for CT log errors

### Fixed

- End execution after all workers stopped
- Implement timeout for the http client
- Keep ct watcher from crashing upon a connection reset from server

## [1.2.2] - 2023-01-10

### Added

- Two docker-compose files
- Check for presence of .yml or .yaml files in the current directory

### Fixed

- Handle sudden disconnects of CT logs

### Docs
- Added [wiki entry for docker-compose](https://github.com/d-Rickyy-b/certstream-server-go/wiki/Collecting-and-Visualizing-Metrics)

- Added [wiki entry for docker-compose](https://github.com/d-Rickyy-b/certstream-server-go/wiki/Collecting-and-Visualizing-Metrics)

## [1.2.1] - 2022-12-16

### Changed

- Updated ci pipeline to use new setup-go and checkout actions
- Use correct package name `github.com/d-Rickyy-b/certstream-server-go`

## [1.2.0] - 2022-12-15

### Added

- Log x-Forwarded-For header for requests
- More logging for certain error situations
- Add operator to ct log cert count metrics

### Changed

- Updated certificate-transparency-go dependency to v1.1.4
- Code improvements, adhering to styleguide
- Rename module to certstream-server-go
- Use log_list.json instead of all_logs_list.json

## [1.1.0] - 2022-10-19

Fix for missing loglist urls.

### Fixed

Fixed the connection issue due to the offline Google loglist urls.

## [1.0.0] - 2022-08-08

Initial release! First stable version of certstream-server-go is published as v1.0.0

[unreleased]: https://github.com/d-Rickyy-b/certstream-server-go/compare/v1.9.0...HEAD
[1.8.2]: https://github.com/d-Rickyy-b/certstream-server-go/compare/v1.8.2...v1.9.0
[unreleased]: https://github.com/d-Rickyy-b/certstream-server-go/compare/v1.10.0...HEAD
[1.10.0]: https://github.com/d-Rickyy-b/certstream-server-go/compare/v1.9.0...v1.10.0
[1.9.0]: https://github.com/d-Rickyy-b/certstream-server-go/compare/v1.8.2...v1.9.0
[1.8.2]: https://github.com/d-Rickyy-b/certstream-server-go/compare/v1.8.1...v1.8.2
[1.8.1]: https://github.com/d-Rickyy-b/certstream-server-go/compare/v1.8.0...v1.8.1
[1.8.0]: https://github.com/d-Rickyy-b/certstream-server-go/compare/v1.7.1...v1.8.0
Expand Down
2 changes: 1 addition & 1 deletion cmd/certpicker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func main() {
log.Fatalln("Error getting entry from CT log: ", getEntryErr)
}

// Loop over entries and pars each one.
// Loop over entries and parse each one.
for _, leafEntry := range entries.Entries {
rawLogEntry, err := ct.RawLogEntryFromLeaf(certID, &leafEntry)
if err != nil {
Expand Down
Loading
Loading