Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add many improvements #52

Merged
merged 12 commits into from
Dec 21, 2023
Merged

✨ Add many improvements #52

merged 12 commits into from
Dec 21, 2023

Conversation

xunleii
Copy link
Collaborator

@xunleii xunleii commented Dec 21, 2023

  • 🎨 Rename objectclass to objectClass
  • πŸ”Š Improve logs by addind Trace level
  • πŸ› (filters): LDAP attributes should be case-insensitive
  • ✨ (mux): Return only requested filters
  • πŸ› Make yaLDAP more compliant with LDAP server
  • ✨ Handle search requests on root DSE
  • ✨ Handle gracefully shutdown
  • ✨ Add a GC for all expired sessions
  • ✨ Handle unbind LDAP operation
  • 🎨 Extract Sessions creation from Mux builder
  • 🎨 (cmd): Rename addr-listen flag to listen-address
  • πŸ› (auth): Fix race condition

After reading some LDAP specs, DN and attribute must be case-insensitive
- Stringify Scope in logs
- Rewrite the `basic` fixture file to make the LDAP more realistic
- Fix the `one` scope behavior (don't add the current object to the
  entries)
- Fix the gldap package (I use my fork until my PR will be merge)
- Improve logs
- Handle the `AttributeSequence` inside the search requests
Handle gracefully shutdown by waiting all clients fully disconnected before stopping the server.
To avoid memory leak on binded session, we will run a GC every X time (based on the sessions TTL) to remove all expired sessions
Just remove all authenticated session when we catch an unbind request
Mux is a consumer of the Sessions object et should not be created by itself
@codecov-commenter
Copy link

codecov-commenter commented Dec 21, 2023

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (58b59ef) 87.80% compared to head (43d5089) 88.72%.

Files Patch % Lines
pkg/cmd/server.go 66.66% 3 Missing and 1 partial ⚠️
pkg/ldap/mux.go 90.90% 2 Missing and 2 partials ⚠️
pkg/cmd/common.go 66.66% 1 Missing ⚠️
pkg/ldap/directory/common/types.go 0.00% 0 Missing and 1 partial ⚠️
pkg/ldap/directory/yaml/directory.go 83.33% 1 Missing ⚠️
pkg/ldap/directory/yaml/parse.go 96.96% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   87.80%   88.72%   +0.91%     
==========================================
  Files          16       16              
  Lines         820      931     +111     
==========================================
+ Hits          720      826     +106     
- Misses         79       82       +3     
- Partials       21       23       +2     
Flag Coverage Ξ”
unittests 88.72% <93.84%> (+0.91%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@xunleii xunleii merged commit 8f0aff4 into main Dec 21, 2023
5 checks passed
@xunleii xunleii deleted the improvments branch December 21, 2023 08:13
xunleii added a commit that referenced this pull request May 24, 2024
✨ Add many improvements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants