diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 51bfc53a9c..31eb032f9f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -10,3 +10,9 @@ src/Identity @bitwarden/team-auth-dev **/SecretsManager @bitwarden/team-secrets-manager-dev **/Tools @bitwarden/team-tools-dev **/Vault @bitwarden/team-vault-dev + +# Admin-Console Team +bitwarden_license/src/Scim @bitwarden/team-admin-console-dev +bitwarden_license/src/test/Scim.IntegrationTest @bitwarden/team-admin-console-dev +bitwarden_license/src/test/Scim.ScimTest @bitwarden/team-admin-console-dev +**/AdminConsole @bitwarden/team-admin-console-dev \ No newline at end of file diff --git a/bitwarden_license/src/Scim/Context/IScimContext.cs b/bitwarden_license/src/Scim/Context/IScimContext.cs index 1e7010bd26..79bc387b47 100644 --- a/bitwarden_license/src/Scim/Context/IScimContext.cs +++ b/bitwarden_license/src/Scim/Context/IScimContext.cs @@ -1,6 +1,6 @@ -using Bit.Core.Entities; -using Bit.Core.Enums; -using Bit.Core.Models.OrganizationConnectionConfigs; +using Bit.Core.AdminConsole.Enums; +using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs; +using Bit.Core.Entities; using Bit.Core.Repositories; using Bit.Core.Settings; diff --git a/bitwarden_license/src/Scim/Context/ScimContext.cs b/bitwarden_license/src/Scim/Context/ScimContext.cs index ae8d30807d..e22d461f89 100644 --- a/bitwarden_license/src/Scim/Context/ScimContext.cs +++ b/bitwarden_license/src/Scim/Context/ScimContext.cs @@ -1,6 +1,7 @@ -using Bit.Core.Entities; +using Bit.Core.AdminConsole.Enums; +using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs; +using Bit.Core.Entities; using Bit.Core.Enums; -using Bit.Core.Models.OrganizationConnectionConfigs; using Bit.Core.Repositories; using Bit.Core.Settings; diff --git a/bitwarden_license/src/Scim/Groups/PostGroupCommand.cs b/bitwarden_license/src/Scim/Groups/PostGroupCommand.cs index 4da336fb79..00da7a8d7c 100644 --- a/bitwarden_license/src/Scim/Groups/PostGroupCommand.cs +++ b/bitwarden_license/src/Scim/Groups/PostGroupCommand.cs @@ -1,4 +1,5 @@ -using Bit.Core.Entities; +using Bit.Core.AdminConsole.Enums; +using Bit.Core.Entities; using Bit.Core.Enums; using Bit.Core.Exceptions; using Bit.Core.OrganizationFeatures.Groups.Interfaces; @@ -48,7 +49,7 @@ public class PostGroupCommand : IPostGroupCommand private async Task UpdateGroupMembersAsync(Group group, ScimGroupRequestModel model) { - if (_scimContext.RequestScimProvider != Core.Enums.ScimProviderType.Okta) + if (_scimContext.RequestScimProvider != ScimProviderType.Okta) { return; } diff --git a/bitwarden_license/src/Scim/Groups/PutGroupCommand.cs b/bitwarden_license/src/Scim/Groups/PutGroupCommand.cs index ec2cd170d3..0310139ecb 100644 --- a/bitwarden_license/src/Scim/Groups/PutGroupCommand.cs +++ b/bitwarden_license/src/Scim/Groups/PutGroupCommand.cs @@ -1,4 +1,5 @@ -using Bit.Core.Entities; +using Bit.Core.AdminConsole.Enums; +using Bit.Core.Entities; using Bit.Core.Enums; using Bit.Core.Exceptions; using Bit.Core.OrganizationFeatures.Groups.Interfaces; @@ -42,7 +43,7 @@ public class PutGroupCommand : IPutGroupCommand private async Task UpdateGroupMembersAsync(Group group, ScimGroupRequestModel model) { - if (_scimContext.RequestScimProvider != Core.Enums.ScimProviderType.Okta) + if (_scimContext.RequestScimProvider != ScimProviderType.Okta) { return; } diff --git a/bitwarden_license/src/Scim/Users/PostUserCommand.cs b/bitwarden_license/src/Scim/Users/PostUserCommand.cs index 3526cf5ab1..920ca6c77b 100644 --- a/bitwarden_license/src/Scim/Users/PostUserCommand.cs +++ b/bitwarden_license/src/Scim/Users/PostUserCommand.cs @@ -1,4 +1,5 @@ -using Bit.Core.Enums; +using Bit.Core.AdminConsole.Enums; +using Bit.Core.Enums; using Bit.Core.Exceptions; using Bit.Core.Models.Data; using Bit.Core.Models.Data.Organizations.OrganizationUsers; diff --git a/bitwarden_license/test/Scim.Test/Groups/PostGroupCommandTests.cs b/bitwarden_license/test/Scim.Test/Groups/PostGroupCommandTests.cs index f7efb022d0..40281e4d1b 100644 --- a/bitwarden_license/test/Scim.Test/Groups/PostGroupCommandTests.cs +++ b/bitwarden_license/test/Scim.Test/Groups/PostGroupCommandTests.cs @@ -1,4 +1,5 @@ -using Bit.Core.Entities; +using Bit.Core.AdminConsole.Enums; +using Bit.Core.Entities; using Bit.Core.Enums; using Bit.Core.Exceptions; using Bit.Core.OrganizationFeatures.Groups.Interfaces; @@ -74,7 +75,7 @@ public class PostGroupCommandTests sutProvider.GetDependency() .RequestScimProvider - .Returns(Core.Enums.ScimProviderType.Okta); + .Returns(ScimProviderType.Okta); var group = await sutProvider.Sut.PostGroupAsync(organization, scimGroupRequestModel); diff --git a/bitwarden_license/test/Scim.Test/Groups/PutGroupCommandTests.cs b/bitwarden_license/test/Scim.Test/Groups/PutGroupCommandTests.cs index 4bcc3c0c8c..ecf77d563b 100644 --- a/bitwarden_license/test/Scim.Test/Groups/PutGroupCommandTests.cs +++ b/bitwarden_license/test/Scim.Test/Groups/PutGroupCommandTests.cs @@ -1,4 +1,5 @@ -using Bit.Core.Entities; +using Bit.Core.AdminConsole.Enums; +using Bit.Core.Entities; using Bit.Core.Enums; using Bit.Core.Exceptions; using Bit.Core.OrganizationFeatures.Groups.Interfaces; @@ -64,7 +65,7 @@ public class PutGroupCommandTests sutProvider.GetDependency() .RequestScimProvider - .Returns(Core.Enums.ScimProviderType.Okta); + .Returns(ScimProviderType.Okta); var inputModel = new ScimGroupRequestModel { diff --git a/src/Api/Controllers/OrganizationConnectionsController.cs b/src/Api/Controllers/OrganizationConnectionsController.cs index b7329a14fa..5206cb51ae 100644 --- a/src/Api/Controllers/OrganizationConnectionsController.cs +++ b/src/Api/Controllers/OrganizationConnectionsController.cs @@ -1,5 +1,6 @@ using Bit.Api.Models.Request.Organizations; using Bit.Api.Models.Response.Organizations; +using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs; using Bit.Core.Context; using Bit.Core.Entities; using Bit.Core.Enums; diff --git a/src/Core/Enums/ScimProviderType.cs b/src/Core/AdminConsole/Enums/ScimProviderType.cs similarity index 80% rename from src/Core/Enums/ScimProviderType.cs rename to src/Core/AdminConsole/Enums/ScimProviderType.cs index c1d4670392..3f3fa7e6ad 100644 --- a/src/Core/Enums/ScimProviderType.cs +++ b/src/Core/AdminConsole/Enums/ScimProviderType.cs @@ -1,4 +1,4 @@ -namespace Bit.Core.Enums; +namespace Bit.Core.AdminConsole.Enums; public enum ScimProviderType : byte { diff --git a/src/Core/Models/OrganizationConnectionConfigs/ScimConfig.cs b/src/Core/AdminConsole/Models/OrganizationConnectionConfigs/ScimConfig.cs similarity index 75% rename from src/Core/Models/OrganizationConnectionConfigs/ScimConfig.cs rename to src/Core/AdminConsole/Models/OrganizationConnectionConfigs/ScimConfig.cs index 8a4fcb4e8c..8aba3b5793 100644 --- a/src/Core/Models/OrganizationConnectionConfigs/ScimConfig.cs +++ b/src/Core/AdminConsole/Models/OrganizationConnectionConfigs/ScimConfig.cs @@ -1,7 +1,8 @@ using System.Text.Json.Serialization; -using Bit.Core.Enums; +using Bit.Core.AdminConsole.Enums; +using Bit.Core.Models.OrganizationConnectionConfigs; -namespace Bit.Core.Models.OrganizationConnectionConfigs; +namespace Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs; public class ScimConfig : IConnectionConfig { diff --git a/src/Core/Models/Data/Organizations/SelfHostedOrganizationDetails.cs b/src/Core/Models/Data/Organizations/SelfHostedOrganizationDetails.cs index 70727772b9..b5c68bd3f5 100644 --- a/src/Core/Models/Data/Organizations/SelfHostedOrganizationDetails.cs +++ b/src/Core/Models/Data/Organizations/SelfHostedOrganizationDetails.cs @@ -1,8 +1,8 @@ -using Bit.Core.Auth.Entities; +using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs; +using Bit.Core.Auth.Entities; using Bit.Core.Entities; using Bit.Core.Enums; using Bit.Core.Models.Business; -using Bit.Core.Models.OrganizationConnectionConfigs; namespace Bit.Core.Models.Data.Organizations; diff --git a/src/Core/Services/Implementations/OrganizationService.cs b/src/Core/Services/Implementations/OrganizationService.cs index 8830c12a18..bad0b347a8 100644 --- a/src/Core/Services/Implementations/OrganizationService.cs +++ b/src/Core/Services/Implementations/OrganizationService.cs @@ -1,5 +1,6 @@ using System.Security.Claims; using System.Text.Json; +using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs; using Bit.Core.Auth.Enums; using Bit.Core.Auth.Models.Business; using Bit.Core.Auth.Repositories; @@ -11,7 +12,6 @@ using Bit.Core.Exceptions; using Bit.Core.Models.Business; using Bit.Core.Models.Data; using Bit.Core.Models.Data.Organizations.Policies; -using Bit.Core.Models.OrganizationConnectionConfigs; using Bit.Core.Repositories; using Bit.Core.Settings; using Bit.Core.Tools.Enums; diff --git a/test/Api.Test/Controllers/OrganizationConnectionsControllerTests.cs b/test/Api.Test/Controllers/OrganizationConnectionsControllerTests.cs index 0f243b9efb..c95d6861f6 100644 --- a/test/Api.Test/Controllers/OrganizationConnectionsControllerTests.cs +++ b/test/Api.Test/Controllers/OrganizationConnectionsControllerTests.cs @@ -2,6 +2,7 @@ using Bit.Api.Controllers; using Bit.Api.Models.Request.Organizations; using Bit.Api.Models.Response.Organizations; +using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs; using Bit.Core.Context; using Bit.Core.Entities; using Bit.Core.Enums; diff --git a/test/Core.Test/Entities/OrganizationConnectionTests.cs b/test/Core.Test/Entities/OrganizationConnectionTests.cs index 32690416c2..3698935411 100644 --- a/test/Core.Test/Entities/OrganizationConnectionTests.cs +++ b/test/Core.Test/Entities/OrganizationConnectionTests.cs @@ -1,6 +1,6 @@ -using Bit.Core.Entities; +using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs; +using Bit.Core.Entities; using Bit.Core.Enums; -using Bit.Core.Models.OrganizationConnectionConfigs; using Bit.Test.Common.AutoFixture.Attributes; using Xunit; diff --git a/test/Core.Test/Models/Data/SelfHostedOrganizationDetailsTests.cs b/test/Core.Test/Models/Data/SelfHostedOrganizationDetailsTests.cs index 71c535491b..a001454a0d 100644 --- a/test/Core.Test/Models/Data/SelfHostedOrganizationDetailsTests.cs +++ b/test/Core.Test/Models/Data/SelfHostedOrganizationDetailsTests.cs @@ -1,10 +1,10 @@ -using Bit.Core.Auth.Entities; +using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs; +using Bit.Core.Auth.Entities; using Bit.Core.Auth.Models.Data; using Bit.Core.Entities; using Bit.Core.Enums; using Bit.Core.Models.Business; using Bit.Core.Models.Data.Organizations; -using Bit.Core.Models.OrganizationConnectionConfigs; using Bit.Core.Test.AutoFixture; using Bit.Test.Common.AutoFixture.Attributes; using Xunit; diff --git a/test/Core.Test/Models/OrganizationConnectionConfigs/ScimConfigTests.cs b/test/Core.Test/Models/OrganizationConnectionConfigs/ScimConfigTests.cs index fa476eea26..4cb6b0df60 100644 --- a/test/Core.Test/Models/OrganizationConnectionConfigs/ScimConfigTests.cs +++ b/test/Core.Test/Models/OrganizationConnectionConfigs/ScimConfigTests.cs @@ -1,4 +1,4 @@ -using Bit.Core.Models.OrganizationConnectionConfigs; +using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs; using Xunit; namespace Bit.Core.Test.Models.OrganizationConnectionConfigs;