feat: add multi-tenancy, enrollment tokens, OIDC integration, and branding schemas#30
feat: add multi-tenancy, enrollment tokens, OIDC integration, and branding schemas#30SteveKueng wants to merge 2 commits intoopen-uem:mainfrom
Conversation
…ion, and branding Multi-tenancy schemas: - UserTenant junction table with role (admin/operator/user) and is_default flag - EnrollmentToken schema with token, max_uses, expiry, tenant/site links - Tenant: oidc_org_id and oidc_default_role for OIDC auto-assignment - Certificate: tenant_id for tenant-scoped certificates - Site: enrollment_tokens edge Branding schema: - logo_light, logo_small, primary_color, product_name - login_background_image, login_welcome_text Authentication refactor: - OIDC role fields split into admin/operator/user - Removed is_hoster_tenant and is_super_admin fields Additional fixes: - Remove duplicate disabled field in profile schema - Fix comments in netbirdsettings and memoryslot schemas
…ding - Introduced `show_version` boolean field to control the display of version number in the header. - Added `bug_report_link` and `help_link` string fields for customizable links to bug reports and documentation. - Updated schema, mutation, and relevant methods to handle the new fields. - Set default values for the new fields in the schema and runtime initialization.
|
Hi @SteveKueng, I've done some changes that I think will work better or has more coherence with the way I use ent. I've renamed the UserTenant entitity to RoleAssignment. RoleAssignment has only the role (admin, user, operator) and the edges with tenant and user, so no specific fields are needed (tenant_id, user_id) I've set a relationship between the user and the tenant to establish with users are members of a tenant erDiagram
USER }o--o{ TENANT : members
USER }o--o| TENANT : default
USER ||--|{ ROLEASSIGNMENT : assignment
ROLEASSIGNMENT }|--|| TENANT: assignment
I hope these changes make sense to you, if not we can discuss them As changes to entities affect the migrations, in case you'd like to use the main branch of OpenUEM once I merge your PRs, I should create a specific way to migrate your data for you. |
|
HI @doncicuto |
Summary
UserTenantjunction table (role-based: admin/operator/user) andis_defaultflag for user's primary tenantEnrollmentTokenschema with token, max_uses, current_uses, expiry, and tenant/site links for secure agent registrationoidc_org_id,oidc_default_role)Brandingschema for provider customization (logo, color, product name, login page)tenant_idto Certificate andenrollment_tokensedge to Sitedisabledfield in Profile schemaSchema changes
UserTenant(new)EnrollmentToken(new)Branding(new)TenantUserSiteCertificateAuthenticationProfile