[PR #1121] feat: ldap custom attributes #1060

Open
opened 2026-02-04 21:14:01 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/1121
Author: @mnestor
Created: 11/28/2025
Status: 🔄 Open

Base: mainHead: feat/ldap-custom-attributes


📝 Commits (3)

  • cfd163a fix: Set correct path of .env file to backend dir instead of backend/cmd
  • 0d7a647 feat: ldap attributes synging to custom-claims for user and group objects
  • 1fe5b17 Merge branch 'main' into feat/ldap-custom-attributes

📊 Changes

31 files changed (+442 additions, -92 deletions)

View changed files

📝 CONTRIBUTING.md (+2 -0)
📝 backend/internal/controller/custom_claim_controller.go (+2 -2)
📝 backend/internal/dto/app_config_dto.go (+1 -0)
📝 backend/internal/dto/custom_claim_dto.go (+16 -3)
📝 backend/internal/dto/user_dto.go (+13 -12)
📝 backend/internal/dto/user_group_dto.go (+23 -20)
📝 backend/internal/model/app_config.go (+1 -0)
📝 backend/internal/model/custom_claim.go (+3 -2)
📝 backend/internal/model/user.go (+4 -3)
📝 backend/internal/model/user_group.go (+6 -5)
📝 backend/internal/service/app_config_service.go (+1 -0)
📝 backend/internal/service/custom_claim_service.go (+17 -16)
📝 backend/internal/service/ldap_service.go (+87 -0)
📝 backend/internal/service/oidc_service.go (+1 -1)
📝 backend/internal/service/user_group_service.go (+4 -2)
📝 backend/internal/service/user_service.go (+3 -2)
backend/resources/migrations/postgres/20251128000000_add_isldap_custom_claims.down.sql (+4 -0)
backend/resources/migrations/postgres/20251128000000_add_isldap_custom_claims.up.sql (+3 -0)
backend/resources/migrations/sqlite/20251115000000_api_keys_expires_at_index.up.sql (+0 -5)
backend/resources/migrations/sqlite/20251128000000_add_isldap_custom_claims.down.sql (+25 -0)

...and 11 more files

📄 Description


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pocket-id/pocket-id/pull/1121 **Author:** [@mnestor](https://github.com/mnestor) **Created:** 11/28/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/ldap-custom-attributes` --- ### 📝 Commits (3) - [`cfd163a`](https://github.com/pocket-id/pocket-id/commit/cfd163a93aa89475c1c0948045a3b17e4c528de8) fix: Set correct path of .env file to backend dir instead of backend/cmd - [`0d7a647`](https://github.com/pocket-id/pocket-id/commit/0d7a647355378da853f8b641bd521ea00acb7f6d) feat: ldap attributes synging to custom-claims for user and group objects - [`1fe5b17`](https://github.com/pocket-id/pocket-id/commit/1fe5b17404c25c1d6ce8b3118e90490e2ef84d98) Merge branch 'main' into feat/ldap-custom-attributes ### 📊 Changes **31 files changed** (+442 additions, -92 deletions) <details> <summary>View changed files</summary> 📝 `CONTRIBUTING.md` (+2 -0) 📝 `backend/internal/controller/custom_claim_controller.go` (+2 -2) 📝 `backend/internal/dto/app_config_dto.go` (+1 -0) 📝 `backend/internal/dto/custom_claim_dto.go` (+16 -3) 📝 `backend/internal/dto/user_dto.go` (+13 -12) 📝 `backend/internal/dto/user_group_dto.go` (+23 -20) 📝 `backend/internal/model/app_config.go` (+1 -0) 📝 `backend/internal/model/custom_claim.go` (+3 -2) 📝 `backend/internal/model/user.go` (+4 -3) 📝 `backend/internal/model/user_group.go` (+6 -5) 📝 `backend/internal/service/app_config_service.go` (+1 -0) 📝 `backend/internal/service/custom_claim_service.go` (+17 -16) 📝 `backend/internal/service/ldap_service.go` (+87 -0) 📝 `backend/internal/service/oidc_service.go` (+1 -1) 📝 `backend/internal/service/user_group_service.go` (+4 -2) 📝 `backend/internal/service/user_service.go` (+3 -2) ➕ `backend/resources/migrations/postgres/20251128000000_add_isldap_custom_claims.down.sql` (+4 -0) ➕ `backend/resources/migrations/postgres/20251128000000_add_isldap_custom_claims.up.sql` (+3 -0) ➖ `backend/resources/migrations/sqlite/20251115000000_api_keys_expires_at_index.up.sql` (+0 -5) ➕ `backend/resources/migrations/sqlite/20251128000000_add_isldap_custom_claims.down.sql` (+25 -0) _...and 11 more files_ </details> ### 📄 Description - Feature for #742 - Adds field ldapExtraAttributes to app configuration table - Adds field is_ldap to custom_claims table - Add configuration section to ldap for defining what attributes to sync to what keys in pocket-id along with denoting if the value is multivalue - Adds extra section to User/Group pages showing the ldap synced attribute values - Returns the ldap attributes with other custom claims when authenticating --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-04 21:14:01 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id#1060