Commit Graph

44 Commits

Author SHA1 Message Date
coryHawkvelt ccd21ccde4 docs: document suspended membership reinstatement paths 2026-06-01 07:46:04 +00:00
coryHawkvelt 55f24ea9e5 feat: hide invite-only networks from non-admin users in listing 2026-05-30 06:40:49 +00:00
coryHawkvelt 2aad17f5e0 feat: add network-level kill switch endpoint 2026-05-30 06:32:26 +00:00
coryHawkvelt f869f6c06d feat: send suspension emails and enhanced audit logs for MFA non-compliance 2026-05-29 05:28:13 +00:00
coryHawkvelt cade827b63 feat: return human-friendly names for network members 2026-05-28 10:19:20 +00:00
coryHawkvelt 2c8160d78e Updated ZeroTier network membership flow and logic 2026-05-28 05:42:04 +00:00
Ubuntu 78bae3c2bb Improvments to logging\auditing 2026-05-19 10:38:26 +00:00
Ubuntu 815084132f refactor: standardize audit logging for ISO27001 compliance 2026-05-14 05:59:49 +00:00
Ubuntu 417d462fb9 Resolved issue with incorrect method for recording ip_address and user_agent 2026-05-08 09:25:27 +00:00
Ubuntu 81a221bd2b refactor: consolidate login audit logging and add superadmin user audit endpoints 2026-05-08 06:26:32 +00:00
Ubuntu c6f36ba62c feat: add user and event filtering to organization activity endpoint 2026-05-07 20:45:44 +00:00
Ubuntu d100fdff3b feat: allow admins to bypass approval flow when joining networks 2026-05-07 20:04:08 +00:00
coryHawkvelt 803bf4f4f2 refactor: consolidate user and superadmin sessions into unified model 2026-04-28 20:54:15 +09:30
coryHawkvelt 02e95a4199 feat(organizations): email inviter when membership invite is accepted
When a user accepts an org invite, send a notification email to the
person who sent the invite with membership details (member name, email,
org name, role) and an optional View Organization button.

Added build_invite_accepted_html() template to email_templates.py,
wired it into the accept_invite() handler, and added a test case.
2026-04-26 18:36:58 +09:30
coryHawkvelt d48e6b2f97 feat: add sliding session timeout with idle and absolute caps 2026-04-26 18:12:37 +09:30
nexgen_mirrors de6f39e7e3 feat(ssh): change SSH key uniqueness to per-user scope
Previously, SSH key fingerprints were globally unique across all users,
preventing the same key from being registered by different users. This
change makes fingerprint uniqueness scoped to individual users.

- Remove global unique constraints on payload and fingerprint columns
- Add composite unique constraint on (user_id, fingerprint)
- Make add_ssh_key operation idempotent for same user
- Return tuple (SSHKey, is_new) from service to indicate creation status
- Update API to return 200 for existing keys, 201 for new keys

BREAKING CHANGE: API behavior changed - duplicate key addition now
returns 200 OK instead of 409 Conflict. Service method signature changed
from returning SSHKey to tuple[SSHKey, bool].
2026-04-25 06:22:08 +09:30
nexgen_mirrors eb2fc6c8b3 Added soft deletes to all deletion functions and added deleted_at filters as required 2026-04-22 17:27:49 +09:30
nexgen_mirrors 1778dd85d5 Add superadmin routes to API 2026-04-21 17:11:03 +09:30
nexgen_mirrors 7550940934 feat(api): return 403 when attempting to remove last owner
Handle edge case where removing a member would leave an organization
without any owners. Service layer raises ValueError for this scenario,
which the API endpoint catches and converts to a forbidden response
with actionable error message about transferring ownership.
2026-04-20 16:37:04 +09:30
nexgen_mirrors b2c2acc84f feat(org): add organization limit per user
Add 10 organization limit per user to prevent abuse. Includes
graceful fallback if count service is unavailable.

- Add get_user_org_count method to OrganizationService
- Check org count before allowing new organization creation
- Improve invite email mismatch error message for logged-in users
2026-04-20 15:04:44 +09:30
nexgen_mirrors 29d54ca109 feat(api): add contact form endpoint for website enquiries
Add POST /api/v1/contact endpoint to handle contact form submissions
from the marketing website. Includes:
- ContactSchema for validation with HTML sanitization
- Honeypot field for spam protection
- Rate limiting (5 per hour)
- Email notification to info@secuird.tech via NotificationService
2026-04-17 15:55:19 +09:30
nexgen_mirrors 7480e9d62b fix(user): filter out soft-deleted memberships and organizations
Add get_active_memberships() method to User model that filters out
soft-deleted memberships and memberships of deleted organizations.
Update all usages of organization_memberships to use this method,
ensuring consistent handling of soft-deleted records across the
codebase. Also add deleted_at filters to CA queries in SSH helpers.
2026-04-10 00:39:44 +09:30
coryHawkvelt 6325d60097 feat(email): use HTML templates for all transactional emails
- Update org invite, password reset, email verification, and account activation emails to use HTML templates
- Update MFA deadline reminder and suspension notifications to use HTML templates
- Add html_body parameter to _send_email_async for rich email content
2026-04-05 15:44:22 +00:00
nexgen_mirrors 41bbdb4bef feat(email): add provider abstraction and HTML templates
Add pluggable email provider system supporting SMTP, Mailgun, and SendGrid
with factory pattern for runtime provider selection. Includes branded HTML
email templates for verification, password reset, MFA notifications, and
organization invites.

Also rebrands all email content from Gatehouse to Secuird, adds email
provider configuration options, and fixes duplicate log handlers in
development mode.
2026-04-04 16:55:00 +10:30
JamesBhattarai 2b6f7e15af Feat(Fix): Multi-Tenant Zerotier Org Setups
Imports Network From Zerotier
Async Emails
Migration guardrails
Admin to see all approvals states
2026-03-31 12:33:56 +05:45
JamesBhattarai a7915c9328 Fix: SSH key verification — accept raw armor + base64, clearer error messages 2026-03-22 16:06:14 +05:45
JamesBhattarai f334000da3 Feat: Implemented SUDO Department & API Key, CA Serial 2026-03-22 16:06:12 +05:45
nexgen_mirrors 1789590167 feat(zerotier): add ZeroTier network governance module
Add comprehensive ZeroTier integration for managing network access:

- Portal networks: manager-created ZeroTier network bindings
- Device registration: user-owned ZeroTier node endpoints
- Approval workflows: request/approve/revoke network access
- Activation sessions: time-limited network authorization
- Kill switch: emergency access revocation
- Reconciliation job: sync portal state with ZeroTier controller

Includes ZeroTier client SDK supporting both Central and self-hosted
controller APIs, with full CRUD operations for networks and members.
2026-03-20 21:50:20 +10:30
JamesBhattarai cc9dc5064e Fix: Migration
oidc_jwks_keys table doesn't exist
uix_org_provider_type constraint multiple use
transaction abort/never rolled back
2026-03-05 11:35:09 +05:45
JamesBhattarai 7cb522b590 Feat(Chore, Fix): Refractor, Half Baked Deletion + Admin Privilege
Refractor Codes into sub file/folders
Admin can remove users'/members mfa/2fa, unlink account from  oauth provider
Admin can  add/reset password
Different Email (OIDC + Manual)-Same Account; (Block Linking and authorize if available)
2026-03-04 18:49:04 +05:45
JamesBhattarai ea1bacc794 Fix: Deletion Deadlocks (Owner, User) 2026-03-03 23:22:50 +05:45
JamesBhattarai 34f2dc070c Fix: CA host Sign via web 2026-03-03 18:02:45 +05:45
JamesBhattarai 5250d18eb0 Fix(Feat): CA, Audits, Rte Limit
CA Encryption, Serials, Rate Limiter, Account suspension blocks login
Transfer Ownership & Delete Account
2026-03-02 23:53:51 +05:45
JamesBhattarai 9875216861 Feat(Fix): User & Org Setup Initial (Invite + Create on own) & Fix: User Suspension 2026-03-01 20:42:48 +05:45
JamesBhattarai a0d4e59c24 Feat(Chore): Verify Flow, Invites, Suspend, Depart Cert Policy
feat: add password reset and email verification flow
feat: add org invite listing, cancellation, and invite link fallback
feat: add user suspend/unsuspend with audit logging
feat: add department certificate policy (expiry, extensions)
feat: enforce dept cert policy on SSH certificate signing
feat: wire up OIDC consent and token flow (replace mocks)
feat: rework CLI auth bridge to use frontend login flow
feat: add admin OAuth provider management (CRUD)
chore: refactor model import paths after module reorganisation
chore: clean up config, decorators, and dev tooling
2026-03-01 20:42:48 +05:45
JamesBhattarai e79c584c50 Feat(Fix): Key Timezone, Expiry, Depart Link 2026-02-28 23:48:07 +05:45
JamesBhattarai b2212ab4d6 Feat: Added CA-merged with Securid-Principals, Depart, Client-CLI 2026-02-27 21:59:01 +05:45
JamesBhattarai 1ba5738d52 Feat: OIDC UI bridge, Microsoft SSO,, and schema session flaws
- OAuth Callback to Use Gatehouse UI to login instead of Backend Served dull ui
- Setup Autoregister of user + org, on oauth
- Microsoft Oauth Support
- OIDCRefreshToken.access_token_id  had a narrow Column increased to VAR(255) and remove FK to sessions.id which had no use
- client_id and client.id mismatch ,backup-code consumption
2026-02-26 23:18:31 +05:45
coryHawkvelt ae2421763a google login works 2026-01-21 03:09:46 +10:30
coryHawkvelt 4cf4a27c9a can link google accounts! 2026-01-20 15:54:00 +10:30
coryHawkvelt d063a0ca81 enable policies 2026-01-16 17:31:20 +10:30
coryHawkvelt b2e084db33 fix(webauthn): ensure provider_data JSON changes are detected by SQLAlchemy
Add flag_modified() calls after modifying provider_data dictionary to
explicitly mark the field as changed. SQLAlchemy does not automatically
track mutations to JSON fields, which could result in changes not being
persisted to the database.
2026-01-16 11:34:40 +10:30
coryHawkvelt af0281281a web authn working! 2026-01-16 11:25:27 +10:30
coryHawkvelt 2c0aaf484b move app to gatehouse-app 2026-01-15 03:40:29 +10:30