mirror of
https://github.com/azaion/admin.git
synced 2026-06-21 12:21:09 +00:00
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>
This commit is contained in:
Vendored
-24
@@ -1,24 +0,0 @@
|
||||
-- Resources table — stores per-artifact metadata for fleet OTA updates. Populated by CI/CD
|
||||
-- via POST /resources/publish; queried by devices via POST /get-update. AZ-183.
|
||||
|
||||
create table if not exists resources
|
||||
(
|
||||
id uuid primary key,
|
||||
resource_name varchar(120) not null,
|
||||
dev_stage varchar(40) not null,
|
||||
architecture varchar(40) not null,
|
||||
version varchar(40) not null,
|
||||
cdn_url varchar(500) not null,
|
||||
sha256 varchar(128) not null,
|
||||
encryption_key text not null, -- AES-encrypted at rest with ResourcesConfig.EncryptionMasterKey
|
||||
size_bytes bigint not null,
|
||||
created_at timestamp not null default now()
|
||||
);
|
||||
|
||||
-- Latest-version-per-resource lookups filter by (architecture, dev_stage); index supports
|
||||
-- both the in-memory cache miss path and the per-(arch,stage) GROUP BY.
|
||||
create index if not exists resources_arch_stage_idx
|
||||
on public.resources (architecture, dev_stage, resource_name, version);
|
||||
|
||||
grant select, insert, update, delete on public.resources to azaion_admin;
|
||||
grant select on public.resources to azaion_reader;
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
-- Enforce uniqueness on users.email. Closes the duplicate-row race in
|
||||
-- UserService.RegisterUser / RegisterDevice (security audit finding F-3, 2026-05-13).
|
||||
-- Application code (Azaion.Services/UserService.cs) catches the resulting
|
||||
-- Npgsql.PostgresException(SqlState=23505) and surfaces it as
|
||||
-- BusinessException(EmailExists, code 5).
|
||||
create unique index if not exists users_email_uidx on public.users (email);
|
||||
Reference in New Issue
Block a user