How abhizx18324/3so works
Project type and purpose
• This is a two-part, integrated security system:
• A Node.js-based Single Sign-On (SSO) Identity Provider (IDP) server with multiple client apps and Redis-backed session/token management.
• A Python-based Anomaly Detection microservice (containerized) that fetches login logs from the SSO server, applies rule-based and ML-based detection, and exposes a Streamlit UI for expert verification.
File structure analysis
• Top level:
• README.md (overall overview)
• anomaly-detection/ (Python service)
– Dockerfile, requirements.txt, data/, rule/, rule_engine/, utils/, ui_anomaly_verify.py
• sso_server_client/ (Node.js SSO server + sample clients)
– idp.js (main server), client1.js/ client2.js, package.json, views/ EJS templates
• Patterns & components:
• SSO server (REST API + views)
• Redis for token/session store
• Exposed /admin/logins endpoint for exporting login events
• Python service: data ingestion, rule engine, ML engine, file storage, Streamlit UI
Key architecture notes from README
• SSO flow: User→Client App→IDP→Redis→JWT tokens
• IDP logs attempts and serves logs via HTTP
• Anomaly Detector periodically fetches logs, applies detection, writes to CSV, presents results in UI
• Expert feedback loop updates verified anomaly files, used for retraining