Files
admin/_docs/02_document/modules/common_requests_get_resource.md
T
Oleksandr Bezdieniezhnykh c7b297de83
ci/woodpecker/push/01-test Pipeline failed
ci/woodpecker/push/02-build-push unknown status
refactor: remove deploy.cmd and update Dockerfile for health checks
- Deleted the deploy.cmd script as it was no longer needed.
- Updated Dockerfile to include curl for health checks and added a non-root user for improved security.
- Modified health check command to use curl for better reliability.
- Adjusted docker-compose.test.yml to reflect changes in health check configuration.
- Cleaned up appsettings.json and removed unused configuration properties.
- Removed Resource entity and related requests from the codebase as part of the architectural shift.
- Updated documentation to reflect the removal of hardware binding and related endpoints.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-13 08:47:21 +03:00

1.8 KiB

Module: Azaion.Common.Requests.GetResourceRequest

Purpose

Request DTO and validator for the POST /resources/get/{dataFolder?} endpoint. The user's password is supplied per-request so the server can derive the per-user AES encryption key for the response stream.

Cycle 1 (2026-05-13) note — the Hardware property and its BadHardware validator rule were removed by AZ-197 (admin-side hardware-binding cleanup). The wire-compat policy was "drop entirely" — any client still sending Hardware will not see it deserialized. The companion CheckResourceRequest was removed along with the POST /resources/check endpoint. See _docs/03_implementation/batch_06_report.md.

Public Interface

GetResourceRequest

Property Type Description
Password string User's password (used to derive the encryption key)
FileName string Resource file to retrieve

GetResourceRequestValidator

Rule Constraint Error Code
Password min length >= 8 chars PasswordLengthIncorrect
FileName not empty Required WrongResourceName

Internal Logic

Validator uses BusinessException.GetMessage() to derive user-facing error messages from ExceptionEnum.

Dependencies

  • BusinessException, ExceptionEnum
  • FluentValidation

Consumers

  • Program.cs POST /resources/get/{dataFolder?} endpoint

Data Models

None.

Configuration

None.

External Integrations

None.

Security

  • Password is sent in the POST body (not URL) to avoid logging in access logs.
  • Per-user encryption key derivation now uses email + password only (see services_security.md).

Tests

  • e2e/Azaion.E2E/Tests/ResourceTests.cs (encrypted download / round-trip) — updated by AZ-197 to stop sending Hardware