Cosmos is an open-source, self-hosted cloud platform engineered to transform ordinary consumer hardware or retired office computers into an enterprise-class personal workstation and private cloud.
* Passwords hashed with `golang.org/x/crypto/bcrypt`.
* Temporary registration passwords stored in transient, self-expiring memory structures (`sync.Map`) only during automated provisioning—never stored plain-text in database storage.
* Session identification using cryptographically random UUIDs stored in HTTP-only cookies and ScyllaDB secondary index lookups.
* Upon account activation, the Cosmos core automatically invokes the MinIO Client (`mc`) to provision dedicated IAM users.
* Each user is constrained by an isolated AWS IAM policy restricting `s3:*` actions solely to their assigned bucket ARN (`arn:aws:s3:::cosmos-<id>/*`).
* Automatic object versioning is enabled by default to prevent accidental data loss.
* Storage quotas (default 10GB, expandable via admin approval) are enforced at the bucket level.
### 4. Git Engine & Source Control (`Gitea`)
* **Engine:** Gitea self-hosted Git service running on port `3000`.
* **Authentication Sync:**
* Cosmos manages registration and credential synchronization via CLI/API hooks (`gitea admin user create`, `gitea admin user change-password`).
* Auto-healing authentication logic: if credentials fall out of sync during login, Cosmos automatically re-synchronizes the bcrypt hash with Gitea's internal database and retries transparently.
Users can never view or manipulate storage belonging to other accounts. Every S3 access request is validated against ScyllaDB session keys and verified via MinIO IAM policies.
2.**Environment Variable Decoupling:**
All sensitive endpoints, administrative emails, domain names, and database credentials are fully externalized via `.env` configurations.
3.**Transient Memory Buffering:**
Credentials required for downstream provisioning (such as Gitea account creation) exist in memory for a maximum 15-minute window before automatic garbage collection.