Skip to content

feat: add multi-tenancy, enrollment tokens, OIDC integration, and branding schemas#30

Open
SteveKueng wants to merge 2 commits intoopen-uem:mainfrom
EigerCode:feature/multi-tenancy
Open

feat: add multi-tenancy, enrollment tokens, OIDC integration, and branding schemas#30
SteveKueng wants to merge 2 commits intoopen-uem:mainfrom
EigerCode:feature/multi-tenancy

Conversation

@SteveKueng
Copy link

Summary

  • Add multi-tenancy support with UserTenant junction table (role-based: admin/operator/user) and is_default flag for user's primary tenant
  • Add EnrollmentToken schema with token, max_uses, current_uses, expiry, and tenant/site links for secure agent registration
  • Add OIDC tenant auto-assignment fields on Tenant (oidc_org_id, oidc_default_role)
  • Refactor OIDC authentication role fields into separate admin/operator/user fields
  • Add Branding schema for provider customization (logo, color, product name, login page)
  • Add tenant_id to Certificate and enrollment_tokens edge to Site
  • Fix duplicate disabled field in Profile schema
  • Fix comments in netbirdsettings and memoryslot schemas

Schema changes

Schema Change
UserTenant (new) Junction table: user_id, tenant_id, role, is_default
EnrollmentToken (new) token, max_uses, current_uses, expires_at, tenant/site edges
Branding (new) logo_light, logo_small, primary_color, product_name, login_background_image, login_welcome_text
Tenant Added oidc_org_id, oidc_default_role, user_tenants/enrollment_tokens edges
User Added user_tenants edge
Site Added enrollment_tokens edge
Certificate Added tenant_id
Authentication Split OIDC_role into OIDC_role_admin/operator/user
Profile Removed duplicate disabled field

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant