Policies
Filtering Policy Settings
You can use the policySettings filter to search and filter policy settings in the Turbot Guardrails Console or GraphQL queries.
- The
policySettingsfilter supports the standardsortandlimitkeywords - You can search Standard Guardrails metadata properties such as
timestamp,updateTimestamp, etc. Note that you cannot searchactorIdentityIdortitleinpolicySettingsqueries. - Full Text Search will search/filter both the policy setting and the resource
- You can use Tag Filters. Note that the tag filters are Resource filters - they filter policy settings on resources with these tags.
- You can filter the scope with Hierarchy Scope Filters. Note that these are implicitly set when filtering the policies page in the Guardrails Console.
- You can use
validToTimestampto filter by policy expiration is:orphanwill filter to settings that are orphaned by a higher level required settingis:exceptionwill filter to settings that are an exception to a higher level required setting
Examples
| Aim | Filter text |
|---|---|
| Settings that are orphaned by a higher level required setting | is:orphan |
| Settings that are an exception to a higher level required setting | is:exception |
| Settings expiring in the next week, by expiration date descending | validToTimestamp:>now validToTimestamp:<T+7d sort:validToTimestamp |
| Settings created/updated in the last day, newest first | timestamp:>T-1d sort:-timestamp |
| Settings on a specific resource | resource:162675146433353 level:self |
| Settings on a specific resource and below | resource:162675146433353 |
AWS > S3 > Bucket > Approved policy and sub-policy settings | policyType:tmod:@turbot/aws-s3#/policy/types/bucketApproved |
AWS > S3 > Bucket > Approved policy settings (not AWS > S3 > Bucket > Approved > * sub-policy settings) | policyType:tmod:@turbot/aws-s3#/policy/types/bucketApproved policyTypeLevel:self |
| Settings on AWS policy types | policyType:aws |
| All settings for bucket policy types | policyType:bucket |
Filtering Policy Values
You can use the policyValues filter to search and filter policy values in the Guardrails Console or GraphQL.
- The
policyValuesfilter supports the standardsortandlimitkeywords - You can search standard Guardrails metadata properties such as
timestamp,updateTimestamp, etc. Note that you cannot searchactorIdentityIdortitleinpolicyValuesqueries. - Full Text Search will search/filter both the policy value and the resource
- You can use Tag Filters. Note that the tag filters are Resource filters - they filter policy values on resources with these tags.
- You can filter the scope with Hierarchy Scope Filters. Note that these are implicitly set when filtering the policies page in the Guardrails Console.
- The
valuekeyword allows you to filter policy values set to a specific value - You can search and filter policy values by the policy value state using the
statekeyword. Possible values are:errorinvalidoktbd
Examples
| Aim | Filter text |
|---|---|
| Policy values set to 'Check: Enabled' | value:'Check: Enabled' |
| Policy values for resources with a department tag set to 'sales' | tags:department=/^sales$/i |
| Policy values that are not in an OK state | state:-ok |
| Policy values created/updated in the last day, newest first | timestamp:>T-1d sort:-timestamp |
| Policy values for a specific resource | resource:162675146433353 level:self |
| Policy values for a specific resource and descendant resources | resource:162675146433353 |
AWS > EC2 > Instance > Active policy and sub-policy values | policyType:tmod:@turbot/aws-ec2#/policy/types/instanceActive |
AWS > EC2 > Instance > Active policy values (not AWS > EC2 > Instance > Active > * sub-policy values) | policyType:tmod:@turbot/aws-ec2#/policy/types/instanceActive policyTypeLevel:self |
| Policy values for AWS policy types | policyType:aws |
| Policy values for CIS policy types | policyType:cis |