Skip to content

feat: auth sidecar LDAP group search - #633

Draft
tjovicic wants to merge 2 commits into
mainfrom
feat/auth-sidecar-group-mappings
Draft

tjovicic wants to merge 2 commits into
mainfrom
feat/auth-sidecar-group-mappings

Conversation

@tjovicic

Copy link
Copy Markdown
Contributor

Allow searching LDAP groups and returning a matching ACL name.

Allow searching LDAP groups and returning a matching ACL name.
Copilot AI balanced review requested due to automatic review settings November 23, 2026 11:42
@tjovicic
tjovicic marked this pull request as draft November 23, 2026 11:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Group searches use the authenticated user's LDAP permissions instead of the configured search account's, potentially rejecting valid users, and subsecond operation timeouts truncate to zero, disabling the search time limit.

2 open issues
What changed in this PR

Adds LDAP group-based authorization to the auth sidecar, returning the ACL username from the first matching configured group mapping.

Changes:

  • Adds group searches and ordered group-to-ACL mappings after user authentication.
  • Migrates configuration to go-envconfig, with separate user/group search settings and duration-based timeouts.
  • Updates the demo configuration and end-to-end expectations for mapped users and users without matching groups.
File Description
go.sum Adds checksums for go-envconfig.
go.mod Adds the go-envconfig dependency.
cmd/​auth-sidecar/​search.go Adds group lookup and ordered ACL mapping selection.
cmd/​auth-sidecar/​main.go Returns unauthorized for unmapped users and logs other authentication failures.
cmd/​auth-sidecar/​e2e_test.go Updates expected ACL usernames and unmapped-user rejection.
cmd/​auth-sidecar/​docker-compose.yaml Configures demo group mappings and duration-based timeouts.
cmd/​auth-sidecar/​config.go Adds environment decoding, group search settings, and mapping validation.

Review effort: Balanced

Comment thread cmd/auth-sidecar/config.go Resolved
Comment thread cmd/auth-sidecar/search.go Resolved
Handle error for group search bind operation

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Tihomir Jovičić <tiho.dev@gmail.com>
@tjovicic
tjovicic force-pushed the feat/auth-sidecar-group-mappings branch from 75cc89f to b629560 Compare November 24, 2026 13:09
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