]> go.fuhry.dev Git - runtime.git/log
runtime.git
2 weeks 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

2 weeks 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`

2 weeks 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

2 weeks 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)

2 weeks 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

2 weeks 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

2 weeks 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.

2 weeks 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

2 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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.

3 weeks 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

3 weeks 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

3 weeks 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()

3 weeks 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

3 weeks 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

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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

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

3 weeks 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

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

3 weeks 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

3 weeks 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

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

4 weeks 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

3 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`

3 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.

4 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

4 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

4 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

4 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

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

6 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

6 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

6 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

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

6 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

6 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.

6 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.

7 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

7 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

7 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

7 months ago[http] add PROXY protocol v1 and v2 support
Dan Fuhry [Tue, 8 Apr 2025 21:59:03 +0000 (17:59 -0400)]
[http] add PROXY protocol v1 and v2 support

8 months ago[metricbus/mbserver] default to port 0 (randomly assigned by OS)
Dan Fuhry [Fri, 4 Apr 2025 12:30:33 +0000 (08:30 -0400)]
[metricbus/mbserver] default to port 0 (randomly assigned by OS)

8 months ago[metricbus] publish server in SD
Dan Fuhry [Fri, 4 Apr 2025 12:25:50 +0000 (08:25 -0400)]
[metricbus] publish server in SD

8 months ago[sd] write logs once at notice level when health status changes
Dan Fuhry [Fri, 4 Apr 2025 03:51:02 +0000 (23:51 -0400)]
[sd] write logs once at notice level when health status changes

8 months ago[sd] several bugfixes incl. http healthchecker memory leak
Dan Fuhry [Fri, 4 Apr 2025 03:47:25 +0000 (23:47 -0400)]
[sd] several bugfixes incl. http healthchecker memory leak

8 months agohealth-exporter: include node name in labels, publish under correct otel-tls service
Dan Fuhry [Fri, 4 Apr 2025 03:38:58 +0000 (23:38 -0400)]
health-exporter: include node name in labels, publish under correct otel-tls service

8 months agofix proxy systemd unit
Dan Fuhry [Sun, 30 Mar 2025 02:07:52 +0000 (22:07 -0400)]
fix proxy systemd unit

8 months agocoredns_plugin: wildcard support for DNS records
Dan Fuhry [Sun, 30 Mar 2025 02:06:15 +0000 (22:06 -0400)]
coredns_plugin: wildcard support for DNS records

8 months agostringmatch: add "any" and "never" matchers
Dan Fuhry [Sun, 30 Mar 2025 02:05:50 +0000 (22:05 -0400)]
stringmatch: add "any" and "never" matchers

8 months agoFine let's just make it a full HTTP proxy
Dan Fuhry [Sat, 29 Mar 2025 03:38:07 +0000 (23:38 -0400)]
Fine let's just make it a full HTTP proxy

Refactor samlproxy into a general purpose proxy with pluggable actions. Add S3 bucket serving backend. Route actions can fulfill the request or modify it and call next(), basically the same idea as coredns but for http.

Backwards incompatible with existing configs.

8 months ago[http/samlproxy] support route actions - just redirects for now
Dan Fuhry [Sun, 23 Mar 2025 04:13:16 +0000 (00:13 -0400)]
[http/samlproxy] support route actions - just redirects for now

8 months ago[http/samlproxy] listener address in yaml; add unsecure listener for http->https...
Dan Fuhry [Sun, 23 Mar 2025 02:20:03 +0000 (22:20 -0400)]
[http/samlproxy] listener address in yaml; add unsecure listener for http->https redirections

8 months ago[http/samlproxy] add systemd service, allow username header to be customized
Dan Fuhry [Sun, 23 Mar 2025 01:44:12 +0000 (21:44 -0400)]
[http/samlproxy] add systemd service, allow username header to be customized

8 months ago[http/samlproxy] multiple vhosts, loadable yaml config, SAML config per vhost
Dan Fuhry [Sun, 23 Mar 2025 01:30:11 +0000 (21:30 -0400)]
[http/samlproxy] multiple vhosts, loadable yaml config, SAML config per vhost

8 months agoadd prometheus_http_discovery program
Dan Fuhry [Sat, 22 Mar 2025 03:07:41 +0000 (23:07 -0400)]
add prometheus_http_discovery program

8 months ago[sd] differentiate node name and shard name
Dan Fuhry [Sat, 22 Mar 2025 02:49:08 +0000 (22:49 -0400)]
[sd] differentiate node name and shard name

Shard is not always applicable to sd entries, but sd entries do need
some kind of discriminator for etcd path collision avoidance.

Use the first element of the hostname for collision avoidance, and make
shard an optional element that nests items one level deeper.

8 months agosamlproxy: update for latest log changes
Dan Fuhry [Sat, 22 Mar 2025 01:37:15 +0000 (21:37 -0400)]
samlproxy: update for latest log changes

8 months agoMerge branch 'main' of gitlab.web.xx0r.info:dan/go-runtime
Dan Fuhry [Sat, 22 Mar 2025 01:31:45 +0000 (21:31 -0400)]
Merge branch 'main' of gitlab.web.xx0r.info:dan/go-runtime

8 months agoadd gRPC client and server for Bryston autio device remote control
Dan Fuhry [Sat, 22 Mar 2025 01:29:53 +0000 (21:29 -0400)]
add gRPC client and server for Bryston autio device remote control

8 months agomtls: add more logging to pkcs11 and tpm2 code
Dan Fuhry [Sat, 22 Mar 2025 01:28:13 +0000 (21:28 -0400)]
mtls: add more logging to pkcs11 and tpm2 code

8 months agoadd log writer interface
Dan Fuhry [Sat, 22 Mar 2025 01:27:42 +0000 (21:27 -0400)]
add log writer interface

8 months agomachines bugfixes
Dan Fuhry [Sat, 22 Mar 2025 01:26:52 +0000 (21:26 -0400)]
machines bugfixes

- handle interface:deleted and host:deleted events
- coredns plugin: only call tryInit if we fail to load the saved state from disk
- coredns plugin: make all hostname lookups case insensitive
- coredns plugin: fix <interface>.<host>.<domain> lookups
- coredns plugin: bump init ticker interval to 10 seconds
- coredns plugin: tighten lock window when updating registry from API
- coredns plugin: increase verbosity level of some really noisy log messages
- tweak mqtt startup
- fix `allow/deny unknown-clients` being added to dhcp subnets with only one range
- add captive portal service in openbsd, fix maclist template

8 months ago[http] add samlproxy
Dan Fuhry [Sat, 22 Mar 2025 01:14:27 +0000 (21:14 -0400)]
[http] add samlproxy

Add a basic SAML-enforcing sidecar proxy for future use with various internal services.

8 months agogo mod tidy
Dan Fuhry [Sat, 22 Mar 2025 01:12:39 +0000 (21:12 -0400)]
go mod tidy

8 months agostringmatch: support serialization, add tests, etc.
Dan Fuhry [Sat, 22 Mar 2025 01:11:51 +0000 (21:11 -0400)]
stringmatch: support serialization, add tests, etc.

8 months agometrics/metricbus: add healthcheck endpoint
Dan Fuhry [Sat, 22 Mar 2025 01:10:32 +0000 (21:10 -0400)]
metrics/metricbus: add healthcheck endpoint

11 months agoutils/log: record body size, request duration, initialize status to 200
Dan Fuhry [Tue, 31 Dec 2024 01:34:19 +0000 (20:34 -0500)]
utils/log: record body size, request duration, initialize status to 200

11 months agofix panic
Dan Fuhry [Mon, 30 Dec 2024 19:28:00 +0000 (14:28 -0500)]
fix panic

11 months agomove HTTP logging middleware to log package
Dan Fuhry [Mon, 30 Dec 2024 19:14:50 +0000 (14:14 -0500)]
move HTTP logging middleware to log package

HTTP access logs are needed in more places, so it makes sense to make this code reusable.

11 months agolog: make Logger an interface
Dan Fuhry [Mon, 30 Dec 2024 19:14:00 +0000 (14:14 -0500)]
log: make Logger an interface

Logger needs to be mockable, and for that we need it to be an interface.

13 months agogo mod tidy; update to go1.23
Dan Fuhry [Fri, 25 Oct 2024 16:13:57 +0000 (12:13 -0400)]
go mod tidy; update to go1.23

13 months ago[mtls] Support service identity from cert-manager-csi-driver-spiffe
Dan Fuhry [Fri, 25 Oct 2024 15:46:00 +0000 (11:46 -0400)]
[mtls] Support service identity from cert-manager-csi-driver-spiffe

K8s support, commit 3 of 3.

Check the default mount location of `cert-manager-csi-driver-spiffe` for service certificate discovery. Support default and certbot file naming schemes.

13 months ago[sd] add SRVHost option
Dan Fuhry [Fri, 25 Oct 2024 15:43:29 +0000 (11:43 -0400)]
[sd] add SRVHost option

Kubernetes support, commit 2 of 3: publish `pod-name.service.<SDDomain>` as the name in the SRV record when Kubernetes is detected. Preserve legacy behavior by defaulting to `AdvertiseHost` if configured, or our FQDN if not.

13 months agohostname: support /etc/hosts, /etc/resolv.conf; add container detection
Dan Fuhry [Fri, 25 Oct 2024 15:34:43 +0000 (11:34 -0400)]
hostname: support /etc/hosts, /etc/resolv.conf; add container detection

Needed for Kubernetes compatibility.

Kubernetes doesn't publish DNS records for pods. So the runtime can no longer assume that A/AAAA records exist for the host.

As a first step we need to be able to detect the hostname and kubernetes domain name. K8s is pretty good about populating `/etc/hosts` and `/etc/resolv.conf`, so we parse those when k8s is detected.

14 months agogo mod tidy
Dan Fuhry [Mon, 23 Sep 2024 17:11:24 +0000 (13:11 -0400)]
go mod tidy

14 months agosd/systemd: use generic network-online.target instead of systemd-networkd-wait-online...
Dan Fuhry [Fri, 13 Sep 2024 01:35:43 +0000 (21:35 -0400)]
sd/systemd: use generic network-online.target instead of systemd-networkd-wait-online.service

14 months agomtls/provider_file: better logging for load failures
Dan Fuhry [Fri, 13 Sep 2024 01:35:03 +0000 (21:35 -0400)]
mtls/provider_file: better logging for load failures

14 months agomachines: mqtt client: use credentials provider, not updateCreds
Dan Fuhry [Fri, 13 Sep 2024 01:24:08 +0000 (21:24 -0400)]
machines: mqtt client: use credentials provider, not updateCreds

Fixes mqtt not successfully connecting on the first try (only on retries).

14 months agomachines/coredns_plugin: map interface name + hostname to host ID
Dan Fuhry [Fri, 13 Sep 2024 01:22:07 +0000 (21:22 -0400)]
machines/coredns_plugin: map interface name + hostname to host ID

Will be used soon to support querying by interface name (not complete
yet)

14 months agomachines/agent: support dns_server_v[46] fields with interface name stand ins
Dan Fuhry [Fri, 13 Sep 2024 01:04:26 +0000 (21:04 -0400)]
machines/agent: support dns_server_v[46] fields with interface name stand ins

Add support for the `dns_server_v4` and `dns_server_v6` domain fields.

If either is a unix network interface name, use the primary IP address of that interface as the address.

14 months agomachines: start captive portal config (not done yet)
Dan Fuhry [Fri, 13 Sep 2024 01:03:40 +0000 (21:03 -0400)]
machines: start captive portal config (not done yet)

14 months agomachines_agent: daemonize with utils/daemon
Dan Fuhry [Fri, 13 Sep 2024 00:42:16 +0000 (20:42 -0400)]
machines_agent: daemonize with utils/daemon

14 months agoutils/daemon: add new package
Dan Fuhry [Fri, 13 Sep 2024 00:38:32 +0000 (20:38 -0400)]
utils/daemon: add new package

Add new "daemon" package to handle detaching on Linux and Unix systems.
Supports writing pid files, socket pair based startup messaging, and
systemd notification on Linux.

14 months agoutils/hostname: handle special case of domain name = "(none)" on linux
Dan Fuhry [Fri, 13 Sep 2024 00:17:37 +0000 (20:17 -0400)]
utils/hostname: handle special case of domain name = "(none)" on linux

Linux systems can return interesting values when the domain name is
unset, like "(none)" or an empty string. To handle these, hostname.go is
forked with special Hostname(), DomainName() and RegionName()
implementations for Linux and the original implementations for other
OSes.

14 months agoutils/log: only init default logger once
Dan Fuhry [Fri, 13 Sep 2024 00:14:38 +0000 (20:14 -0400)]
utils/log: only init default logger once

Fixes configuration of the default logger via flags

14 months agodns: exclude 169.254.0.0/16 from lookup results, too
Dan Fuhry [Thu, 12 Sep 2024 04:46:25 +0000 (00:46 -0400)]
dns: exclude 169.254.0.0/16 from lookup results, too

16 months agodns_cache: bypass systemd-resolved
Dan Fuhry [Fri, 26 Jul 2024 16:37:07 +0000 (12:37 -0400)]
dns_cache: bypass systemd-resolved

On Linux systems, the stub resolv.conf points at systemd-resolved which uses the hostsfile. We don't want this - we need the system's addresses as described by the network's DNS server.

19 months agomachines_agent: allow starting/stopping/restarting services from machines_agent cmd
Dan Fuhry [Thu, 25 Apr 2024 04:09:40 +0000 (00:09 -0400)]
machines_agent: allow starting/stopping/restarting services from machines_agent cmd

19 months agomachines agent: initial support for openbsd pid-file services
Dan Fuhry [Thu, 25 Apr 2024 04:09:13 +0000 (00:09 -0400)]
machines agent: initial support for openbsd pid-file services

19 months agoMakefile: fix on GNU make 3.81 (macos)
Dan Fuhry [Thu, 25 Apr 2024 04:05:36 +0000 (00:05 -0400)]
Makefile: fix on GNU make 3.81 (macos)

19 months agodns cache: fix message headers, populate edns udp size
Dan Fuhry [Thu, 25 Apr 2024 04:05:07 +0000 (00:05 -0400)]
dns cache: fix message headers, populate edns udp size

19 months agoalways initialize mtls_certificate_rotation_count counter when cert discovered
Dan Fuhry [Tue, 23 Apr 2024 20:30:30 +0000 (16:30 -0400)]
always initialize mtls_certificate_rotation_count counter when cert discovered

19 months agogitignore mtls_exporter
Dan Fuhry [Tue, 23 Apr 2024 16:36:54 +0000 (12:36 -0400)]
gitignore mtls_exporter

19 months agomtls exporter must run as root to enumerate /etc/ssl/mtls
Dan Fuhry [Tue, 23 Apr 2024 16:20:18 +0000 (12:20 -0400)]
mtls exporter must run as root to enumerate /etc/ssl/mtls