This document defines the local configuration baseline before cloud deployment.
Use this order of preference:
.env only for local tooling that requires it; the real .env file is ignored by Git.Never commit real credentials to:
appsettings*.json;.env.example;The repository’s .env.example contains only development placeholders.
Example:
dotnet user-secrets set "ConnectionStrings:Postgres" "Host=localhost;Port=5432;Database=residential_amenities;Username=residential_app;Password=local_dev_only" --project apps/api/ResidentialAmenities.Api.csproj
List configured development secrets:
dotnet user-secrets list --project apps/api/ResidentialAmenities.Api.csproj
Do not paste the output into issues, CI logs or screenshots.
Development origins are explicitly allowlisted in appsettings.Development.json.
Current local origins:
http://localhost:4200http://localhost:8100Do not replace this with AllowAnyOrigin() when credentials/cookies are enabled.
Production origins will be configured separately and must not inherit a wildcard.
Application code and operational tooling must not log:
Structured logs may contain safe identifiers such as:
Sensitive-data logging in EF Core must remain disabled outside tightly controlled local debugging.
Treat these as secrets:
MercadoPago:AccessToken;MercadoPago:WebhookSecret;Only the configuration names are in source control; the checked-in
appsettings*.json never contain values. Set your own (test) credentials
locally with User Secrets, or with environment variables
(MercadoPago__AccessToken, MercadoPago__WebhookSecret):
dotnet user-secrets set "MercadoPago:AccessToken" "<your test access token>" --project apps/api/ResidentialAmenities.Api.csproj
dotnet user-secrets set "MercadoPago:WebhookSecret" "<your webhook secret>" --project apps/api/ResidentialAmenities.Api.csproj
Non-secret settings (MercadoPago:ApiBaseUrl, SuccessUrl, PendingUrl,
FailureUrl, WebhookToleranceSeconds, RequestTimeoutSeconds) may live in
configuration. Tests and CI use a fake provider and need no credentials.
Additionally never log: the full x-signature, the Authorization header,
or unnecessary payer personal data. The webhook logs only the failure
category of a rejected signature. PaymentProviderEvents stores identifiers,
never payloads, payer data or signatures.
Public identifiers may be configuration, but must still be documented separately from secrets.
Production should prefer Azure-managed identity/service-to-service authentication where supported.
Secrets that cannot be removed should move to the selected managed secret store (expected direction: Azure Key Vault) and be referenced by the runtime rather than copied into source control or Terraform variables committed to Git.
Terraform state itself is sensitive and must never be committed to this repository.
Before merging a change that introduces configuration:
The AuditLogs table stores business facts only. It must never receive
passwords, tokens, cookies, secrets, Authorization headers, x-signature,
connection strings, card data, full request bodies or the e-mail typed at
login. Metadata is produced by the typed helpers in AuditMetadata; if a new
fact needs a new field, add it to that allowlist deliberately rather than
serializing an object.