Commit Graph

20 Commits

Author SHA1 Message Date
Simon Beck f05e41c9aa Improve password hash handling
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
This adds support for more hash algorithms. Also a stored password will
be updated to SSHA512 upon a successful bind. It will also automatically
hash a cleartext password if the `userpassword` field is modified with
a cleartext one.

Hashes supported:
* SSHA
* SSHA256
* SSHA512
2022-02-10 20:51:01 +01:00
Quentin 2707dd77c5
Use vendored goldap 2021-09-16 13:46:18 +02:00
Alex 99d8955ab3 Refactor & add case normalization logic to putAttributes
continuous-integration/drone/push Build is passing Details
2021-03-09 19:00:45 +01:00
Alex 1a20a64eff Refactoring
continuous-integration/drone/push Build is passing Details
2021-03-09 18:30:59 +01:00
Alex dc3fd4df65 Use consul's stale reads by default 2021-03-09 18:24:30 +01:00
Alex e4b5c67be0 Style changes 2020-11-13 12:55:32 +01:00
Alex 825aa77089 Hopefully, fix most case-sensitivity issues
- DNs are always used in canonical form: lowercase, no spaces. This is
  how they are internally handled and stored in paths and fields such as
  member and memberof
- Attribute names now can have any combination of lower/uppercase and
  stuff should work
- When modifying an attribute with a name that hase a different
  lower/upper combination than the previously stored value, keep the
  previous attribute name
- Trim spaces from values and do not store empty values
2020-02-15 12:07:31 +01:00
Alex fd6a555216 Ensure objects have an objectclass property 2020-02-14 21:23:01 +01:00
Alex 49be2069f6 Refactor memberOf management logic 2020-02-13 14:41:49 +01:00
Alex 6f893138a3 Make getAttribute return an empty array instead of nil when key not found 2020-02-13 14:41:49 +01:00
Alex f32c272db2 Merge branch 'gomod' of Deuxfleurs/bottin into master 2020-02-02 15:01:35 +01:00
Maximilien Richer a6faceb559
Import upstream lor00x/goldap reposity 2020-02-02 14:47:16 +01:00
Maximilien Richer 3644fdfe61
Rename go module to bottin 2020-02-02 14:32:37 +01:00
Alex 0c801e02d5 Remove spaces between dn components, use warnings when necessary 2020-02-02 13:53:29 +01:00
Maximilien Richer 0274ab0038
Implements go modules
Following errors compiling with go 1.13
See https://blog.golang.org/migrating-to-go-modules for details.
2020-02-02 12:10:02 +01:00
Alex e8ce6e33e5 Something that actually works 2020-02-01 15:09:09 +01:00
Alex da2c37bb95 Better logging 2020-02-01 15:05:44 +01:00
Alex 8a605f44b0 Don't do stupid things like use a dn as a pattern
Also add metadata fields in objects created on initialization
2020-01-26 23:12:00 +01:00
Alex f8c726dcda Fix missing procedure for delete membership & "better" failure handling
After an object has been updated, membership information must be
propagated to other object. Such operations may fail when calling consul
but if they do we don't return fail immediatly returning an error code
any more.  Instead we just print all the errors to our logs and try to
process the remaining updates.
2020-01-26 22:22:38 +01:00
Alex b27eb45239 Split off read and write functions in separate files 2020-01-26 22:08:27 +01:00