residential-amenities-platform

Security Baseline

Trust principles

Authentication / session

The authentication foundation uses ASP.NET Core Identity with the application database as the Identity store.

Two first-party client modes are supported:

Web client

Mobile / non-browser client

Account creation

There is intentionally no public registration endpoint.

A resident must not be able to create an account and assign themselves to an arbitrary unit. DEC-014/RB-024 decides that resident onboarding is Administrator-created with email verification and resident-set password.

Password / brute-force baseline

Identity currently enforces:

Password hashes are produced and managed by ASP.NET Core Identity. Plaintext passwords are never persisted by application code.

Authorization

Initial roles:

Policies:

The backend derives roles from the Identity store/claims principal. Role names supplied in client request bodies are never authoritative.

Building/unit authorization remains a separate domain concern through active ResidentMembership records. Authentication answers who the user is; membership answers which building/unit context the user may operate in.

Identity endpoints

Current controlled endpoints:

The check endpoints exist to prove policy enforcement during the foundation phase and can be removed/replaced as real protected use cases appear.

Payments

Implemented in issue #24:

Data

Local configuration baseline

Developer-specific API secrets use .NET User Secrets or environment variables and never live in source-controlled configuration. Development CORS remains an explicit allowlist.

See Local Development Security for secret names, logging rules and the future Mercado Pago/Azure checklist.

Application security backlog

Still to be addressed/refined in later issues:

Cash (issue #25): declaring cash is limited to the reservation’s creator (or an Administrator); confirming receipt is Administrator-only by DEC-015/RB-026, with the actor always taken from the authenticated session and stored on the payment (CashConfirmedByUserId, CashConfirmedAtUtc). The resident-facing payment view never exposes that id.

Audit trail (issue #27)

Administrative operations (issue #26)