25 Commits
Author SHA1 Message Date
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 700745e640 feat: check plugin compatibility at release time 2026-07-25 13:34:44 -07:00
Chris F Ravenscroft cb121cdc2c fix: team atlanta arbitrary password (#471) 2026-07-18 14:32:05 -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
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 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 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 5eafb3bc15 build: enable buildvcs (#394)
closes #388
2024-02-11 13:07:37 -08:00
Chris F Ravenscroft 56ccb881b5 chore: improve plugin integration in build process (#380) 2023-12-25 16:43:20 -08:00
Chris F Ravenscroft 837da62607 Chore/bump minimum go version to 1.21 (#375)
* chore: fix go fmt in makefile

* chore: bump minimum go version to 1.21
2023-12-17 16:39:35 -08:00
Alessandro Cabbia 94fe62cfe1 monitoring: metrics enhancements and proposal for dropping expvar (#351)
* feat: introduce new prometheus monitor object

* feat: add LDAPMonitorWatcher as a potential replacement for v0 Collector

* feat: pass monitor object as dependency and instrument core operations

* feat: instantiate monitor in main

* ci: exclude mock files

* ci: generate mocks before running tests and go vet

* ci: make vet command keep going in case of errors

reason is due to the following happening in the GetStats method of the ldap.Stats struct

```
internal/monitoring/mock_interfaces.go:92:13: assignment copies lock value to ret0: (github.com/nmcclain/ldap.Stats, bool) contains github.com/nmcclain/ldap.Stats contains sync.Mutex
internal/monitoring/mock_interfaces.go:93:9: return copies lock value: github.com/nmcclain/ldap.Stats contains sync.Mutex
internal/monitoring/ldap_test.go:23:56: call of mockLDAPServer.EXPECT().GetStats().MinTimes(1).Return copies lock value: github.com/nmcclain/ldap.Stats contains sync.Mutex
```

* deps:  move to use go.uber.org/mock/gomock
2023-10-21 11:58:12 -07:00
Alessandro Cabbia accf15410c refactor: separating http handlers from routing setup (#350)
* fix: offload prometheus logic to the monitoring package

* fix: offload ui logic to the asset package

* refactor: use handlers coming from assets and monitoring package

* ci: add unit test run and vet command

* fix: make vet happy and adjust code
2023-10-14 11:19:58 -07:00
114b36f677 Final merge from Dev to Master (#344)
* build: make build vars optional and passable via env

* build: use . for BUILD_FILES var to allow buildvcs flag

* build: create mkbindir, build and sha256 targets

* build: reuse build target for each platform specific compilation

* Ensure same go version for main and plugins

* chore: release 2.3.0

Release-As: 2.3.0

* release-please

* Fix(plugins)!: Rename the groups table to ldapgroups (#326)

The groups table name is a reserved keyword in mysql and requires that
the table name be escaped with backticks in order to use the groups
name. Other databases such as postgres do not support the use of the
backticks in the query statements. This change renames the groups table
to ldapgroups in oder to avoid this problem altogether.

This does have a dependency on the backend sql plugins to alter the
schema to match the new name.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
Co-authored-by: Chris F Ravenscroft <chris@voilaweb.com>

* chore: update docker sqlite with ldapgroups (#338)

* feat: Update migration code to support table names (#339)

* chore(dev): release 2.3.0 (#337)

* ci: change pr name pattern for release please

* ci: switch to use master as default branch and plan to drop dev

* fix: exploit release-please for tagging in code

* fix: use runtime/debug to fetch git build info

* fix: use newer function to fetch git info for version

* build: drop build tags

---------

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
Co-authored-by: shipperizer <alexcabb@gmail.com>
Co-authored-by: Billy Olsen <wolsen@users.noreply.github.com>
2023-10-07 12:51:00 -07:00
0904a24564 v2.3.0 (#341)
* build: make build vars optional and passable via env

* build: use . for BUILD_FILES var to allow buildvcs flag

* build: create mkbindir, build and sha256 targets

* build: reuse build target for each platform specific compilation

* Ensure same go version for main and plugins

* chore: release 2.3.0

Release-As: 2.3.0

* release-please

* Fix(plugins)!: Rename the groups table to ldapgroups (#326)

The groups table name is a reserved keyword in mysql and requires that
the table name be escaped with backticks in order to use the groups
name. Other databases such as postgres do not support the use of the
backticks in the query statements. This change renames the groups table
to ldapgroups in oder to avoid this problem altogether.

This does have a dependency on the backend sql plugins to alter the
schema to match the new name.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
Co-authored-by: Chris F Ravenscroft <chris@voilaweb.com>

* chore: update docker sqlite with ldapgroups (#338)

* feat: Update migration code to support table names (#339)

* chore(dev): release 2.3.0 (#337)

---------

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
Co-authored-by: shipperizer <alexcabb@gmail.com>
Co-authored-by: Billy Olsen <wolsen@users.noreply.github.com>
2023-10-01 22:55:23 -07:00
Chris F Ravenscroft 0b7910c03c users is an organizational unit (#323) 2023-09-09 13:09:52 -07:00
Billy Olsen 944d602077 Update the TRIM_FLAGS to use -trimpath (#327)
The current TRIM_FLAGS specify gcflags and asmflags directly in order to
trim the path of the resulting binaries. This results in an error where
the plugins cannot be loaded due to the error: "built with a different
version of package". Per https://github.com/golang/go/issues/51955 in the
golang repository, this is explicitly not supported. Switching to use the
go build command's -trimpath flag resolves the issue.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2023-09-03 19:15:25 -07:00
Nick Borgers efbd64504d add help command to Makefile (#307)
* add fanciness to Makefile
2023-04-22 13:36:40 -07:00
Chris F Ravenscroft 32750d2abd Move plugins to their own repos (#283)
* Plugins release build delegated to plugin Makefile

* Build and push docker containers

* README points to documentation
2022-10-29 15:16:57 -07:00
3e2e24cadb Plugin: Unix PAM Authentication (https://github.com/glauth/glauth/pull/263) (#277)
* Plugin: Unix PAM Authentication (#263)

* Add plugin using pam authentication

Adds an additional plugin which us authenticating against
the PAM unix backend and exposing users and groups local
to the machine glauth is running on.

This can be used to expose local users for authentication
in other services which support ldap only.

* plugins: pam: Rewrite Bind() to use ldapopshelper

Modernizes the implementation of Bind() to make use of the helper
functions provided by LDAPOpsHelper.

In order to support custom authentication the existing config.User
has received an additional PassAppCustom property which allows to
specify a custom authentication callback for a user.

In case of the PAM backend this will be used to authenticate against
the local PAM database.

* plugins: pam: Rewrite Search() to use ldapopshelper

Modernizes the implementation of Search() to make use of the helper
functions provided by LDAPOpsHelper.

* plugins: pam: Capability through group membership

Adds a configuration option which decides if a user gets the search
capability or not based on the group memberships of a user.

* plugins: pam: Apply formatting

Runs gofmt and go get on all changes done earlier

* plugins: pam: Address feedback from CodeClimate

- reduce code similarity
- document new exports
- address casing of variables and functions
- reduce complexity of FindPosixGroups()
- reduce complexity of FindPosixAccounts()
- fix else branch in ldapopshelper

Co-authored-by: Marius Zwicker <marius.zwicker@mlba-team.de>

* Updated README for pam plugin

* Updated README for pam plugin

Co-authored-by: Marius Zwicker <marius@mlba-team.de>
Co-authored-by: Marius Zwicker <marius.zwicker@mlba-team.de>
2022-08-14 20:58:36 -07:00
Chris F Ravenscroft 45651645e7 Better plugin build for darwin 2022-06-11 20:53:01 +00:00
Chris F Ravenscroft 363cd76fa2 Makefiles: platform releases (#241) 2021-11-24 23:55:59 -08:00
Chris F Ravenscroft ef3151c287 v2 -- V2 hierarchy (#228) 2021-10-20 18:13:45 -07:00