]> go.fuhry.dev Git - runtime.git/log
runtime.git
3 days ago[cmd/prometheus_http_discovery] change listener arg to address-and-port; update labels
Dan Fuhry [Mon, 19 Oct 2026 20:46:44 +0000 (16:46 -0400)]
[cmd/prometheus_http_discovery] change listener arg to address-and-port; update labels

3 days agoenable linux armv7 in cross targets
Dan Fuhry [Mon, 19 Oct 2026 20:44:24 +0000 (16:44 -0400)]
enable linux armv7 in cross targets

3 days agoupdate bazel module deps
Dan Fuhry [Mon, 19 Oct 2026 20:43:14 +0000 (16:43 -0400)]
update bazel module deps

3 days agogo mod tidy
Dan Fuhry [Mon, 19 Oct 2026 20:41:57 +0000 (16:41 -0400)]
go mod tidy

3 days ago[ldap] port ldap_health_exporter to builtin log and urfave/cli
Dan Fuhry [Mon, 19 Oct 2026 20:41:05 +0000 (16:41 -0400)]
[ldap] port ldap_health_exporter to builtin log and urfave/cli

3 days ago[utils/log] implement slog.Handler interface
Dan Fuhry [Mon, 19 Oct 2026 20:45:26 +0000 (16:45 -0400)]
[utils/log] implement slog.Handler interface

3 days agoadd some sqfs_package targets
Dan Fuhry [Mon, 19 Oct 2026 20:39:20 +0000 (16:39 -0400)]
add some sqfs_package targets

3 days ago[bazel] add sqfs_package rule
Dan Fuhry [Mon, 19 Oct 2026 21:10:11 +0000 (17:10 -0400)]
[bazel] add sqfs_package rule

3 days ago[pkg] multiarch support!
Dan Fuhry [Mon, 19 Oct 2026 20:32:25 +0000 (16:32 -0400)]
[pkg] multiarch support!

3 days ago[sqpkg] add sqpkg-upload tool
Dan Fuhry [Mon, 19 Oct 2026 20:20:42 +0000 (16:20 -0400)]
[sqpkg] add sqpkg-upload tool

- relocate direct interactions with object storage into k8s/sqpkg package
- add //cmd/sqpkg_upload

3 days ago[http] use httputil.ReverseProxy in proxyAction (rename from staticUpstreamAction)
Dan Fuhry [Mon, 19 Oct 2026 19:35:53 +0000 (15:35 -0400)]
[http] use httputil.ReverseProxy in proxyAction (rename from staticUpstreamAction)

3 days ago[bazel] optionally support separating Tag from Version
Dan Fuhry [Tue, 13 Oct 2026 13:34:50 +0000 (09:34 -0400)]
[bazel] optionally support separating Tag from Version

3 days ago[mint] support `CertificateNotifyOnReload`
Dan Fuhry [Tue, 13 Oct 2026 13:33:00 +0000 (09:33 -0400)]
[mint] support `CertificateNotifyOnReload`

and clean up deprecated identity driver interface

3 days ago[mtls/fsnotify] fix some crashes, improve clarity around locks
Dan Fuhry [Tue, 13 Oct 2026 13:30:32 +0000 (09:30 -0400)]
[mtls/fsnotify] fix some crashes, improve clarity around locks

Concurrency safety was never fsnotify's strong point.

Use RWMutex to guard watchHandlers.

3 days ago[sd] always publish on non-loopback addresses
Dan Fuhry [Tue, 13 Oct 2026 13:29:50 +0000 (09:29 -0400)]
[sd] always publish on non-loopback addresses

When adding support for service discovery publishing as a sidecar, I realized that health probes are often performed against the loopback address, but the sd libraries don't support separate addresses for probing and publication.

This commit adds that by detecting the local primary IPv4 and IPv6 addresses when the probe address is a loopback IP.

Supporting changes:

- Add `net2` library with `MyIP4()` and `MyIP6()`

**🚫🤖 No AI**

3 days ago[http] mtls, authzn overhaul
Dan Fuhry [Tue, 13 Oct 2026 13:19:28 +0000 (09:19 -0400)]
[http] mtls, authzn overhaul

- authorizer route actions are replaced with a separate interface
- add support for mTLS server identities and client cert validation
- add client cert authorizer with fine grained control over SPIFFE domains, users & services
- fully support hot reload for TLS using hotSwappableTLSConfig
- add HTTPError struct type (implements error) to wrap http errors
- support tls config at both listener- and vhost-level

supporting changes:

- mtls: open up interface to allow checking subjects separately from cert validity
- mtls: add `VerifyYamlConfig` type for reusable partials
- mtls: add certObject primitive (public interface: `SwappableCert`) for concurrency-safe, guaranteed consistent access to cert object types that can briefly be inconsistent in underlying storage (e.g. filesystem)
- mtls/certutil: add SplitChain, SplitChainRoot, and IsSelfSigned functions
- mtls: cleanup deprecated IdentityDriver types
- mtls: add `CertificateNotifyOnReload` interface for cert types that can perform watch-/monitor-based reloads

known limitations:

- MTLSPeerVerifier really does not

incompatible config change: `auth` route property changes from string to []string

**🚫🤖 No AI**

3 months ago[k8s] sqpkg CSI driver
Dan Fuhry [Thu, 23 Jul 2026 03:41:42 +0000 (23:41 -0400)]
[k8s] sqpkg CSI driver

No, this was not vibe coded. Actually there is nothing at all in this change that came from an LLM.

I don't want to build container images. I want to ship a generic, frequently-updated base archlinux container, and push binaries, configs, etc. separately. The plan is to build squashfs packages composed of a series of bazel targets and upload those to MinIO, then pull them down when a container wants to mount them.

Getting mksquashfs to work in Bazel without it complaining about including system headers because it can't decide if it's hermetic or not is proving to be the greatest challenge in this endeavor.

3 months ago[mtls][mint] tag mint-issued certs with requester identity
Dan Fuhry [Thu, 23 Jul 2026 03:25:49 +0000 (23:25 -0400)]
[mtls][mint] tag mint-issued certs with requester identity

- Add a way to tack arbitrary structured protobuf on to certificates using a `repeated google.protobuf.Any`
- Add `fuhry.runtime.service.mint.CertificateRequester` message to represent requester identity
- Block RequestCertificate calls if caller is using a cert that came from mint

3 months agogenerate all .pb.go with bazel, with packages driver for completion
Dan Fuhry [Thu, 23 Jul 2026 03:15:49 +0000 (23:15 -0400)]
generate all .pb.go with bazel, with packages driver for completion

3 months agotidy/deps update
Dan Fuhry [Wed, 8 Jul 2026 12:21:47 +0000 (08:21 -0400)]
tidy/deps update

3 months agoadd coredns nfpm package
Dan Fuhry [Wed, 8 Jul 2026 12:21:08 +0000 (08:21 -0400)]
add coredns nfpm package

3 months agotemplate-ize dbus policy in runtime-utils, fix systemd unit path
Dan Fuhry [Wed, 8 Jul 2026 12:06:37 +0000 (08:06 -0400)]
template-ize dbus policy in runtime-utils, fix systemd unit path

4 months ago[constants] add BuildTimestampTime
Dan Fuhry [Wed, 3 Jun 2026 04:52:53 +0000 (00:52 -0400)]
[constants] add BuildTimestampTime

4 months ago[pkg] support rename rules and multiple bazel-bin directories
Dan Fuhry [Wed, 3 Jun 2026 04:50:47 +0000 (00:50 -0400)]
[pkg] support rename rules and multiple bazel-bin directories

I am not proud of this code, but at least it works.

```
bazel build //pkg:runtime_utils_deb_nfpm_pkg //pkg:runtime_utils_archlinux_nfpm_pkg
```

4 months ago[sase] use public NewWebSocketBinaryReadWriter method
Dan Fuhry [Wed, 3 Jun 2026 04:14:17 +0000 (00:14 -0400)]
[sase] use public NewWebSocketBinaryReadWriter method

4 months ago[cmd/machines_agent] enable building for linux-arm64
Dan Fuhry [Wed, 3 Jun 2026 04:13:38 +0000 (00:13 -0400)]
[cmd/machines_agent] enable building for linux-arm64

4 months ago[stringmatch] add "not" matcher
Dan Fuhry [Wed, 3 Jun 2026 04:12:29 +0000 (00:12 -0400)]
[stringmatch] add "not" matcher

4 months ago[grpc] add nodep version of client, use in ephs
Dan Fuhry [Wed, 3 Jun 2026 04:10:12 +0000 (00:10 -0400)]
[grpc] add nodep version of client, use in ephs

go is now enforcing that internal packages must stay internal, so we need a nodep version of //grpc's client functionality for ephs libs

4 months agoadd //thirdparty/coredns and fix cross compilation
Dan Fuhry [Wed, 3 Jun 2026 04:07:56 +0000 (00:07 -0400)]
add //thirdparty/coredns and fix cross compilation

4 months agogo mod tidy, upgrade coredns to 1.14.3 + grpc-quic to 0.1.3
Dan Fuhry [Wed, 3 Jun 2026 04:03:20 +0000 (00:03 -0400)]
go mod tidy, upgrade coredns to 1.14.3 + grpc-quic to 0.1.3

5 months agoCross-compilation support, phase 1
Dan Fuhry [Thu, 23 Apr 2026 17:24:13 +0000 (13:24 -0400)]
Cross-compilation support, phase 1

Get everything building without hooking up mtls_cgo.

Co-Authored-By: Qwen3.6-35B-A3B <noreply@qwen.ai>
7 months agoadd go_cross_binaries macro and start enabling some cmds on other platforms
Dan Fuhry [Sun, 15 Mar 2026 01:57:09 +0000 (21:57 -0400)]
add go_cross_binaries macro and start enabling some cmds on other platforms

7 months ago[pkg] add nfpm package generation
Dan Fuhry [Sun, 15 Mar 2026 00:12:09 +0000 (20:12 -0400)]
[pkg] add nfpm package generation

- add nfpm_package bazel helper
- add nfpm config generator for discovering executables and systemd units added as bazel deps
- add packages for:
  - apcupsd-exporter
  - http-proxy
  - ldap-health-exporter
  - prometheus-helpers
  - runtime-utils

7 months ago[utils/rollout] get rollout configs from ephs
Dan Fuhry [Sun, 15 Mar 2026 00:10:25 +0000 (20:10 -0400)]
[utils/rollout] get rollout configs from ephs

7 months ago[mint] support Deny directives in ACLs
Dan Fuhry [Sun, 15 Mar 2026 00:09:19 +0000 (20:09 -0400)]
[mint] support Deny directives in ACLs

7 months ago[mint] support new mtls config provider API
Dan Fuhry [Sun, 15 Mar 2026 00:08:57 +0000 (20:08 -0400)]
[mint] support new mtls config provider API

7 months ago[mtls] support configs for different environments, embed default configs
Dan Fuhry [Sun, 15 Mar 2026 00:04:24 +0000 (20:04 -0400)]
[mtls] support configs for different environments, embed default configs

- Only try the identity drivers and paths listed in the config
- Use different default config based on environment heuristics
- Remove all hardcoded file paths, make file provider paths fully configurable

Supporting changes:
- Make IdentityLoaderFunc public
- Rename type: `IdentityClass` -> `VerifyMatchBy`

7 months ago[mint] Send hostname and domain name, add templates
Dan Fuhry [Sat, 14 Mar 2026 23:50:51 +0000 (19:50 -0400)]
[mint] Send hostname and domain name, add templates

- Add templates for custom SANs derived from host info sent in gRPC req
- Supporting changes to proto, client, etc.

7 months ago[mtls/fsnotify] hush fsnotify debug log messages
Dan Fuhry [Sat, 14 Mar 2026 23:39:19 +0000 (19:39 -0400)]
[mtls/fsnotify] hush fsnotify debug log messages

7 months ago[grpc/server] instrument grpc servers
Dan Fuhry [Sat, 14 Mar 2026 23:38:00 +0000 (19:38 -0400)]
[grpc/server] instrument grpc servers

7 months ago[grpc/server] support loading ACLs from ephs
Dan Fuhry [Sat, 14 Mar 2026 23:37:01 +0000 (19:37 -0400)]
[grpc/server] support loading ACLs from ephs

7 months ago[sd] add AddressUpdate type for easier stringification
Dan Fuhry [Sat, 14 Mar 2026 23:34:49 +0000 (19:34 -0400)]
[sd] add AddressUpdate type for easier stringification

7 months ago[cmd/*] use generated systemd services
Dan Fuhry [Sat, 14 Mar 2026 23:30:58 +0000 (19:30 -0400)]
[cmd/*] use generated systemd services

Part 1/?? of packaging/distribution overhaul: generate systemd services with bazel rules adjacent to cmd `go_binary` targets.

7 months agosync deps
Dan Fuhry [Sat, 14 Mar 2026 23:28:00 +0000 (19:28 -0400)]
sync deps

7 months ago[constants] use utils/subst library to generate constants
Dan Fuhry [Sat, 14 Mar 2026 23:26:44 +0000 (19:26 -0400)]
[constants] use utils/subst library to generate constants

7 months ago[ephs] split out low level client, add r/w permissions
Dan Fuhry [Sat, 14 Mar 2026 23:14:05 +0000 (19:14 -0400)]
[ephs] split out low level client, add r/w permissions

ephsll contains the etcd interaction parts of ephs, and includes an `ephs.Client` implementation which can replace the default client for a process that has unrestricted access to the etcd prefix.

ACLs for ephs now also gain mode bits for read and write access separately, allowing subtrees or individual paths to be world-readable but writable only by the owner.

7 months ago[utils/hostname] add CgroupInfoSelf and IsLikelyUserMachine, w/ tests
Dan Fuhry [Sat, 14 Mar 2026 23:11:19 +0000 (19:11 -0400)]
[utils/hostname] add CgroupInfoSelf and IsLikelyUserMachine, w/ tests

7 months ago[metrics/metricbus] implement Add and Set on bare http counters and gauges
Dan Fuhry [Sat, 14 Mar 2026 23:10:23 +0000 (19:10 -0400)]
[metrics/metricbus] implement Add and Set on bare http counters and gauges

11 months ago[ephs] split server into servicer and low-level client
Dan Fuhry [Sat, 22 Nov 2025 03:01:18 +0000 (22:01 -0500)]
[ephs] split server into servicer and low-level client

Make the ephs servicer act as a front-end to the ephs low-level client library, which handles all direct interaction with etcd.

- Move all ephs etcd interaction from `ephs/servicer` to `ephs/ephsll`
- Add ephs.Path type to make ephs path transformations simpler
- Refactor grpc's `WithStaticAddress` option to support DNS names

11 months ago[utils/log] fix prepending prefix to FATAL messages
Dan Fuhry [Fri, 21 Nov 2025 00:36:50 +0000 (19:36 -0500)]
[utils/log] fix prepending prefix to FATAL messages

11 months ago[ephs] `edit` command, client library and server improvements
Dan Fuhry [Fri, 21 Nov 2025 00:34:00 +0000 (19:34 -0500)]
[ephs] `edit` command, client library and server improvements

- fixed server failing to build since 020d9e6d because s3.go referenced the removed `genericOption` type
- add custom error type for not-found errors so they are easier to distinguish
- validate S3 credentials on server startup
- add `edit` command to ephs commandline client to allow editing text files directly in ephs

11 months ago[mint] add new service: mint
Dan Fuhry [Wed, 19 Nov 2025 21:48:52 +0000 (16:48 -0500)]
[mint] add new service: mint

Add a mint service which can issue certificates for other service identities based on configured rules. This allows, for example, a service to use its own identity to request a temporary `etcd-client` certificate.

The mint service applies the following restrictions:

1. Only service account identities may be requested.
2. Clients are not allowed to request a certificate for their own identity.
3. Issued certificates will always use the same SPIFFE domain as the original requester's certificate.
4. Certificates issued by the mint service expire at the same time as the client certificate used to make the connection to the mint service.
5. The rules for which services are allowed to request which identities are defined in a YAML file stored in ephs at (by default) `/ephs/local/services/mint/rules.yaml`.

11 months ago[grpc/client] make serverId a string
Dan Fuhry [Wed, 19 Nov 2025 21:46:12 +0000 (16:46 -0500)]
[grpc/client] make serverId a string

Prevent gRPC clients from trying to load the server's identity by calling `mtls.NewRemoteServiceIdentity` (which only returns a stub identity) and changing the `NewGrpcClient` function signature to accept a string instead of an Identity.

11 months agoGenericize "option" interface
Dan Fuhry [Wed, 19 Nov 2025 21:36:13 +0000 (16:36 -0500)]
Genericize "option" interface

"Option" variadic pattern has been used in lots of things lately - grpc client and server, ephs, etc. Although the implementation is trivial, the repetition was becoming obnoxious.

Other trivial fixes:
- Fixed sd watcher wait group never calling Done if etcd client context is canceled
- Fixed etcd_factory type declaration

11 months ago[mtls] add lazy identities, loader improvements
Dan Fuhry [Wed, 19 Nov 2025 21:32:34 +0000 (16:32 -0500)]
[mtls] add lazy identities, loader improvements

- indicate principal class and name separately to loader drivers
- add LazyIdentity to delay calling drivers until credentials are needed

11 months ago[mtls] make some types and functions public
Dan Fuhry [Wed, 19 Nov 2025 14:34:52 +0000 (09:34 -0500)]
[mtls] make some types and functions public

Make public the necessary functions and types to allow other packages to register identity and roots providers.

- Types `CertificatePrimitive` and `RootsPrimitive`
- Driver registration functions: `RegisterIdentityDriver`, `RegisterRootDriver`
- `newDialContextFunc` -> `MakeDialContextFunc`
- `newTlsCertificate` -> `MakeTlsCertificate`

11 months ago[grpc] adopt Option pattern, add DNS SRV support
Dan Fuhry [Wed, 19 Nov 2025 14:30:24 +0000 (09:30 -0500)]
[grpc] adopt Option pattern, add DNS SRV support

- Allow gRPC server and client factories to accept variadic Options
- Add `ClientOption`: `WithDNSSRV`, which uses DNS SRV queries instead of SD
- Add `ServerOption`: `WithTransport` (overrides `-grpc.transport` flag)
- Force ephs server to use QUIC transport as QUIC is hardcoded into the client library

11 months ago[grpc/healthcheck] add missing List RPC (unimplemented)
Dan Fuhry [Wed, 19 Nov 2025 14:27:12 +0000 (09:27 -0500)]
[grpc/healthcheck] add missing List RPC (unimplemented)

11 months ago[grpc] make PeerIdentity take a context instead of peer.Peer; break out cert retrieva...
Dan Fuhry [Wed, 19 Nov 2025 14:26:04 +0000 (09:26 -0500)]
[grpc] make PeerIdentity take a context instead of peer.Peer; break out cert retrieval into new PeerCertificate helper

11 months ago[proto/service/ephs] rename files with unique names
Dan Fuhry [Wed, 19 Nov 2025 14:19:49 +0000 (09:19 -0500)]
[proto/service/ephs] rename files with unique names

11 months ago[mtls] add common identity parser
Dan Fuhry [Wed, 19 Nov 2025 14:14:51 +0000 (09:14 -0500)]
[mtls] add common identity parser

Add a new function in `mtls`, `ParseIdentity`, which standardizes the following prefixes for identities:
- "user." for human users
- "ssl://" for publicly trusted certs
- the exact string "anonymous" for anonymous access
- all other strings are parsed as service identities

The etcd client is configured to follow this convention.

11 months ago[http/route_action_s3] use etag over ChecksumSHA1; fix URL decoding; limit to GET...
Dan Fuhry [Mon, 17 Nov 2025 23:55:02 +0000 (18:55 -0500)]
[http/route_action_s3] use etag over ChecksumSHA1; fix URL decoding; limit to GET and HEAD

11 months agoonly enable cgo on amd64 for now
Dan Fuhry [Sun, 16 Nov 2025 02:58:29 +0000 (21:58 -0500)]
only enable cgo on amd64 for now

11 months agofix building pkcs11 features on linux
Dan Fuhry [Fri, 14 Nov 2025 18:55:43 +0000 (13:55 -0500)]
fix building pkcs11 features on linux

11 months ago[mtls] merge the init functions in provider_macos_keychain
Dan Fuhry [Fri, 14 Nov 2025 18:25:35 +0000 (13:25 -0500)]
[mtls] merge the init functions in provider_macos_keychain

11 months ago[sd/etcd_factory] try default identity if etcd identity fails
Dan Fuhry [Fri, 14 Nov 2025 18:25:06 +0000 (13:25 -0500)]
[sd/etcd_factory] try default identity if etcd identity fails

And fail without trying to connect if neither the etcd identity nor default identity are valid.

11 months agocleanup bazel files for uncommitted packages
Dan Fuhry [Fri, 14 Nov 2025 18:06:40 +0000 (13:06 -0500)]
cleanup bazel files for uncommitted packages

11 months agometricbus: abstract transport
Dan Fuhry [Fri, 14 Nov 2025 18:00:00 +0000 (13:00 -0500)]
metricbus: abstract transport

- rename metricbus/internal -> metricbus/mbserver due to import from //cmd/metricbus_server
- add httpserver transport
- add utils/rollout library for... controlling rollouts

11 months agobulk replace all signal.NotifyContext with utils/context.Interruptible()
Dan Fuhry [Fri, 14 Nov 2025 17:29:15 +0000 (12:29 -0500)]
bulk replace all signal.NotifyContext with utils/context.Interruptible()

11 months agoconstants: rename constants.go.in -> constants_in.go so IDEs pick it up
Dan Fuhry [Fri, 14 Nov 2025 17:16:06 +0000 (12:16 -0500)]
constants: rename constants.go.in -> constants_in.go so IDEs pick it up

11 months ago[grpc] support loading ACLs from ephs
Dan Fuhry [Fri, 14 Nov 2025 16:52:07 +0000 (11:52 -0500)]
[grpc] support loading ACLs from ephs

Supporting changes:

- Rearranged grpc into internal/{client,server,common} packages to deal with circular dep between ephs and grpc
- Rename `mtls.parseName` -> `mtls.ParseRemoteIdentity` and make the returned struct and its properties public
- In ephs server ACLs, try to parse principal; if successful, set `name`, `class` and `domain` substitutions in the key
- Fixed severely incorrect invocation of acl.Check in ephs server (not a security issue, legitimate requests were blocked but no illegitimate requests were allowed)
- Add `utils/context` package - wrapper for `context` with shared `Interruptible` context that cancels on SIGTERM and SIGINT

11 months agoMerge branch 'migrate-to-bazel'
Dan Fuhry [Fri, 14 Nov 2025 14:16:50 +0000 (09:16 -0500)]
Merge branch 'migrate-to-bazel'

11 months agoinitial effort to migrate to bazel
Dan Fuhry [Thu, 6 Nov 2025 11:17:47 +0000 (06:17 -0500)]
initial effort to migrate to bazel

11 months agoutils/hostname: add Containerization for macos
Dan Fuhry [Thu, 13 Nov 2025 23:58:02 +0000 (18:58 -0500)]
utils/hostname: add Containerization for macos

11 months agofsnotify: use os.Getwd instead of syscall.Getcwd
Dan Fuhry [Thu, 13 Nov 2025 23:53:48 +0000 (18:53 -0500)]
fsnotify: use os.Getwd instead of syscall.Getcwd

11 months agoupdate go.mod and go.sum
Dan Fuhry [Thu, 6 Nov 2025 12:05:53 +0000 (07:05 -0500)]
update go.mod and go.sum

11 months ago[mtls] add provider_anonymous
Dan Fuhry [Thu, 6 Nov 2025 12:05:27 +0000 (07:05 -0500)]
[mtls] add provider_anonymous

11 months agoutils/stringmatch: add Sub method; utils/hashset: add Equal method
Dan Fuhry [Thu, 6 Nov 2025 12:04:53 +0000 (07:04 -0500)]
utils/stringmatch: add Sub method; utils/hashset: add Equal method

11 months agomore ephs
Dan Fuhry [Thu, 6 Nov 2025 12:03:20 +0000 (07:03 -0500)]
more ephs

11 months ago[machines_agent] parse mac address before posting to /api/host/seen
Dan Fuhry [Thu, 6 Nov 2025 11:56:26 +0000 (06:56 -0500)]
[machines_agent] parse mac address before posting to /api/host/seen

11 months ago[http/proxy] enable config_watcher + live reload support
Dan Fuhry [Thu, 6 Nov 2025 11:55:06 +0000 (06:55 -0500)]
[http/proxy] enable config_watcher + live reload support

11 months agoAdd ephs ("ephemeral filesystem")
Dan Fuhry [Thu, 6 Nov 2025 11:53:00 +0000 (06:53 -0500)]
Add ephs ("ephemeral filesystem")

11 months ago[http] live reload, SNI proxying, bugfixes
Dan Fuhry [Thu, 6 Nov 2025 11:49:53 +0000 (06:49 -0500)]
[http] live reload, SNI proxying, bugfixes

- Initial backend live reload support, to be enabled in binary with merge of ephs/config_watcher
- Fix SNI listener closure upon single connection TLS handshake error

14 months ago[http/s3] support `if-modified-since` and `if-none-match`
Dan Fuhry [Tue, 19 Aug 2025 13:16:30 +0000 (09:16 -0400)]
[http/s3] support `if-modified-since` and `if-none-match`

14 months ago[http] SNI proxying, healthcheck action, populate authorization, better handle nested...
Dan Fuhry [Fri, 15 Aug 2025 17:01:16 +0000 (13:01 -0400)]
[http] SNI proxying, healthcheck action, populate authorization, better handle nested authorization, docs

- added readme, because this is seriously getting too complicated for me to configure from memory
- refactored connection acceptance with a new `net.Listener` implementation that supports SNI, with virtual listeners that can be used with `http.Server`
- foundations laid for bare-TCP SNI proxying too, but implementation not started yet
- added `healthcheck` action
- added a mutable request context at the logging middleware level, to bubble up request data to the logger
- propagate SAML authorization state to global request context
- SAML action now skips if request was previously authorized
- got multiple listeners + multiple vhosts per listener working

No breaking config changes.

14 months ago[http] add request IDs w/tracing support
Dan Fuhry [Wed, 6 Aug 2025 03:22:56 +0000 (23:22 -0400)]
[http] add request IDs w/tracing support

14 months ago[http] support ranges for route_action_s3
Dan Fuhry [Wed, 6 Aug 2025 03:01:18 +0000 (23:01 -0400)]
[http] support ranges for route_action_s3

15 months agothirdparty/registry: add s3-aws driver
Dan Fuhry [Wed, 23 Jul 2025 00:59:23 +0000 (20:59 -0400)]
thirdparty/registry: add s3-aws driver

15 months ago[http] fix s3 chunk size workaround, enable H2 ALPN
Dan Fuhry [Tue, 8 Jul 2025 14:30:07 +0000 (10:30 -0400)]
[http] fix s3 chunk size workaround, enable H2 ALPN

- Set `NextProtos` to `[]string{"h2"}` when setting up tls config for http server
- Use `io.CopyN` to stream response in route_action_s3

17 months agoadd mtls/supervisor command
Dan Fuhry [Thu, 15 May 2025 21:45:46 +0000 (17:45 -0400)]
add mtls/supervisor command

17 months agoutils: add SetVerbosity/SetLevel to log; implement Containerization() for OpenBSD
Dan Fuhry [Thu, 15 May 2025 21:44:05 +0000 (17:44 -0400)]
utils: add SetVerbosity/SetLevel to log; implement Containerization() for OpenBSD

17 months agoutils/debounce: fix debouncer not always triggering
Dan Fuhry [Thu, 15 May 2025 21:43:41 +0000 (17:43 -0400)]
utils/debounce: fix debouncer not always triggering

17 months agomachines/coredns_plugin: use RWMutex to guard registryStore reads
Dan Fuhry [Thu, 15 May 2025 21:43:19 +0000 (17:43 -0400)]
machines/coredns_plugin: use RWMutex to guard registryStore reads

17 months agogo mod tidy
Dan Fuhry [Thu, 15 May 2025 21:42:52 +0000 (17:42 -0400)]
go mod tidy

17 months agoMakefile: include all .go files from maindirs, exclude vendor/ from target detection
Dan Fuhry [Thu, 15 May 2025 21:42:40 +0000 (17:42 -0400)]
Makefile: include all .go files from maindirs, exclude vendor/ from target detection

17 months agofsnotify: robust support for detecting changes to k8s config objects
Dan Fuhry [Thu, 15 May 2025 21:35:08 +0000 (17:35 -0400)]
fsnotify: robust support for detecting changes to k8s config objects

Kubernetes uses a fairly crazy scheme for files mounted from config maps and in-memory CSI drivers:

  /mnt/file     -> ..data/file
  /mnt/..data   -> ..TIME
  /mnt/..TIME/file (real file)

New versions of the config state are published atomically by doing

  symlink(/mnt/..NEWTIME, /mnt/..data_new)
  rename(/mnt/..data_new, /mnt/..data)

To detect changes to the contents of /mnt/file using inotify instead of polling file contents, we need to detect when /mnt/..data is overwritten.

This requires complex symlink detection and resolution for not only the file but any of the directories in its path, and tracking of final absolute path and inode number to detect when the file was swapped with a different one.

This commit adds that support to fsnotify, along with lots of documentation and tests.

17 months agorefactor MetricBusService to an interface
Dan Fuhry [Thu, 15 May 2025 14:39:24 +0000 (10:39 -0400)]
refactor MetricBusService to an interface

D-Bus metricbus server is being deprecated and being replaced with an https server that registers itself in sd and publishes its own stats.

This is the first step in the refactor, converting `MetricBusService` to an interface and updating all references accordingly. Full implementation will come later.

18 months ago[sd] workaround for no FQDN in k8s when populating ShardRegion
Dan Fuhry [Tue, 8 Apr 2025 22:03:28 +0000 (18:03 -0400)]
[sd] workaround for no FQDN in k8s when populating ShardRegion

18 months ago[mtls] use fullchain for leaf and chain when individual files unavailable
Dan Fuhry [Tue, 8 Apr 2025 22:00:50 +0000 (18:00 -0400)]
[mtls] use fullchain for leaf and chain when individual files unavailable

Fixes cert loading failures in k8s with certificates from cert-manager

18 months ago[http/saml] cookie bugfixes
Dan Fuhry [Tue, 8 Apr 2025 21:59:26 +0000 (17:59 -0400)]
[http/saml] cookie bugfixes

- strip auth cookies before forwarding to origin
- when no session, send 401 instead of redirect for CORS and websocket requests
- delete unused relaystate cookies