Skip to content

minor: extend device state for secureboot and FDE status - #1977

Draft
aethernet wants to merge 1 commit into
masterfrom
aethernet/report-secureboot-status
Draft

aethernet wants to merge 1 commit into
masterfrom
aethernet/report-secureboot-status

Conversation

@aethernet

@aethernet aethernet commented Mar 14, 2025

Copy link
Copy Markdown
Contributor

@aethernet
aethernet force-pushed the aethernet/report-secureboot-status branch from 9b22c71 to dcc1ab0 Compare March 20, 2025 13:10
Comment on lines +52 to +54
is_secureboot_enabled?: boolean;
is_storage_encrypted?: boolean;
secureboot_keys_metadata?: string | null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

State-patch v2 will never report these props:

Suggested change
is_secureboot_enabled?: boolean;
is_storage_encrypted?: boolean;
secureboot_keys_metadata?: string | null;

Comment thread src/balena.sbvr
Concept Type: Integer (Type)

Term= secureboot keys metadata
Concept Type: Short Text (Type)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Concept Type: Short Text (Type)
Concept Type: JSON (Type)

@@ -0,0 +1,3 @@
ALTER TABLE "device" ADD COLUMN IF NOT EXISTS "is secureboot enabled" BOOLEAN NULL;
ALTER TABLE "device" ADD COLUMN IF NOT EXISTS "is storage encrypted" BOOLEAN NULL;
ALTER TABLE "device" ADD COLUMN IF NOT EXISTS "secureboot keys metadata" JSONB NULL; No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't actually match the generated schema from the sbvr so this would be an invalid migration, it's better to fix at the sbvr level but it's worth noting that you can generate the schema via npm run generate-model-schema and make sure the column types match

Term: memory total
Concept Type: Integer (Type)

Term= secureboot keys metadata

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I wouldn't expose this on v6, if it's info people want then they can update to using v7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants