Commit Graph
122 Commits
Author SHA1 Message Date
timmy 4d12405666 Simplify upstream ldap url handling 2026-09-20 15:23:31 -07:00
timmy cbe4a5634d Update ldap server implementation to github.com/gwelch-contegix/ldaps
Update ldap client implementation to github.com/go-ldap/ldap/v3
Add contexts to all relevant functions eg NewHandler
Provide backwards compatibility for sql handlers
2026-09-20 15:23:31 -07:00
timmy df31ef8988 Add proxy protocol support 2026-09-20 15:22:23 -07:00
timmy 013f8f68fc Make embed build more robust
Pull plugin dependencies that are not already in glauth's go.mod
Use a general embed tag instead of embedsqlite and embedmysql
2026-09-19 17:09:15 -07:00
Chris F RavenscroftandClaude Opus 5 156e917697 fix: route library log output through the logger (#491)
customWriter is the sink for log output from libraries that emit
unstructured text. With structured logging enabled it bypassed the
logger and hand-rolled JSON straight to os.Stderr, which had two
consequences.

It escaped only double quotes, so backslashes and control characters
were emitted raw. A Windows path produced "path C:\Users\x", where \U
is not a valid JSON escape, and a message containing a newline split
one record across two lines. Anything parsing these logs saw malformed
records.

It also wrote to stderr regardless of where the logger pointed, so
library messages could not follow the logger to another sink.

zerolog already emits the same fields with correct escaping, so the
branch is removed and everything goes through e.logr. Output is
byte-identical for plain text and quoted strings.


Claude-Session: https://claude.ai/code/session_014L5EoqGWsuZWr8fCVM6izP

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-13 17:05:16 -07:00
timmy 7832f9e94d Do not output on stderr if syslog is enabled (#479) 2026-09-13 17:04:15 -07:00
Chris F RavenscroftandClaude Opus 5 4f5795965b test: exercise the sqlite plugin in make test (#489)
TestSQLitePlugin has never run. It stats a flat bin/sqlite.so, which no
build target produces (make plugin_sqlite writes bin/linuxamd64/sqlite.so,
xgo writes bin/sqlite-linux-amd64.so), so it always took the skip branch.
Even past that it needs a seeded database, and nothing in the repo seeds
one.

seedplugindb stages the plugin at the path the test and
sample-database.cfg both expect, then starts glauth once so the plugin's
CreateSchema builds the tables before inserting rows. Taking the schema
from the plugin rather than duplicating its DDL here keeps the two from
drifting.

Guarded on bin/sqlite-linux-amd64.so existing, so CI - which never builds
plugins - still skips the test exactly as before.


Claude-Session: https://claude.ai/code/session_014L5EoqGWsuZWr8fCVM6izP

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-13 15:11:05 -07:00
Chris F Ravenscroft 752333e274 ci: release 2.5.4 (#488) 2026-09-13 15:01:42 -07:00
Chris F RavenscroftandClaude Opus 5 8d1ea390ba fix: revert pam plugin to msteinert/pam v1 (#487)
v2.1.0 fails to cross-compile for all five linux targets in the xgo
container (C.RTLD_NEXT unresolvable without _GNU_SOURCE), so the
v2.5.3 release shipped darwin pam plugins only. v1.2.0 cross-compiles
cleanly with an identical API surface for this plugin.


Claude-Session: https://claude.ai/code/session_014L5EoqGWsuZWr8fCVM6izP

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-13 14:59:24 -07:00
Chris F Ravenscroft 48981b9462 ci: release 2.5.3 (#483) 2026-09-13 14:06:44 -07:00
Chris F RavenscroftandClaude Opus 5 80314d335b build(deps): update core dependencies and align the otel stack (#486)
* build(deps): update core deps and align otel stack on 1.46.0

golang.org/x/crypto 0.18.0 -> 0.55.0
google.golang.org/grpc 1.59.0 -> 1.83.1
google.golang.org/protobuf 1.31.0 -> 1.36.12
golang.org/x/net 0.17.0 -> 0.58.0
github.com/gorilla/websocket 1.5.0 -> 1.5.3

The otel stack (core, sdk, trace, metric, all four exporters) plus
contrib/propagators/jaeger now sit together on 1.46.0. grpc 1.83.1
sets the floor for sdk and protobuf; the jaeger propagator's newest
release requires otel core 1.46.0, which in turn lifts crypto and net
above the versions originally targeted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014L5EoqGWsuZWr8fCVM6izP

* build: respect plugin go.mod versions when pulling dependencies

pull-plugin-dependencies now emits path@version from each plugin
manifest instead of the bare module path, so a dependency added to
the core module arrives at the version the plugin declares.

Pairs with the guard fix in the same line: the substitution was
redirected with &> so it was always empty and never skipped a module
already present. With the guard working, pinned versions only apply
to modules being added, never downgrading what the core already has.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014L5EoqGWsuZWr8fCVM6izP

* chore: bump plugin submodules to updated dependencies

go-sqlite3 1.14.52, mysql 1.10.1, lib/pq 1.12.3, msteinert/pam v2.1.0.
The pam plugin moves to the v2 major (import path only; the API it
uses is unchanged) and its logr and glauth/ldap entries now match the
core module. Corrects the module path in the mysql, postgres and pam
manifests, which all declared glauth-sqlite.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014L5EoqGWsuZWr8fCVM6izP

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-13 13:46:33 -07:00
dependabot[bot] 2ee3dbf3c7 build(deps): bump golang.org/x/net from 0.17.0 to 0.23.0 in /v2 (#426)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.17.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-13 13:03:35 -07:00
Chris F RavenscroftandClaude Opus 5 5147d1165a refactor: table-drive batteryOfTests to cut duplication
The twelve battery cases were near-identical closures: the same ldapsearch
argument prefix, the same got/want compare, the same t.Fatalf shape. Collapse
them into table rows holding only what differs (args, want, message) and run
them through one loop.

Shared argument builders (bind/svc/otp) remove the repeated
-LLL/-H/-D/-w/-x prefix; the two getSecond cases set a line field instead of
duplicating the assertion block.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdP1CLtdwAtAeXuS4hph6g
2026-08-30 16:20:05 -07:00
Chris F Ravenscroft 5bdeb5118b fix: remove repetitions, reduce waitForPort scope, restore arbitrary port 2026-08-30 16:02:46 -07:00
timmy 319cc9a3c7 Modernize tests, reduce execution time from 30s to 0.2s
Make output go to test logger so that go test -v will give useful output on a failure
Remove dependence on `oathtool`
Remove dependence on `ls`
Wait on killing the running glauth instance so subsequent tests don't fail
Wait for glauth to provide authentication error instead of waiting an arbitrary amount of time
2026-08-05 16:16:10 -07:00
Chris F Ravenscroft 26cd4447c8 test: support distribution binary layout 2026-07-25 14:17:38 -07:00
Chris F Ravenscroft 96a283fea2 chore: fix release build ordering 2026-07-25 14:14:49 -07:00
Chris F Ravenscroft c07a1c978c ci: release 2.5.2 (#475) 2026-07-25 13:38:12 -07:00
Chris F Ravenscroft 700745e640 feat: check plugin compatibility at release time 2026-07-25 13:34:44 -07:00
Chris F Ravenscroft 1c497d76ba ci: release 2.5.1 (#472)
* ci: release 2.5.1

* chore: set version to v2.5.1
2026-07-18 15:20:33 -07:00
Chris F Ravenscroftandkanywst cf0eb7f43f Pr 470 (#473)
* fix: reject disabled users on all backends in Bind

A user with disabled = true could still bind on the config backend, since
configHandler.FindUser and LDAPOpsHelper.Bind never checked Disabled while the
SQL backends drop such users at lookup. Enforce it in Bind so every backend
behaves the same.

* fix: use configHandler.Bind rather than helper.Bind in test harness

---------

Co-authored-by: kanywst <niwatakuma@icloud.com>
2026-07-18 14:59:42 -07:00
kt fb65713fbd fix: reject disabled users on all backends in Bind (#470)
A user with disabled = true could still bind on the config backend, since
configHandler.FindUser and LDAPOpsHelper.Bind never checked Disabled while the
SQL backends drop such users at lookup. Enforce it in Bind so every backend
behaves the same.
2026-07-18 14:53:08 -07:00
Chris F Ravenscroft cb121cdc2c fix: team atlanta arbitrary password (#471) 2026-07-18 14:32:05 -07:00
Chris F Ravenscroft be396ae635 ci: release 2.5.0 (#454) 2026-04-19 14:18:14 -07:00
Chris F Ravenscroft 719f6a2a2d chore: upgrade to distroless debian13 2026-04-19 14:12:37 -07:00
Chris F Ravenscroft 45185dafd1 chore: release 2.5.0 2026-04-19 12:21:27 -07:00
E Shattow 0774c95c1a Initial support for RISC-V (#465)
feat: Add build for riscv64/linux — not available for darwin and windows.
2026-04-19 11:56:24 -07:00
E Shattow 9e04c8b756 Use dynamic GOOS and GOARCH in integration-test.sh (#464)
Drop hard-coded linuxamd64 from path in v2/scripts/ci/integration-test.sh and use instead dynamic GOOS and GOARCH env.
2026-04-19 11:46:45 -07:00
Chris F Ravenscroft eabf67e266 chore: debug, openldap, samba (#466)
new target: builddebug
active directory proxying
QoL ldifs for openldap testing
2026-04-19 11:26:13 -07:00
Chris F Ravenscroft d68c78a18b feat: starttls and ldaps now matching features (#458) 2025-08-04 15:34:55 -07:00
Neha Oudin 645dbb2266 fix: Credentials leaked on INFO log level (#451) 2025-05-11 15:12:14 -07:00
Chris F Ravenscroft eea7bfbb4f ci: release 2.4.0 (#423) 2025-04-27 18:08:42 -07:00
José Julián Espina b498736cfd fix: patch group name fetches for the rest of handlers (#450)
* fix: correctly fetch group names on all handlers

* chore: fix tests
2025-04-26 19:07:08 -07:00
Chris F Ravenscroft f8dee8da87 feat: alt container build registry 2025-04-26 18:22:58 -07:00
Chris F Ravenscroft e92008680c chore: reworked Makefile to build everything at once 2024-11-16 17:08:43 -08:00
Chris F Ravenscroft 8f972db4cf tmp 2024-11-10 15:37:49 -08:00
Chris F Ravenscroft e9a4a5623a tmp 2024-11-10 15:35:01 -08:00
Chris F Ravenscroft 8e042199a2 tmp 2024-11-10 14:38:47 -08:00
Chris F Ravenscroft c0ed90822f feat: embedded plugins 2024-10-05 12:34:49 -07:00
Alessandro Cabbia a5ecc26e06 fix: update ldap library to fix #389 (#430) 2024-08-03 17:08:15 -07:00
Chris F Ravenscroft a90f37b23b fix: config watcher now updates whenf ile added to dir (#424) 2024-04-13 13:35:31 -07:00
Chris F Ravenscroft 8476506b8c feat: proxying ldap paging compat (#422) 2024-04-13 13:28:22 -07:00
Chris F Ravenscroft 262b5061ca ci: release 2.3.2 (#406) 2024-02-18 17:51:05 -08:00
Chris F Ravenscroft a2c151b0d0 fix: remove spinlock in monitoring code (#405) 2024-02-18 17:21:52 -08:00
Chris F Ravenscroft 42c448f3c7 ci: release 2.3.1 (#372) 2024-02-11 18:25:56 -08:00
Chris F Ravenscroft ed52a91ec4 fix: go test not checking otp within allowed basedn (#403) 2024-02-11 18:21:18 -08:00
Chris F Ravenscroft 6d161b7033 chore/remove dependency on goconvey (#392) 2024-02-11 13:08:45 -08:00
Alessandro Cabbia 5eafb3bc15 build: enable buildvcs (#394)
closes #388
2024-02-11 13:07:37 -08:00
Marcel Heers bc29d321bf config: ignores User.PassAppCustom when encoding to toml as funcs can not be encoded (#384) 2024-01-20 11:55:11 -08:00
dependabot[bot] 3c3ac7e148 build(deps): bump golang.org/x/crypto from 0.17.0 to 0.18.0 in /v2 (#385)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.17.0 to 0.18.0.
- [Commits](https://github.com/golang/crypto/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-20 11:19:34 -08:00