Skip to content

Commit 2f6acc7

Browse files
committed
posture check authenticates the device with polling token
1 parent 6593379 commit 2f6acc7

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src-tauri/enterprise/posture/src/posture.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,20 @@ pub async fn authorize_posture_session(location: &Location<Id>) -> Result<String
3434
))
3535
})?;
3636

37+
// Posture checks are authenticated with the instance's config polling token.
38+
let token = instance
39+
.token
40+
.clone()
41+
.filter(|token| !token.is_empty())
42+
.ok_or(Error::NoToken)?;
43+
3744
let posture_data = get_posture_data().await?;
3845

3946
let request = DevicePostureCheckRequest {
4047
location_id: location.network_id,
4148
pubkey: keys.pubkey,
4249
device_posture_data: Some(posture_data),
50+
token: Some(token),
4351
};
4452

4553
let proxy_url = Url::parse(&instance.proxy_url)

src-tauri/proto

0 commit comments

Comments
 (0)