Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Developer token auth doesnt work anymore #177

Open
tyler-horschig opened this issue Jul 15, 2022 · 4 comments
Open

Developer token auth doesnt work anymore #177

tyler-horschig opened this issue Jul 15, 2022 · 4 comments

Comments

@tyler-horschig
Copy link

  • Cortex Data Lake Python SDK version: Latest
  • Python version: 3.7
  • Operating System: Mac

Description

The developer token authorization no longer works. You get a 400 Bad Request.

{
"msg": "Refresh operation failed: Token refresh failed: {"error_description":"unknown, invalid, or expired refresh token","error":"invalid_grant"}"
}

What I Did

curl -H "Authorization: Bearer $PAN_DEVELOPER_TOKEN" -X POST https://app.apiexplorer.rocks/request_token

@welcome-to-palo-alto-networks

🎉 Thanks for opening your first issue here! Welcome to the community!

@sserrata
Copy link
Member

sserrata commented Jul 15, 2022

Hi @dedsec594, judging by the error message, it appears your grant may have expired. If so, you'll need to reauthorize the instance (delete the existing instance under Authorizations and start the authorization flow from the Cortex hub).

After reauthorizing you may need to generate a new developer token.

@tyler-horschig
Copy link
Author

@sserrata We originally set the token to never expire. Is there a way to set the instance to never expire? We just followed this guide when we set it up: https://cortex.pan.dev/docs/data_lake/learn/apiexplorer_authorization and then this guide: https://cortex.pan.dev/docs/data_lake/learn/developer_tokens to get the developer token.

@sserrata
Copy link
Member

The OAuth 2.0 grant expiration is handled separately from developer token expiration. That said, you may want to open a TAC issue to inquire about setting the grant to never expire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants