← All Features
Security

Security-First Architecture

JWT auth. bcrypt passwords. Magic byte validation. Rate limiting. Soft deletes.

Security is not a feature — it's a design principle. IUSign implements defense-in-depth across every layer.

How It Works

  1. 1

    User passwords are hashed with bcrypt (cost factor 12) — rainbow tables are useless.

  2. 2

    JWT tokens use HS256 with 24-hour expiry — stolen tokens self-destruct.

  3. 3

    File uploads are validated via python-magic (libmagic) — checking actual file content, not extensions.

  4. 4

    Uploaded files are saved with UUID filenames — no enumeration, no original name exposure.

  5. 5

    Rate limiting: 50 req/day (free), 500 req/hr (solo), 2000 req/hr (growth).

  6. 6

    CSRF protection on all state-changing endpoints.

  7. 7

    Soft deletes: records are marked is_deleted = true rather than physically removed.

Technical Details

JWT: HS256, 24h expiry, issued on login/registration. Stored in localStorage.

bcrypt: bcrypt.hashpw(password.encode(), bcrypt.gensalt(rounds=12)). 12 rounds → ~250ms per hash.

File validation: magic.from_buffer(file_bytes[:2048], mime=True) — only PDF and DOCX allowed.

UUID filenames: uuid4().hex + '.pdf' — 32 hex characters, unguessable.

Rate limiting: Redis INCR with EXPIRE. Key format: rate_limit:{tenant_id}:{endpoint}:{minute}.

Authentication Layers

Layer 1: Email + password (bcrypt, 12 rounds). Layer 2: JWT token (HS256, 24h expiry). Layer 3: API key (SHA256 hashed, Redis cached, tenant-scoped). Layer 4: Public link token (UUID, single-use, expires on signing).

File Upload Security

Every uploaded file goes through: (1) MIME type validation via libmagic, (2) File size limit (50 MB), (3) UUID filename assignment, (4) Storage in a non-public directory, (5) SHA-256 hash computation.

Ready to see it in action?

Create your free account and send your first document in under 3 minutes.

Get Started Free