PaloAltoNetworks / PaloAltoNetworks/pan.dev

Bug in Perform Config Search api endpoint for Prisma CSPM APIs

Open
#381 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
MDX
Stars
78
Forks
88
Avg merge
5d 17h
Merged PRs (30d)
18

Description

Describe the bug

Trying to create a custom IAM config search query to be saved as a new custom policy. First step is to call api endpoint /search/config

This works as expected for config from cloud.resource queries but fails with 400 response code on any and all config from iam queries.

Expected behavior

API endpoint should be able to create new search for all config queries including IAM

Current behavior

API endpoint fails for all IAM config queries that start with config from iam ...

Possible solution

Steps to reproduce

Using postman:
Endpoint: https://{{api-endpoint}}/search/config
Headers:
headers = {
'x-redlock-auth': '',
'Accept': 'application/json; charset=UTF-8',
'Content-Type': 'application/json'
}
Body as Raw JSON:
{
"query": "config from iam where action.lastaccess.days > 360"
}

Context

Using api.eu endpoint if that makes any difference. Works as expected for config from cloud.resource queries

Your Environment

Postman/Python Script

  • Version used:
  • Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3): Python 3.10, Postman 10.14.3
  • Operating System and version (desktop or mobile): Windows 10
  • Link to your project:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure at /search/config with the provided IAM query and headers, then compare it with a working cloud.resource query. Trace the API implementation or documentation entry point for this endpoint and determine what must change so IAM queries return a successful response and can be saved as custom policies.

Written by the indexing model from the issue text.

Assessment

Tech stack
postman, python
Domain
api, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.