What is the reason for the RQL filter of get-account-password-policy API?

Announcements

ATTENTION Customers, All Partners and Employees: The Customer Support Portal (CSP) will be undergoing maintenance and unavailable on Saturday, November 7, 2020, from 11 am to 11 pm PST. Please read our blog for more information.

Reply
L1 Bithead

What is the reason for the RQL filter of get-account-password-policy API?

In most RQLs of policies that use the "get-account-password-policy" API, "isDefaultPolicy is true" is checked, but there is no "isDefaultPolicy" in AWSCLI Docs.

 

Why is isDefaultPolicy checked?

 

Sample Default Policy List

1) AWS IAM password policy allows password reuse

config where cloud.type = 'aws' and api.name='aws-iam-get-account-password-policy' AND json.rule='isDefaultPolicy is true or passwordReusePrevention equals null or passwordReusePrevention !isType Integer or passwordReusePrevention < 1'

 

2) AWS IAM password policy does not expire in 90 days

config where api.name='aws-iam-get-account-password-policy' AND json.rule='isDefaultPolicy is true or maxPasswordAge !isType Integer or $.maxPasswordAge > 90 or maxPasswordAge equals 0'

 

AWSCLI Docs

https://docs.aws.amazon.com/cli/latest/reference/iam/get-account-password-policy.html


Accepted Solutions
Highlighted
L0 Member

@KRyu 

 

When querying the API in AWS, if no policy has been defined, no resource is returned, thus we must account for when no policy is defined. The Prisma Cloud platform is a resource centric utility, so we can't check for proper configuration when the resource doesn't even exist. So we create a default value for any account that doesn't have a defined password policy, isDefaultValue is our placeholder/identifier for that circumstance.

View solution in original post


All Replies
Highlighted
L0 Member

@KRyu 

 

When querying the API in AWS, if no policy has been defined, no resource is returned, thus we must account for when no policy is defined. The Prisma Cloud platform is a resource centric utility, so we can't check for proper configuration when the resource doesn't even exist. So we create a default value for any account that doesn't have a defined password policy, isDefaultValue is our placeholder/identifier for that circumstance.

View solution in original post

Highlighted
L1 Bithead

Thanks for your detailed answer.

 

If so, is there a separate API that can use "isDefaultPolicy" as a JSON condition?

I searched Prisma Cloud Docs, but couldn't find an explanation.

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!

The Live Community thanks you for your participation!