Device posture JSON reference

Available on: Enterprise

The Policy editor's JSON tab and the REST API's policy.postures attribute use the same rule format. JSON provides access to individual provider fields, custom thresholds, and nested logic beyond the ready-made checks in the Simplified tab. See Device Posture for how these checks affect Resource access and when to use each editor.

Rule structure

A posture expression is a JSON object containing a single field comparison or an and, or, or not expression. The top-level value null means that the Policy has no posture requirements.

{
  "field": "intune.compliance_state",
  "op": "is",
  "value": "compliant"
}
KeyMeaning
fieldRequired for a comparison. A supported provider.attribute name from the attribute list. Names are case-sensitive.
opRequired for a comparison. An operator supported by the field's type.
valueThe comparison value. Omit it for exists, does_not_exist, is_empty, and is_not_empty.
rowsOptional for external provider fields: "any" (default) or "all". Controls whether any or every matched provider record must satisfy this comparison. Not allowed on firezone fields.
andA non-empty array of expressions; all must pass. Used instead of comparison keys.
orA non-empty array of expressions; at least one must pass. Used instead of comparison keys.
notOne expression whose result is inverted. Used instead of comparison keys.

An object cannot mix a logical operator with comparison keys, or contain several logical operators. Unknown keys are rejected.

Operators and values

Every type supports exists and does_not_exist. These test whether a field has a non-null value, rather than whether it is truthy or non-empty.

Field typeOperatorsValue format
string, enum_stringis, is_not, is_in, is_not_in, contains, does_not_contain, starts_with, ends_with, matches, does_not_matchA string; is_in and is_not_in take a non-empty array of strings. Regex operators take a pattern string.
booleanisJSON true or false, without quotes.
integer, floateq, ne, gt, gte, lt, lteA JSON number; integer fields require an integer.
versionis, is_not, gt, gte, lt, lteA version string such as "14.4.1". Only firezone.last_seen_version also accepts "@latest".
datetimebefore, after, within_last, not_within_lastAn ISO 8601 timestamp with a time zone for before/after, or a positive ISO 8601 duration such as "PT24H" or "P7D" for relative comparisons.
ip, ipv4, ipv6is_in_cidr, is_not_in_cidrA non-empty array of IP addresses or CIDR strings. ipv4 and ipv6 require the corresponding address family; ip accepts either.
string_arraycontains, does_not_contain, contains_any_of, contains_all_of, is_empty, is_not_emptyA string for contains/does_not_contain; a non-empty string array for contains_any_of/contains_all_of; no value for emptiness checks.
jsonis_empty, is_not_emptyNo value. Tests whether the stored object or array is empty; nested JSON properties cannot be addressed as posture fields.

String comparisons and string-array membership are case-insensitive. enum_string uses the same operators as string; Firezone does not validate comparison values against a fixed enumeration. Use the values reported by your provider.

Regex matching runs against the lowercased field value, but the pattern is not lowercased. Patterns are not implicitly anchored; use ^ and $ when the whole value must match.

Versions are compared as numeric segments, so 14.4 equals 14.4.0 and 14.10 is greater than 14.9. @latest resolves to the current Firezone Client release for the device's platform when the rule is evaluated. It is not supported on provider OS or agent version fields.

before and after are strict comparisons. within_last includes a value exactly at the cutoff; not_within_last requires a value older than the cutoff. A date-only provider value is evaluated at midnight UTC. A passing within_last comparison contributes an expiry time to the authorization.

Evaluation behavior

Missing values and negation

A missing or null field fails every comparison except does_not_exist, including negative operators such as is_not. If no provider record matches, the comparison runs against an empty record. enrolled is a special computed field: it evaluates to false when no record matches.

not inverts the result of an expression, including a failure caused by missing data. For example, not around is true can pass when a boolean is missing; is false requires an explicit false value. Use positive comparisons when the provider must supply evidence.

Multiple records

Each comparison independently evaluates the device's matched records from enabled providers. With the default rows: "any", different comparisons in an and expression can be satisfied by different records from the same provider. rows: "all" requires every matched record to satisfy that comparison. It does not make an absent provider pass.

Platform applicability

Before evaluation, Firezone removes fields that do not apply to the device's platform. Logical branches with no applicable fields are also removed. If nothing remains, the posture expression passes. A Windows-only requirement therefore does not itself exclude macOS devices.

The platform comes from matched provider records first, then the Client's user agent. If it cannot be determined, no fields are removed. The attribute tables below give each provider's default platforms and any field-specific overrides.

Posture rules do not establish device identity. Configure Device Trust and require attestation on the Policy to strongly identify connecting devices. Another matching Policy can still grant access without these requirements.

Examples

These expressions can be used directly in the JSON tab or as the value of policy.postures in a REST API request.

Intune compliance and a check-in within 24 hours

Both checks must pass. Compared with the simplified Recently seen check, this expression selects Intune as the source and shortens the window from seven days to 24 hours.

{
  "and": [
    { "field": "intune.compliance_state", "op": "is", "value": "compliant" },
    { "field": "intune.last_sync_at", "op": "within_last", "value": "PT24H" }
  ]
}

Encryption from either provider, plus a current Firezone Client

The nested or accepts Intune encryption or Iru FileVault evidence on applicable platforms. The outer and also requires the latest Firezone Client version.

{
  "and": [
    {
      "or": [
        { "field": "intune.is_encrypted", "op": "is", "value": true },
        { "field": "iru.filevault_enabled", "op": "is", "value": true }
      ]
    },
    { "field": "firezone.last_seen_version", "op": "gte", "value": "@latest" }
  ]
}

No active threats across all matched SentinelOne records

On supported platforms, this requires every matched SentinelOne record to report zero active threats. Missing threat counts do not pass.

{
  "field": "sentinelone.active_threats",
  "op": "eq",
  "value": 0,
  "rows": "all"
}

REST API

The portal and REST API read and write the same posture expression; there is no separate API rule language. The REST API reference links to the OpenAPI schemas, and REST API setup covers token creation and bearer authentication. Device posture requires the Enterprise entitlement even though the REST API itself is available on all plans.

OperationEndpointPosture behavior
Create a PolicyPOST /policiesInclude postures inside the policy object alongside group_id and resource_id.
Update a PolicyPATCH /policies/{id} or PUT /policies/{id}A supplied policy.postures replaces the entire expression. Omitting it preserves the existing expression.
Read a PolicyGET /policies/{id}The stored expression is returned in data.postures.
Remove posture requirementsPATCH /policies/{id}Send {"policy":{"postures":null}}. The Policy's other conditions remain in effect.

For example, the request body below updates a Policy to require Intune compliance and a check-in within 24 hours:

{
  "policy": {
    "postures": {
      "and": [
        { "field": "intune.compliance_state", "op": "is", "value": "compliant" },
        { "field": "intune.last_sync_at", "op": "within_last", "value": "PT24H" }
      ]
    }
  }
}

With that body saved as policy.json, the authenticated request is:

curl --fail-with-body --request PATCH \
  "https://rest-api.firezone.dev/policies/$POLICY_ID" \
  --header "Authorization: Bearer $FZ_TOKEN" \
  --header "Content-Type: application/json" \
  --data-binary @policy.json

Changing a Policy's posture expression revokes its active authorizations. Sessions relying on that Policy are interrupted until the Client reconnects. The API rejects non-null posture rules with 403 Forbidden when device posture is not enabled for the account, and invalid expressions with 422 Unprocessable Entity.

Limits

LimitMaximum
Logical nesting depth10 levels
Field comparisons per expression100
Items in a comparison value array100
String value length1,024 UTF-8 bytes
Regex pattern length256 UTF-8 bytes

Strings and comparison value arrays must be non-empty. Relative durations must have no negative components and at least one positive component.

Complete attribute list

The tables below list all 339 supported attributes across six namespaces. Use the full name in field; a provider's API property name may differ from the name Firezone exposes here. A dash in the platform column means the provider's default platforms apply. Applicability does not guarantee the provider reports a value for every device.

External providers also expose two computed boolean attributes:

  • enrolled: whether a matching provider record exists. This does not imply compliance, current activity, or MDM enrollment for an EDR provider.
  • os_up_to_date: whether the reported OS meets the newest release of a supported release line. Android uses the latest monthly security patch level. It is null when the available OS data cannot be evaluated.

Provider bookkeeping and secrets are not posture attributes. In particular, synced_at is excluded: use the provider's device activity timestamps to check when it last heard from a device.

Firezone

Prefix: firezone. Default platforms: Windows, macOS, Linux, iOS/iPadOS, Android.

These fields come from the Firezone device record. ipv4 and ipv6 are the device’s Firezone tunnel addresses. The last_attested_* fields record past attestation evidence; their presence does not replace the Policy’s Require attestation condition for the current connection.

AttributeTypePlatform override
firezone.device_serialstring—
firezone.device_uuidstring—
firezone.hostnamestring—
firezone.identifier_for_vendorstring—
firezone.ipv4ipv4—
firezone.ipv6ipv6—
firezone.last_attested_atdatetime—
firezone.last_attested_cert_fingerprintstring—
firezone.last_attested_cert_serialstring—
firezone.last_attested_device_serialstring—
firezone.last_attested_device_uuidstring—
firezone.last_attested_mdm_device_idstring—
firezone.last_seen_remote_ip_location_citystring—
firezone.last_seen_user_agentstring—
firezone.last_seen_versionversion—
firezone.namestring—

Microsoft Intune

Prefix: intune. Default platforms: Windows, macOS, iOS/iPadOS, Android.

AttributeTypePlatform override
intune.android_security_patch_leveldatetime—
intune.attestation_bit_locker_enabledbooleanWindows
intune.attestation_boot_app_security_versionversionWindows
intune.attestation_boot_debuggingbooleanWindows
intune.attestation_boot_manager_security_versionversionWindows
intune.attestation_boot_manager_versionversionWindows
intune.attestation_boot_revision_list_infostringWindows
intune.attestation_code_integritybooleanWindows
intune.attestation_code_integrity_check_versionversionWindows
intune.attestation_code_integrity_policystringWindows
intune.attestation_content_versionversionWindows
intune.attestation_data_execution_policy_enabledbooleanWindows
intune.attestation_early_launch_anti_malware_driver_protectionbooleanWindows
intune.attestation_health_status_mismatch_infostringWindows
intune.attestation_identity_keystringWindows
intune.attestation_issued_atdatetimeWindows
intune.attestation_operating_system_kernel_debuggingbooleanWindows
intune.attestation_operating_system_rev_list_infostringWindows
intune.attestation_pcr0stringWindows
intune.attestation_pcr_hash_algorithmstringWindows
intune.attestation_reset_countintegerWindows
intune.attestation_restart_countintegerWindows
intune.attestation_safe_modebooleanWindows
intune.attestation_secure_bootbooleanWindows
intune.attestation_secure_boot_config_policy_fingerprintstringWindows
intune.attestation_statusenum_stringWindows
intune.attestation_supportedbooleanWindows
intune.attestation_test_signingbooleanWindows
intune.attestation_tpm_versionversionWindows
intune.attestation_virtual_secure_modebooleanWindows
intune.attestation_windows_pebooleanWindows
intune.compliance_grace_period_expiration_atdatetime—
intune.compliance_stateenum_string—
intune.config_manager_compliance_policyboolean—
intune.config_manager_device_configurationboolean—
intune.config_manager_inventoryboolean—
intune.config_manager_modern_appsboolean—
intune.config_manager_resource_accessboolean—
intune.config_manager_windows_update_for_businessboolean—
intune.device_category_display_namestring—
intune.device_enrollment_typeenum_string—
intune.device_namestring—
intune.device_registration_stateenum_string—
intune.eas_activatedboolean—
intune.eas_activated_atdatetime—
intune.eas_device_idstring—
intune.email_addressstring—
intune.enrolledboolean—
intune.enrolled_atdatetime—
intune.enrollment_profile_namestring—
intune.entra_device_idstring—
intune.entra_registeredboolean—
intune.ethernet_mac_addressstring—
intune.exchange_access_stateenum_string—
intune.exchange_access_state_reasonenum_string—
intune.exchange_last_successful_sync_atdatetime—
intune.free_storage_space_bytesinteger—
intune.iccidstring—
intune.imeistring—
intune.intune_idstring—
intune.is_encryptedboolean—
intune.is_supervisedbooleanmacOS, iOS/iPadOS
intune.jail_brokenbooleaniOS/iPadOS, Android
intune.last_sync_atdatetime—
intune.managed_device_namestring—
intune.managed_device_owner_typeenum_string—
intune.management_agentenum_string—
intune.management_certificate_expires_atdatetime—
intune.management_stateenum_string—
intune.manufacturerstring—
intune.meidstring—
intune.modelstring—
intune.notesstring—
intune.operating_systemstring—
intune.os_up_to_dateboolean—
intune.os_versionversion—
intune.partner_reported_threat_stateenum_string—
intune.phone_numberstring—
intune.physical_memory_bytesinteger—
intune.require_user_enrollment_approvalboolean—
intune.serial_numberstring—
intune.subscriber_carrierstring—
intune.total_storage_space_bytesinteger—
intune.udidstring—
intune.user_display_namestring—
intune.user_idstring—
intune.user_principal_namestring—
intune.wifi_mac_addressstring—

Iru (Kandji)

Prefix: iru. Default platforms: macOS, iOS/iPadOS.

AttributeTypePlatform override
iru.activation_lock_allowed_while_supervisedboolean—
iru.activation_lock_bypass_code_failedboolean—
iru.activation_lock_collected_atdatetime—
iru.activation_lock_supportedboolean—
iru.agent_installedboolean—
iru.agent_versionversion—
iru.any_signed_osboolean—
iru.apple_siliconboolean—
iru.asset_tagstring—
iru.blueprint_idstring—
iru.blueprint_namestring—
iru.bootstrap_token_authboolean—
iru.bootstrap_token_escrowedboolean—
iru.cellular_technologyenum_string—
iru.data_roamingboolean—
iru.device_activation_lock_enabledboolean—
iru.device_capacity_gbfloat—
iru.device_familyenum_string—
iru.device_namestring—
iru.display_os_versionversion—
iru.enrolledboolean—
iru.external_boot_levelenum_stringmacOS
iru.filevault_collected_atdatetime—
iru.filevault_enabledbooleanmacOS
iru.filevault_key_escrowedboolean—
iru.filevault_key_rotation_scheduled_atdatetime—
iru.filevault_key_typeenum_stringmacOS
iru.filevault_regeneration_neededboolean—
iru.firewall_allow_signed_applicationsboolean—
iru.firewall_block_all_incomingboolean—
iru.firewall_collected_atdatetime—
iru.firewall_enabledbooleanmacOS
iru.firewall_loggingboolean—
iru.firewall_logging_optionenum_stringmacOS
iru.firewall_stealth_modeboolean—
iru.firewall_unloadingboolean—
iru.firewall_versionversionmacOS
iru.first_enrolled_atdatetime—
iru.gatekeeper_collected_atdatetime—
iru.gatekeeper_enabledbooleanmacOS
iru.gatekeeper_opaque_versionversionmacOS
iru.gatekeeper_trusted_developersboolean—
iru.gatekeeper_versionversionmacOS
iru.host_namestring—
iru.hotspotboolean—
iru.inventory_collected_atdatetime—
iru.iru_idstring—
iru.is_missingboolean—
iru.is_removedboolean—
iru.kext_requires_bootstrap_tokenboolean—
iru.last_check_in_atdatetime—
iru.last_enrolled_atdatetime—
iru.local_hostnamestring—
iru.lost_mode_statusenum_string—
iru.malware_removal_tool_versionversionmacOS
iru.mdm_enabledboolean—
iru.mdm_manages_kextboolean—
iru.modelstring—
iru.model_identifierstring—
iru.model_namestring—
iru.os_buildstring—
iru.os_namestring—
iru.os_up_to_dateboolean—
iru.os_versionversion—
iru.platformenum_string—
iru.secure_boot_levelenum_stringmacOS
iru.serial_numberstring—
iru.shared_ipadboolean—
iru.sip_enabledbooleanmacOS
iru.software_update_requires_bootstrap_tokenboolean—
iru.ssv_enabledbooleanmacOS
iru.startup_settings_collected_atdatetime—
iru.supplemental_build_versionstring—
iru.supplemental_os_version_extraversion—
iru.tagsstring_array—
iru.user_activation_lock_enabledboolean—
iru.user_emailstring—
iru.user_idstring—
iru.user_is_archivedboolean—
iru.user_manages_kextboolean—
iru.user_namestring—
iru.xprotect_versionversionmacOS

Microsoft Defender for Endpoint

Prefix: defender. Default platforms: Windows, macOS, Linux.

Defender records are matched through an Intune record with the same Microsoft Entra device ID. A Defender rule therefore needs a matching Intune record as well as Defender data.

AttributeTypePlatform override
defender.agent_versionversion—
defender.computer_dns_namestring—
defender.defender_idstring—
defender.device_valueenum_string—
defender.enrolledboolean—
defender.entra_device_idstring—
defender.entra_joinedboolean—
defender.exclusion_reasonenum_string—
defender.exposure_levelenum_string—
defender.first_seen_atdatetime—
defender.health_statusenum_string—
defender.ip_addressesjson—
defender.is_excludedboolean—
defender.is_potential_duplicationboolean—
defender.last_external_ip_addressip—
defender.last_ip_addressip—
defender.last_seen_atdatetime—
defender.machine_tagsstring_array—
defender.managed_byenum_string—
defender.managed_by_statusenum_string—
defender.onboarding_statusenum_string—
defender.os_architectureenum_string—
defender.os_buildinteger—
defender.os_platformenum_string—
defender.os_processorstring—
defender.os_up_to_datebooleanmacOS
defender.rbac_group_idinteger—
defender.rbac_group_namestring—
defender.risk_scoreenum_string—
defender.versionstring—
defender.vm_cloud_providerstring—
defender.vm_idstring—
defender.vm_resource_idstring—
defender.vm_subscription_idstring—

Santa

Prefix: santa. Default platforms: macOS.

AttributeTypePlatform override
santa.configured_client_modeenum_string—
santa.enrolledboolean—
santa.first_seen_atdatetime—
santa.hostnamestring—
santa.last_preflight_atdatetime—
santa.last_preflight_ipip—
santa.last_seen_client_modeenum_string—
santa.last_sync_atdatetime—
santa.machine_modelstring—
santa.os_buildstring—
santa.os_typeenum_string—
santa.os_up_to_dateboolean—
santa.os_versionversion—
santa.primary_userstring—
santa.primary_user_groupsstring_array—
santa.rule_sync_atdatetime—
santa.santa_idstring—
santa.santa_versionversion—
santa.santanetd_versionversion—
santa.serial_numberstring—
santa.sip_statusinteger—
santa.tagsstring_array—
santa.temporary_admin_mode_ends_atdatetime—
santa.temporary_admin_mode_userstring—
santa.temporary_monitor_mode_ends_atdatetime—

SentinelOne

Prefix: sentinelone. Default platforms: Windows, macOS, Linux.

AttributeTypePlatform override
sentinelone.account_namestring—
sentinelone.active_protectionstring_array—
sentinelone.active_threatsinteger—
sentinelone.ad_computer_distinguished_namestring—
sentinelone.ad_computer_member_ofstring_array—
sentinelone.ad_last_user_distinguished_namestring—
sentinelone.ad_last_user_member_ofstring_array—
sentinelone.ad_mailstring—
sentinelone.ad_user_principal_namestring—
sentinelone.agent_versionversion—
sentinelone.allow_remote_shellboolean—
sentinelone.apps_vulnerability_statusenum_string—
sentinelone.cloud_providersjson—
sentinelone.computer_namestring—
sentinelone.console_migration_statusenum_string—
sentinelone.core_countinteger—
sentinelone.cpu_countinteger—
sentinelone.cpu_idstring—
sentinelone.detection_stateenum_string—
sentinelone.domainstring—
sentinelone.encrypted_applicationsboolean—
sentinelone.enrolledboolean—
sentinelone.external_idstring—
sentinelone.external_ipip—
sentinelone.firewall_enabledboolean—
sentinelone.first_full_mode_atdatetime—
sentinelone.full_disk_scan_updated_atdatetime—
sentinelone.group_idstring—
sentinelone.group_ipstring—
sentinelone.group_namestring—
sentinelone.has_containerized_workloadboolean—
sentinelone.in_remote_shell_sessionboolean—
sentinelone.infectedboolean—
sentinelone.installer_typeenum_string—
sentinelone.is_activeboolean—
sentinelone.is_ad_connectorboolean—
sentinelone.is_decommissionedboolean—
sentinelone.is_hyper_automateboolean—
sentinelone.is_pending_uninstallboolean—
sentinelone.is_uninstalledboolean—
sentinelone.is_up_to_dateboolean—
sentinelone.last_active_atdatetime—
sentinelone.last_ip_to_managementip—
sentinelone.last_logged_in_user_namestring—
sentinelone.last_successful_scan_atdatetime—
sentinelone.location_enabledboolean—
sentinelone.location_typeenum_string—
sentinelone.locationsjson—
sentinelone.machine_sidstring—
sentinelone.machine_typeenum_string—
sentinelone.missing_permissionsstring_array—
sentinelone.mitigation_modeenum_string—
sentinelone.mitigation_mode_suspiciousenum_string—
sentinelone.model_namestring—
sentinelone.network_interfacesjson—
sentinelone.network_quarantine_enabledboolean—
sentinelone.network_statusenum_string—
sentinelone.operational_stateenum_string—
sentinelone.operational_state_expires_atdatetime—
sentinelone.os_archenum_string—
sentinelone.os_namestring—
sentinelone.os_revisionversion—
sentinelone.os_start_timedatetime—
sentinelone.os_typeenum_string—
sentinelone.os_up_to_datebooleanWindows, macOS
sentinelone.os_usernamestring—
sentinelone.protected_containers_countinteger—
sentinelone.protected_pods_countinteger—
sentinelone.protected_tasks_countinteger—
sentinelone.proxy_consoleboolean—
sentinelone.proxy_deep_visibilityboolean—
sentinelone.proxy_methodenum_string—
sentinelone.proxy_pac_file_usageboolean—
sentinelone.ranger_statusenum_string—
sentinelone.ranger_versionversion—
sentinelone.registered_atdatetime—
sentinelone.remote_profiling_stateenum_string—
sentinelone.remote_profiling_state_expires_atdatetime—
sentinelone.scan_aborted_atdatetime—
sentinelone.scan_finished_atdatetime—
sentinelone.scan_started_atdatetime—
sentinelone.scan_statusenum_string—
sentinelone.sentinelone_account_idstring—
sentinelone.sentinelone_idstring—
sentinelone.serial_numberstring—
sentinelone.site_idstring—
sentinelone.site_namestring—
sentinelone.storage_namestring—
sentinelone.storage_typestring—
sentinelone.tagsjson—
sentinelone.threat_reboot_requiredboolean—
sentinelone.total_memoryinteger—
sentinelone.user_actions_neededstring_array—
sentinelone.uuidstring—

Need help? See all support options.