Commit Graph

10 Commits (e4c68b28941f629723b0b237ceda96799c0e08d5)

Author SHA1 Message Date
a2nr e4c68b2894 feat(security): implement anonymous access with rate limiting and secure proxy, harden authentication and implement session protection
Implements multiple layers of security to address high-risk session
   and authentication vulnerabilities identified in the security review:

   - Allow code compilation (C, Python, Arduino) for anonymous users.
   - Enforce a 1-request-per-2-minutes rate limit for anonymous IPs.
   - Implement a global anonymous compilation queue with 20 concurrent slots.
   - Proxy Velxio (Arduino) compilation through Flask to prevent API hijacking.
   - Exempt authenticated users (tokens/cookies) from all rate limits.
   - Fix networking and DNS resolution in podman-compose.
   - Fix Svelte a11y warnings and trailing slash routing issues.
   - Cookie Security: Added dynamic 'secure' flag support via COOKIE_SECURE
     env variable for HTTPS/Tailscale Funnel compatibility.
   - Rate Limiting: Integrated Flask-Limiter on /login (50 req/min) to
     prevent API abuse while accommodating shared school networks (NAT).
   - Tarpitting: Added 1.5s artificial delay on failed logins to neutralize
     automated brute-force tools without blocking legitimate users.
   - Session Invalidation: Implemented an in-memory token blacklist on
     logout to ensure session tokens cannot be reused.
   - Documentation: Updated technical docs and proposal status to reflect
     the current security architecture.

   Ref: @elemes/proposal.md (Poin 6.1, 6.2, 6.3)
2026-04-22 12:57:54 +07:00
a2nr 7c069660f6 feat: add evaluation configuration support in lesson content and API 2026-04-16 11:12:23 +07:00
a2nr 997ab78f56 feat: improve evaluation system and update circuit editor to use localStorage for persistence 2026-04-10 14:00:35 +07:00
a2nr 74a8d87853 add velxio as submodule 2026-04-09 10:51:36 +07:00
a2nr 1e6c6a884c feat: Enhance lesson functionality with circuit output and key text support, update token generation script for better CSV handling 2026-03-31 14:31:15 +07:00
a2nr d29c2f2e3e feat: Integrate CircuitJS1 into Elemes LMS
- Added CircuitJSApi interface for simulator API interaction.
- Updated lesson page to support circuit simulation alongside code execution.
- Implemented separate output states for code and circuit evaluations.
- Enhanced lesson content rendering to include circuit embeds using markdown.
- Refactored backend to process circuit embed syntax and convert to HTML.
- Updated podman-compose configuration to include new environment variable for cursor offset.
- Created a proposal document outlining the feasibility and implementation plan for CircuitJS1 integration.
2026-03-31 12:08:42 +07:00
a2nr 39d1b18c2a feat: integrate circuitjs1 simulator into frontend with new editor component and service worker support 2026-03-29 17:25:09 +07:00
a2nr 0528df2d37 refactor: optimize performance with lru_cache, update gunicorn to gthread 2026-03-28 20:09:09 +07:00
a2nr d3acfcf825 update green check, button start, de-overwhelm +page, improve mobile ui, add progress page for teacher only, add sessionStorage. 2026-03-27 16:41:57 +07:00
a2nr d2b6d62b28 refactor to make it better 2026-03-25 09:39:51 +07:00