id: pingone
name: PingOne
version: 1.0.0
description: "Ping Identity PingOne (Platform API) — identity containment: list and read users, enable/disable a user, and list populations. OAuth2 client-credentials authentication; stdlib-only, no extra Python dependencies."
changelog: "1.0.0 — Initial release: list/get users, enable/disable user, list populations."
category: identity

# Per-instance configuration. Client credentials are exchanged for a token at the
# environment's token endpoint; environment_id scopes all API calls.
config_schema:
  properties:
    auth_url:
      type: string
      description: "PingOne auth base URL (region-specific)"
      default: "https://auth.pingone.com"
    api_url:
      type: string
      description: "PingOne API base URL (region-specific)"
      default: "https://api.pingone.com"
    environment_id:
      type: string
      description: "PingOne environment ID"
    client_id:
      type: string
      description: "Worker application client ID"
    client_secret:
      type: string
      description: "Worker application client secret"
      x-soar-sensitive: true
  required:
    - environment_id
    - client_id
    - client_secret

commands:
  - id: list_users
    name: pingone-list-users
    description: "List users (optionally filter by username or email)."
    risk: read
    inputs_schema:
      properties:
        filter: { type: string, description: "SCIM filter (e.g. username eq \"jdoe\")" }
        limit: { type: number, description: "Max users (default 50)" }
      required: []
    outputs_schema: { properties: {} }
  - id: get_user
    name: pingone-get-user
    description: "Get a single user by ID."
    risk: read
    inputs_schema:
      properties:
        user_id: { type: string, description: "User ID" }
      required: [user_id]
    outputs_schema: { properties: {} }
  - id: disable_user
    name: pingone-disable-user
    description: "Disable a user account (containment)."
    inputs_schema:
      properties:
        user_id: { type: string, description: "User ID" }
      required: [user_id]
    outputs_schema: { properties: {} }
  - id: enable_user
    name: pingone-enable-user
    description: "Enable a user account."
    inputs_schema:
      properties:
        user_id: { type: string, description: "User ID" }
      required: [user_id]
    outputs_schema: { properties: {} }
  - id: list_populations
    name: pingone-list-populations
    description: "List populations."
    risk: read
    inputs_schema:
      properties: {}
      required: []
    outputs_schema: { properties: {} }

  - id: test_connection
    name: pingone-test-connection
    description: "Verify the credentials via the token exchange (used by the Test button)."
    risk: read
    inputs_schema:
      properties: {}
      required: []
    outputs_schema: { properties: {} }
