feat(auth): integrate portal JWT for enhanced authentication and authorization
CI / changes (push) Successful in 6s
CI / commitlint (push) Skipped
CI / openapi (push) Successful in 27s
CI / web (push) Successful in 51s
CI / go (push) Successful in 2m19s
CI / bird2 (push) Successful in 13s
CI / release (push) Successful in 4m24s
CI / changes (push) Successful in 6s
CI / commitlint (push) Skipped
CI / openapi (push) Successful in 27s
CI / web (push) Successful in 51s
CI / go (push) Successful in 2m19s
CI / bird2 (push) Successful in 13s
CI / release (push) Successful in 4m24s
Added support for portal JWT authentication, enabling single sign-on (SSO) capabilities. Updated the application to handle JWT claims for user permissions and roles, enhancing security and access control. Refactored relevant components and API routes to accommodate the new authentication flow, ensuring a seamless user experience. Updated documentation to reflect the new authentication requirements and configurations. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
DROP INDEX IF EXISTS idx_firewall_rule_created_by;
|
||||
DROP INDEX IF EXISTS idx_firewall_client_created_by;
|
||||
DROP INDEX IF EXISTS idx_bgp_peer_created_by;
|
||||
DROP INDEX IF EXISTS idx_module_created_by;
|
||||
|
||||
-- SQLite: recreate tables without column is heavy; leave columns (no-op down for v1).
|
||||
-- Down migration intentionally empty for SQLite ALTER DROP COLUMN compatibility.
|
||||
@@ -0,0 +1,10 @@
|
||||
-- Ownership for portal JWT users (modules, peers, firewall).
|
||||
ALTER TABLE module ADD COLUMN created_by_user_id TEXT;
|
||||
ALTER TABLE bgp_peer ADD COLUMN created_by_user_id TEXT;
|
||||
ALTER TABLE firewall_client ADD COLUMN created_by_user_id TEXT;
|
||||
ALTER TABLE firewall_rule ADD COLUMN created_by_user_id TEXT;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_module_created_by ON module (tenant_id, created_by_user_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_bgp_peer_created_by ON bgp_peer (tenant_id, created_by_user_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_firewall_client_created_by ON firewall_client (tenant_id, created_by_user_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_firewall_rule_created_by ON firewall_rule (tenant_id, created_by_user_id);
|
||||
Reference in New Issue
Block a user