Skip to content

Updated plan and login flow - #222

Merged
Shachindra merged 9 commits into
prodfrom
main
Jul 2, 2026
Merged

Updated plan and login flow#222
Shachindra merged 9 commits into
prodfrom
main

Conversation

@Shachindra

Copy link
Copy Markdown
Member

No description provided.

Add migration 0016 introducing org_profiles, org_entitlements, and
rebuilt org_members with seat tiers. Orgs now carry plan, billing_status,
and verification_status instead of kind/verified/enrollment_secret.

Implement CreateOrgForUser, SetOrgPlan, AssignSeat, RevokeSeat, and plan
entitlement seeding (basic/starter/pro/business/enterprise). Expose
entitlements, profile, and seat management APIs. Node registration is
temporarily disabled pending Stage 2 registration tokens.
Introduce migration 0017 for org_nodes, org_node_services,
node_registration_tokens, and sentinel_licenses. Re-enable node
registration via scoped registration tokens (with enrollment_secret
legacy alias). Add org node/service APIs and Sentinel license store.
Add ProvisionIncludedPlanResources with Pro (managed Shield node + VPN +
AdGuard service) and Business (3 managed Sentinel nodes, licenses, VPN +
firewall services) flows. Wire SetOrgPlanAndProvision into admin plan
updates. Add managed-node env vars to config and .env.example.
Add migration 0018 for firewall_rules and expose the remaining plan APIs:
public org profiles, member invite, service patch/delete, node REST
heartbeat, and generic firewall lifecycle + Sentinel rule management.

Update OpenAPI with new org, firewall, public, and heartbeat endpoints.
- Validate seat tier against org plan on AssignSeat
- Enforce Shield instance quota org-wide in service validation
- Make Business Sentinel reprovision idempotent when already attached
- List invited members alongside active members
- Audit-log new org/firewall mutation routes

Update GATEWAY.md, ws-protocol.md, and OpenAPI for the org plan model,
registration tokens, and migrations 0016–0018. Add a deferred-work table
for items that need erebrus node integration.
Send Resend invite emails when inviting org members by wallet or email.
Email-only invites persist in org_invites until the invitee verifies their
email; wallet invites activate on login. Canonicalize peer_id as the external
node_id across discovery, PASETO tokens, WS hub, and REST heartbeats while
keeping internal UUID FKs. WS heartbeats now sync org_nodes.last_seen_at.
Nodes register with deployment_profile and auto-attach Shield/Sentinel services.
Firewall sync/restart/reset-credentials dispatch WS commands with rule payloads.
Hello and heartbeat service maps update org_node_services status in the gateway.
@Shachindra
Shachindra requested a review from a team July 2, 2026 06:12
@Shachindra Shachindra self-assigned this Jul 2, 2026
@Shachindra
Shachindra requested review from ansm and removed request for a team July 2, 2026 06:12
@Shachindra
Shachindra merged commit 04c5e45 into prod Jul 2, 2026
9 checks passed
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