本節列出 device 物件支援的屬性。如果找不到與要求中 ID 相關聯的裝置,則系統會將下列所有屬性評估為錯誤。
屬性
encryption_status
類型
enum
說明
說明裝置的加密狀態。
列舉值:
enumDeviceEncryptionStatus{// The encryption status of the device is not specified or not known.ENCRYPTION_UNSPECIFIED==0;// The device does not support encryption.ENCRYPTION_UNSUPPORTED==1;// The device supports encryption, but is currently unencrypted.UNENCRYPTED==2;// The device is encrypted.ENCRYPTED==3;}
enumOsType{// The operating system of the device is not specified or not known.OS_UNSPECIFIED==0;// A desktop Mac operating system.DESKTOP_MAC==1;// A desktop Windows operating system.DESKTOP_WINDOWS==2;// A desktop Linux operating system.DESKTOP_LINUX==3;// An Android operating system.ANDROID==4;// An iOS operating system.IOS==5;// A desktop ChromeOS operating system.DESKTOP_CHROME_OS==6;}
此外,供應商可以提供自己的鍵和值,並使用 data 屬性進行參照。data 屬性可用的鍵會因供應商而異。比較政策運算式中的鍵值時,請務必保持一致。舉例來說,如果您預期鍵值為字串或布林值,請務必在政策運算式中,將其與字串或布林值進行比較。請注意,如果值是整數,您應在政策運算式中將其與雙精度數比較。
列舉值:
// Health score of the device as provided by the vendor (possibly third party).enumDeviceHealthScore{// The health score for the device is not specified or unknown.DEVICE_HEALTH_SCORE_UNSPECIFIED=0;// The health of the device is very poor.VERY_POOR=1;// The health of the device is poor.POOR=2;// The health of the device is ok.NEUTRAL=3;// The health of the device is good.GOOD=4;// The health of the device is very good.VERY_GOOD=5;}
// Checks if the enterprise certificate associated with the origin matches the device.device.certificates.exists(cert,cert.is_valid && cert.cert_fingerprint==origin.clientCertFingerprint())
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-06-16 (世界標準時間)。"],[[["This document outlines four primary objects—`origin`, `request.auth`, `levels`, and `device`—used to construct Common Expression Language (CEL) expressions for Access Context Manager, each containing specific attributes to evaluate access levels."],["The `origin` object offers attributes like `ip` and `region_code` to define the request's source, allowing checks like whether a user is within a specific IP range or region, and supports the use of `inIpRange` to compare ip addresses."],["The `request.auth` object verifies user authentication, identifying the user's ID (`principal`) and the method used for authentication, such as password, push notification, or security key, via `claims.crd_str` attributes."],["The `device` object provides detailed information about the requesting device, including its encryption status, admin approval, ownership, OS type, and device-specific attributes for third-party vendor data, and the use of security protocols."],["The document also includes function and macro details for defining CEL expressions, such as `inIpRange`, `device.versionAtLeast`, `certificateBindingState`, `has`, and `e.all` , `e.exists` and `e.exists_one` for constructing complex access control rules."]]],[]]