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

19 months agoAdd mTLS exporter
Dan Fuhry [Tue, 23 Apr 2024 16:17:43 +0000 (12:17 -0400)]
Add mTLS exporter

19 months agodisable PIE on non-native builds
Dan Fuhry [Fri, 19 Apr 2024 02:04:49 +0000 (22:04 -0400)]
disable PIE on non-native builds

19 months agomachines/coredns_plugin: fix erroneously case-sensitive hostname map
Dan Fuhry [Tue, 16 Apr 2024 12:40:46 +0000 (08:40 -0400)]
machines/coredns_plugin: fix erroneously case-sensitive hostname map

19 months agofix native build detection
Dan Fuhry [Tue, 16 Apr 2024 12:39:08 +0000 (08:39 -0400)]
fix native build detection

19 months agomachines/oauth2: fix stupid mistake in oauth2 http transport wrapper
Dan Fuhry [Tue, 16 Apr 2024 12:38:11 +0000 (08:38 -0400)]
machines/oauth2: fix stupid mistake in oauth2 http transport wrapper

19 months agometrics/mbserver: quote discriminator, rename label _instance -> _shard
Dan Fuhry [Tue, 16 Apr 2024 12:37:31 +0000 (08:37 -0400)]
metrics/mbserver: quote discriminator, rename label _instance -> _shard

19 months agoapcupsd exporter: allow specifying NIS address and nominal power as flags
Dan Fuhry [Tue, 16 Apr 2024 12:36:50 +0000 (08:36 -0400)]
apcupsd exporter: allow specifying NIS address and nominal power as flags

21 months agometricbus/mbclient: services are singletons
Dan Fuhry [Tue, 27 Feb 2024 21:22:15 +0000 (16:22 -0500)]
metricbus/mbclient: services are singletons

21 months agosase/happy_eyeballs: use HE for client dial; add flags to block v4 or v6 connections
Dan Fuhry [Tue, 27 Feb 2024 21:03:31 +0000 (16:03 -0500)]
sase/happy_eyeballs: use HE for client dial; add flags to block v4 or v6 connections

21 months agomachines: add agent, coredns plugin and conf file templates
Dan Fuhry [Tue, 27 Feb 2024 20:58:30 +0000 (15:58 -0500)]
machines: add agent, coredns plugin and conf file templates

Port of the python machines client.

Not all templates are fixed up and ready to go, only the ones that are known to be needed on linux routers.

No captive portal support for Linux yet.

21 months agoutils/hashset: add AsSortedSlice()
Dan Fuhry [Tue, 27 Feb 2024 20:56:27 +0000 (15:56 -0500)]
utils/hashset: add AsSortedSlice()

21 months agomachines/client: sparse generic type for server fields that can be a UUID or full...
Dan Fuhry [Tue, 27 Feb 2024 20:55:50 +0000 (15:55 -0500)]
machines/client: sparse generic type for server fields that can be a UUID or full struct

21 months agoutils/hostname: fix build on darwin, support openbsd
Dan Fuhry [Tue, 27 Feb 2024 15:31:16 +0000 (10:31 -0500)]
utils/hostname: fix build on darwin, support openbsd

21 months agomtls/pkcs11: conditional build with tag "pkcs11"
Dan Fuhry [Tue, 27 Feb 2024 15:29:32 +0000 (10:29 -0500)]
mtls/pkcs11: conditional build with tag "pkcs11"

22 months agoapcups_exporter: handle apcupsd restarts/downtime; add systemd unit
Dan Fuhry [Wed, 17 Jan 2024 04:21:55 +0000 (23:21 -0500)]
apcups_exporter: handle apcupsd restarts/downtime; add systemd unit

22 months agomove metric-collector.service one level up for consistency
Dan Fuhry [Mon, 15 Jan 2024 01:35:21 +0000 (20:35 -0500)]
move metric-collector.service one level up for consistency

22 months agofix executable paths in .service files
Dan Fuhry [Mon, 15 Jan 2024 01:30:52 +0000 (20:30 -0500)]
fix executable paths in .service files

22 months agotidy, update golang.org/x/crypto/ssh/terminal -> golang.org/x/term
Dan Fuhry [Mon, 15 Jan 2024 01:01:17 +0000 (20:01 -0500)]
tidy, update golang.org/x/crypto/ssh/terminal -> golang.org/x/term

22 months agoMake some other constants overrideable
Dan Fuhry [Mon, 15 Jan 2024 01:00:32 +0000 (20:00 -0500)]
Make some other constants overrideable

23 months ago[mtls] LoadSSLCertificateFromFIlesystem: was using mtls base path, not ssl certs...
Dan Fuhry [Wed, 13 Dec 2023 14:16:25 +0000 (09:16 -0500)]
[mtls] LoadSSLCertificateFromFIlesystem: was using mtls base path, not ssl certs base path

23 months agoInitial commit
Dan Fuhry [Wed, 13 Dec 2023 03:48:13 +0000 (22:48 -0500)]
Initial commit