PaloAltoNetworks / PaloAltoNetworks/prisma-sase-sdk-python

Authentication fails

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

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
12
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Unable to authenticate with the API.

Expected behavior

sdk.interactive.login_secret(client_id="automation@12345678.iam.panserviceaccount.com", client_secret="12345678-1234-1234-1234-123456789012", tsg_id=12345678)

Current behavior

unable to authenticate

sdk.interactive.login_secret(client_id="automation@12345678.iam.panserviceaccount.com", client_secret="12345678-1234-1234-1234-123456789012", tsg_id=12345678)
Profile retrieval failed.
Profile retrieval failed.

Possible solution

There was a recent change to the scoped permissions, whereas before we would pass scope in our API call as k/v pair scope: tsg_id:12345678 and now it's scope: profile tsg_id:12345678 email

Steps to reproduce

Try to authenticate in the same fashion as detailed in the documentation

  1. sdk.interactive.login_secret(client_id="automation@12345678.iam.panserviceaccount.com", client_secret="12345678-1234-1234-1234-123456789012", tsg_id=12345678)

Screenshots

2023-02-13_13-05-09

Context

unable to authenticate prevents the use of the SDK.

Your Environment

  • Version used: unable to find version, installed via pip install 'prisma-sase-sdk-python @ https://github.com/PaloAltoNetworks/prisma-sase-sdk-python'

  • Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3): python3.10

  • Operating System and version (desktop or mobile): Windows WSL2 (Ubuntu 20.04)

  • Link to your project: n/a

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 at the SDK's interactive.login_secret entry point and trace how the authentication scope and profile retrieval request are built. Reproduce the documented call in Python 3.10, then verify that authentication completes and profile retrieval no longer fails with the required scoped permissions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, authentication
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.