pub struct OrgState {
pub smartflow_url: String,
pub vkey: String,
pub device_id: String,
pub policy_group: String,
pub owner_email: Option<String>,
pub enrolled_at: String,
pub platform: String,
pub device_name: String,
pub device_fingerprint: String,
}Fields§
§smartflow_url: StringBase URL of the Smartflow control plane, e.g.
https://smartflow.langsmart.app. Used for every REST call.
vkey: StringVirtual key issued by enterprise_device_api::token_enroll.
Sent as Authorization: Bearer <vkey> on every request.
device_id: StringServer-assigned device id (uuid v4).
policy_group: StringPolicy group this device is bound to. Used to fetch the right
shieldset from /api/enterprise/shield/shieldset/<group>.
owner_email: Option<String>Original enrolling user email (informational; the dashboard shows it in the fleet view).
enrolled_at: StringRFC 3339 timestamp of when this device was enrolled.
platform: StringDevice platform string sent at enrollment time – “macos”, “linux”, or “windows”. Drives policy group resolution on the server.
device_name: StringFriendly device name shown in the fleet view. Defaults to the machine’s hostname.
device_fingerprint: StringHashed device fingerprint – prevents the server from issuing two records for the same physical machine if the user re-enrolls.
Implementations§
Source§impl OrgState
impl OrgState
Sourcepub fn default_path() -> Result<PathBuf>
pub fn default_path() -> Result<PathBuf>
Resolve ~/.aperion-shield/orgmode.json. Honour the
APERION_SHIELD_HOME env override so tests don’t write into
the real user home.
Sourcepub fn load() -> Result<Option<Self>>
pub fn load() -> Result<Option<Self>>
Load if present; Ok(None) means “not enrolled” (the normal
standalone path).
Sourcepub fn fingerprint() -> String
pub fn fingerprint() -> String
Derive a fingerprint that’s stable across re-enrolls on the
same physical machine but doesn’t leak anything sensitive.
SHA-256 of <hostname>|<os-name>|<machine-id-if-available>.