mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
[EC-261] SCIM (#2105)
* scim project stub * some scim models and v2 controllers * implement some v2 scim endpoints * fix spacing * api key auth * EC-261 - SCIM Org API Key and connection type config * EC-261 - Fix lint errors/formatting * updates for okta implementation testing * fix var ref * updates from testing with Okta * implement scim context via provider parsing * support single and list of ids for add/remove groups * log ops not handled * touch up scim context * group list filtering * EC-261 - Additional SCIM provider types * EC-265 - UseScim flag and license update * EC-265 - SCIM provider type of default (0) * EC-265 - Add Scim URL and update connection validation * EC-265 - Model validation and cleanup for SCIM keys * implement scim org connection * EC-265 - Ensure ServiceUrl is not persisted to DB * EC-265 - Exclude provider type from DB if not configured * EC-261 - EF Migrations for SCIM * add docker builds for scim * EC-261 - Fix failing permissions tests * EC-261 - Fix unit tests and pgsql migrations * Formatting fixes from linter * EC-265 - Remove service URL from scim config * EC-265 - Fix unit tests, removed wayward validation * EC-265 - Require self-hosted for billing sync org conn * EC-265 - Fix formatting issues - whitespace * EC-261 - PR feedback and cleanup * scim constants rename * no scim settings right now * update project name * delete package lock * update appsettings configs for scim * use default scim provider for context Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com>
This commit is contained in:
1596
util/MySqlMigrations/Migrations/20220707163017_UseScimFlag.Designer.cs
generated
Normal file
1596
util/MySqlMigrations/Migrations/20220707163017_UseScimFlag.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,26 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.MySqlMigrations.Migrations
|
||||
{
|
||||
public partial class UseScimFlag : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UseScim",
|
||||
table: "Organization",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UseScim",
|
||||
table: "Organization");
|
||||
}
|
||||
}
|
||||
}
|
@ -5,6 +5,8 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.MySqlMigrations.Migrations
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
@ -14,8 +16,8 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64)
|
||||
.HasAnnotation("ProductVersion", "5.0.12");
|
||||
.HasAnnotation("ProductVersion", "6.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Cipher", b =>
|
||||
{
|
||||
@ -61,7 +63,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Cipher");
|
||||
b.ToTable("Cipher", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b =>
|
||||
@ -89,7 +91,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("OrganizationId");
|
||||
|
||||
b.ToTable("Collection");
|
||||
b.ToTable("Collection", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionCipher", b =>
|
||||
@ -104,7 +106,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("CipherId");
|
||||
|
||||
b.ToTable("CollectionCipher");
|
||||
b.ToTable("CollectionCipher", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionGroup", b =>
|
||||
@ -188,7 +190,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Device");
|
||||
b.ToTable("Device", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.EmergencyAccess", b =>
|
||||
@ -236,7 +238,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("GrantorId");
|
||||
|
||||
b.ToTable("EmergencyAccess");
|
||||
b.ToTable("EmergencyAccess", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Event", b =>
|
||||
@ -295,7 +297,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Event");
|
||||
b.ToTable("Event", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Folder", b =>
|
||||
@ -319,7 +321,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Folder");
|
||||
b.ToTable("Folder", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Grant", b =>
|
||||
@ -362,7 +364,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasKey("Key");
|
||||
|
||||
b.ToTable("Grant");
|
||||
b.ToTable("Grant", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Group", b =>
|
||||
@ -394,7 +396,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("OrganizationId");
|
||||
|
||||
b.ToTable("Group");
|
||||
b.ToTable("Group", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.GroupUser", b =>
|
||||
@ -414,7 +416,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("GroupUser");
|
||||
b.ToTable("GroupUser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Installation", b =>
|
||||
@ -438,7 +440,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Installation");
|
||||
b.ToTable("Installation", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Organization", b =>
|
||||
@ -573,6 +575,9 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
b.Property<bool>("UseResetPassword")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("UseScim")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("UseSso")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
@ -584,7 +589,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Organization");
|
||||
b.ToTable("Organization", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationApiKey", b =>
|
||||
@ -609,7 +614,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("OrganizationId");
|
||||
|
||||
b.ToTable("OrganizationApiKey");
|
||||
b.ToTable("OrganizationApiKey", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationConnection", b =>
|
||||
@ -633,7 +638,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("OrganizationId");
|
||||
|
||||
b.ToTable("OrganizationConnection");
|
||||
b.ToTable("OrganizationConnection", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationSponsorship", b =>
|
||||
@ -676,7 +681,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("SponsoringOrganizationId");
|
||||
|
||||
b.ToTable("OrganizationSponsorship");
|
||||
b.ToTable("OrganizationSponsorship", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", b =>
|
||||
@ -728,7 +733,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("OrganizationUser");
|
||||
b.ToTable("OrganizationUser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Policy", b =>
|
||||
@ -758,7 +763,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("OrganizationId");
|
||||
|
||||
b.ToTable("Policy");
|
||||
b.ToTable("Policy", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Provider", b =>
|
||||
@ -807,7 +812,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Provider");
|
||||
b.ToTable("Provider", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.ProviderOrganization", b =>
|
||||
@ -839,7 +844,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("ProviderId");
|
||||
|
||||
b.ToTable("ProviderOrganization");
|
||||
b.ToTable("ProviderOrganization", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.ProviderUser", b =>
|
||||
@ -880,7 +885,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("ProviderUser");
|
||||
b.ToTable("ProviderUser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Send", b =>
|
||||
@ -937,7 +942,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Send");
|
||||
b.ToTable("Send", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.SsoConfig", b =>
|
||||
@ -965,7 +970,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("OrganizationId");
|
||||
|
||||
b.ToTable("SsoConfig");
|
||||
b.ToTable("SsoConfig", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.SsoUser", b =>
|
||||
@ -993,7 +998,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("SsoUser");
|
||||
b.ToTable("SsoUser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.TaxRate", b =>
|
||||
@ -1022,7 +1027,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("TaxRate");
|
||||
b.ToTable("TaxRate", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Transaction", b =>
|
||||
@ -1071,7 +1076,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Transaction");
|
||||
b.ToTable("Transaction", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.User", b =>
|
||||
@ -1200,7 +1205,7 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("User");
|
||||
b.ToTable("User", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Cipher", b =>
|
||||
|
Reference in New Issue
Block a user