[PR #3568] [MERGED] Implement the Organization API Key support for the new Directory Connector v2022 #3304

Closed
opened 2026-03-03 09:58:16 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/3568
Author: @BlackDex
Created: 6/9/2023
Status: Merged
Merged: 6/13/2023
Merged by: @BlackDex

Base: mainHead: org-api-key-refresh


📝 Commits (3)

  • 4219249 Add support for Organization token
  • 8e34495 Merge and modify PR from @Kurnihil
  • a05187c Some code changes and optimizations

📊 Changes

19 files changed (+559 additions, -25 deletions)

View changed files

migrations/mysql/2023-06-02-200424_create_organization_api_key/down.sql (+0 -0)
migrations/mysql/2023-06-02-200424_create_organization_api_key/up.sql (+10 -0)
migrations/postgresql/2023-06-02-200424_create_organization_api_key/down.sql (+0 -0)
migrations/postgresql/2023-06-02-200424_create_organization_api_key/up.sql (+10 -0)
migrations/sqlite/2023-06-02-200424_create_organization_api_key/down.sql (+0 -0)
migrations/sqlite/2023-06-02-200424_create_organization_api_key/up.sql (+11 -0)
📝 src/api/core/mod.rs (+2 -0)
📝 src/api/core/organizations.rs (+58 -2)
src/api/core/public.rs (+238 -0)
📝 src/api/identity.rs (+47 -9)
📝 src/auth.rs (+34 -0)
📝 src/db/models/device.rs (+1 -5)
📝 src/db/models/group.rs (+10 -5)
📝 src/db/models/mod.rs (+1 -1)
📝 src/db/models/organization.rs (+76 -3)
📝 src/db/models/user.rs (+22 -0)
📝 src/db/schemas/mysql/schema.rs (+13 -0)
📝 src/db/schemas/postgresql/schema.rs (+13 -0)
📝 src/db/schemas/sqlite/schema.rs (+13 -0)

📄 Description

I previously started a branch to implement the API Key support for Organizations.
Later @Kurnihil used that branch to further implement this and created a PR #2907, which hasn't been touched for a while now.

I refreshed this by rebasing and merging and updateing the work already done by @Kurnihil and tested this using a very small set of users and groups via an OpenLDAP server. I do not have access to an Microsoft AD or Azure AD environment which I can use for testing, so that is not taken into account here.

Closes #2907

Co-authored-by: Daniele Andrei daniele.andrei@geo-satis.com
Co-authored-by: Kurnihil


🔄 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/dani-garcia/vaultwarden/pull/3568 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 6/9/2023 **Status:** ✅ Merged **Merged:** 6/13/2023 **Merged by:** [@BlackDex](https://github.com/BlackDex) **Base:** `main` ← **Head:** `org-api-key-refresh` --- ### 📝 Commits (3) - [`4219249`](https://github.com/dani-garcia/vaultwarden/commit/4219249e11845bb8869c26e1182fa1d38b1a162a) Add support for Organization token - [`8e34495`](https://github.com/dani-garcia/vaultwarden/commit/8e34495e73f280e1c62f0f1b63e0219225f001d7) Merge and modify PR from @Kurnihil - [`a05187c`](https://github.com/dani-garcia/vaultwarden/commit/a05187c0ff8e38b5828c19906a649798b4b650af) Some code changes and optimizations ### 📊 Changes **19 files changed** (+559 additions, -25 deletions) <details> <summary>View changed files</summary> ➕ `migrations/mysql/2023-06-02-200424_create_organization_api_key/down.sql` (+0 -0) ➕ `migrations/mysql/2023-06-02-200424_create_organization_api_key/up.sql` (+10 -0) ➕ `migrations/postgresql/2023-06-02-200424_create_organization_api_key/down.sql` (+0 -0) ➕ `migrations/postgresql/2023-06-02-200424_create_organization_api_key/up.sql` (+10 -0) ➕ `migrations/sqlite/2023-06-02-200424_create_organization_api_key/down.sql` (+0 -0) ➕ `migrations/sqlite/2023-06-02-200424_create_organization_api_key/up.sql` (+11 -0) 📝 `src/api/core/mod.rs` (+2 -0) 📝 `src/api/core/organizations.rs` (+58 -2) ➕ `src/api/core/public.rs` (+238 -0) 📝 `src/api/identity.rs` (+47 -9) 📝 `src/auth.rs` (+34 -0) 📝 `src/db/models/device.rs` (+1 -5) 📝 `src/db/models/group.rs` (+10 -5) 📝 `src/db/models/mod.rs` (+1 -1) 📝 `src/db/models/organization.rs` (+76 -3) 📝 `src/db/models/user.rs` (+22 -0) 📝 `src/db/schemas/mysql/schema.rs` (+13 -0) 📝 `src/db/schemas/postgresql/schema.rs` (+13 -0) 📝 `src/db/schemas/sqlite/schema.rs` (+13 -0) </details> ### 📄 Description I previously started a branch to implement the API Key support for Organizations. Later @Kurnihil used that branch to further implement this and created a PR #2907, which hasn't been touched for a while now. I refreshed this by rebasing and merging and updateing the work already done by @Kurnihil and tested this using a very small set of users and groups via an OpenLDAP server. I do not have access to an Microsoft AD or Azure AD environment which I can use for testing, so that is not taken into account here. Closes #2907 Co-authored-by: Daniele Andrei <daniele.andrei@geo-satis.com> Co-authored-by: Kurnihil --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 09:58:16 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#3304
No description provided.