30 Commits
Author SHA1 Message Date
Alessandro Cabbia a5ecc26e06 fix: update ldap library to fix #389 (#430) 2024-08-03 17:08:15 -07:00
Chris F Ravenscroft 6d161b7033 chore/remove dependency on goconvey (#392) 2024-02-11 13:08:45 -08:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 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
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 10613f37df build(deps): bump github.com/prometheus/client_golang in /v2 (#382)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  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:15:46 -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
Chris F Ravenscroft 1a37396109 fix: update tracing code to work with breaking otlp 1.20 changes 2023-12-11 01:36:58 +00:00
Chris F Ravenscroft a0d1069841 Merge branch 'master' into otlp 2023-12-10 16:34:56 -08:00
Chris F Ravenscroft 67d77324a3 chore: reweure ldap packages (#370) 2023-12-10 15:32:24 -08:00
Alessandro Cabbia 01bdb7148e startTLS: ldap over TLS functionality (#364)
* feat: introduce tls parameters in config to allow startTLS

* feat: pass tls config for startTLS to ldap server

* build: update libs to use newer ldap

* feat: allow tls config for startTLS
2023-12-10 15:20:29 -08:00
shipperizer 2ca5312696 feat: introduce otelsql 2023-12-10 09:59:55 +00:00
shipperizer 6ee78cd881 build: update deps with otlp libs 2023-12-10 09:59:04 +00:00
Chris F Ravenscroft 7174aba5ab chore: fix wrong goconvey hierarchy (#361) 2023-11-19 17:43:40 -08:00
dependabot[bot]dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Chris F Ravenscroft
0b6cfcb1b4 Bump github.com/smartystreets/goconvey from 1.6.4 to 1.8.1 in /v2 (#354)
Chore: Bumps [github.com/smartystreets/goconvey](https://github.com/smartystreets/goconvey) from 1.6.4 to 1.8.1.
- [Release notes](https://github.com/smartystreets/goconvey/releases)
- [Commits](https://github.com/smartystreets/goconvey/compare/v1.6.4...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/smartystreets/goconvey
  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>
Co-authored-by: Chris F Ravenscroft <chris@voilaweb.com>
2023-10-21 15:31:19 -07:00
Chris F Ravenscroft ebdeae7073 Merge branch 'master' into toml/vendor 2023-10-21 15:02:48 -07: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
shipperizer f9addbc2c5 fix: upgrade to use BurntSushi/toml 2023-10-15 23:58:51 +01:00
shipperizer 24455e3988 fix: drop vendored toml 2023-10-15 23:54:09 +01:00
Alessandro Cabbia 8739fd6e4f ci: dependabot and dependencies update (#348)
* fix: update and upgrade libraries

side note:
* using commit to trigger release-please workflow in light of recent changes regarding branch strategy

* ci: introduce dependabot
2023-10-14 11:15:59 -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 08a89a9861 Sum types, preparation (#330) 2023-09-09 13:35:42 -07:00
Chris F Ravenscroft 7e7a5f59d1 Update Go Versions to 1.19, 1.20 (#314)
* Update Go Versions to 1.19, 1.20
2023-04-22 13:28:21 -07:00
dependabot[bot] b45259d567 Bump golang.org/x/crypto from 0.0.0-20210711020723-a769d52b0f97 to 0.1.0 in /v2 (#303)
* Bump golang.org/x/crypto in /v2

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20210711020723-a769d52b0f97 to 0.1.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](https://github.com/golang/crypto/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-22 13:01:02 -07:00
Chris F Ravenscroft 6500bbaf36 No SysLog on Windows (#289) 2022-11-12 14:55:55 -08:00
Chris F Ravenscroft 3db5c5e54a Feature/zerolog (#285)
* Zerolog

* Adjusted logging levels

* Structured logging including ldap library
2022-11-06 00:22:14 -07:00
Chris F Ravenscroft 1a78b51174 Prometheus exported (#284)
* Prometheus exporter
2022-10-30 23:48:16 -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 82bc471735 Feature/custom attributes (#240) 2021-11-24 18:22:42 -08:00
Chris F Ravenscroft ef3151c287 v2 -- V2 hierarchy (#228) 2021-10-20 18:13:45 -07:00