← 返回
未分类 Key 中文

prisma-api

Interact with the Strata Cloud Manager (SCM) API to manage Prisma Access configurations. Authenticate, query, create, update, and delete configuration object...
通过 Strata Cloud Manager(SCM) API 与 Prisma Access 配置进行交互,完成认证、查询、创建、更新和删除配置对象。
leesandao
未分类 clawhub v1.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 405
下载
💾 0
安装
1
版本
#latest

概述

Strata Cloud Manager API Operations

Execute operations against the Strata Cloud Manager (SCM) API for Prisma Access.

Prerequisites

The following environment variables must be set:

export SCM_CLIENT_ID="your-client-id"
export SCM_CLIENT_SECRET="your-client-secret"
export SCM_TSG_ID="your-tsg-id"

Authentication

Obtain an OAuth2 Bearer token before making API calls:

TOKEN=$(curl -s -X POST "https://auth.apps.paloaltonetworks.com/am/oauth2/access_token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=${SCM_CLIENT_ID}" \
  -d "client_secret=${SCM_CLIENT_SECRET}" \
  -d "scope=tsg_id:${SCM_TSG_ID}" | jq -r '.access_token')

Token validity: ~15 minutes. Re-authenticate before expiry.

API Base URL

https://api.sase.paloaltonetworks.com

Supported Operations

When the user specifies $ARGUMENTS, execute the corresponding operation.

List / Query Resources

curl -s -X GET "https://api.sase.paloaltonetworks.com/sse/config/v1/{resource}?folder={folder}&limit=200" \
  -H "Authorization: Bearer ${TOKEN}"

Available resources:

  • addresses, address-groups
  • services, service-groups
  • tags
  • security-rules (add &position=pre or &position=post)
  • nat-rules
  • decryption-rules
  • application-filters, application-groups
  • external-dynamic-lists
  • custom-url-categories
  • url-filtering-profiles
  • anti-virus-profiles, anti-spyware-profiles
  • vulnerability-protection-profiles
  • file-blocking-profiles, wildfire-anti-virus-profiles
  • profile-groups
  • log-forwarding-profiles
  • decryption-profiles
  • hip-objects, hip-profiles

Folder values: "Prisma Access", "Mobile Users", "Remote Networks", "Service Connections"

Create a Resource

curl -s -X POST "https://api.sase.paloaltonetworks.com/sse/config/v1/{resource}?folder={folder}" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{...}'

Update a Resource

curl -s -X PUT "https://api.sase.paloaltonetworks.com/sse/config/v1/{resource}/{id}" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{...}'

Delete a Resource

curl -s -X DELETE "https://api.sase.paloaltonetworks.com/sse/config/v1/{resource}/{id}" \
  -H "Authorization: Bearer ${TOKEN}"

Push Candidate Configuration

Validate and push the candidate configuration:

# Push candidate config
curl -s -X POST "https://api.sase.paloaltonetworks.com/sse/config/v1/config-versions/candidate:push" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"folders": ["Prisma Access"]}'

Check Job Status

curl -s -X GET "https://api.sase.paloaltonetworks.com/sse/config/v1/jobs/{job-id}" \
  -H "Authorization: Bearer ${TOKEN}"

List Config Versions

curl -s -X GET "https://api.sase.paloaltonetworks.com/sse/config/v1/config-versions?limit=10" \
  -H "Authorization: Bearer ${TOKEN}"

Pagination

For resources with more than 200 items, paginate with offset:

# Page 1
curl -s "...?folder=Prisma Access&limit=200&offset=0"
# Page 2
curl -s "...?folder=Prisma Access&limit=200&offset=200"

Continue until total in response matches items retrieved.

Error Handling

  • 401: Token expired. Re-run authentication.
  • 429: Rate limited. Wait 60 seconds before retrying.
  • 400: Check the request body for invalid fields.
  • 409: Object already exists. Use PUT to update.

Safety Rules

  1. Always authenticate first before making any API calls
  2. Never commit without user confirmation — push candidate config and ask user to review before committing
  3. Use dry-run when possible — show what will change before executing
  4. Respect rate limits — add delays between bulk operations
  5. Log all changes — output every API call made for audit trail

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-05-03 11:20 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

prisma-audit

leesandao
审计并验证 Prisma Access 配置是否符合最佳实践和安全标准。用于审查安全策略、检查配置错误等。
★ 0 📥 436

prisma-config

leesandao
为 Strata Cloud Manager (SCM) 生成 Prisma Access 配置。用于创建安全策略、NAT 规则、解密策略、URL 过滤配置等。
★ 0 📥 452

prisma-troubleshoot

leesandao
排查 Prisma Access 问题,包括 GlobalProtect 连通性、策略匹配、隧道状态、SCM API 错误和配置推送失败。使用
★ 0 📥 424