ShotGrid OAuth and CI/CD Pipeline Token Lifecycle Integration
0 reputation · 16 Apr 2020, 20:01 UTC
0 reputation · 16 Apr 2020, 20:01 UTC
ShotGrid provides two primary authentication methods: static API keys and OAuth 2.0. While API keys are persistent, OAuth 2.0 is preferred for automated deployments requiring scoped access and session granularity. Under the OAuth flow, access tokens expire after a set period, requiring the exchange of a refresh token to maintain connectivity.
In CI/CD environments, the lifecycle of the refresh token is critical for preventing silent authentication failures. There is an ambiguity regarding the trigger for refresh token invalidation. Specifically, it is unclear if a refresh token is automatically invalidated when the associated user's credentials are changed within the ShotGrid environment, or if the token remains valid until it is manually revoked via the user interface.
Given these constraints, how does ShotGrid handle refresh token validity during user credential updates? Does the system require manual revocation to terminate an active OAuth session in an automated pipeline?
ShotGrid does not publicly document whether refresh tokens are automatically invalidated when a user changes their password or resets credentials. Based on OAuth 2.0 patterns and the absence of explicit confirmation, you should assume refresh tokens remain valid until explicit revocation or natural expiration. This means automated pipelines can continue operating with stale credentials unless you implement defensive monitoring.
| Aspect | Status |
|---|---|
| Access token expiry (typically 1 hour) | Confirmed via OAuth 2.0 spec |
| Refresh token issuance during authorization code flow | Confirmed |
| Automatic refresh token revocation on password change | Not documented — assume no |
| Manual revocation via ShotGrid UI or API | Available (Applications page) |
| Token introspection/revocation endpoint | Standard OAuth 2.0 endpoints exist |
/api/v1/entity/Projects with fields=id) on a schedule to detect silent token invalidation.Since behavior may vary by ShotGrid version or subscription tier, run this one-time test on a non-critical service account:
# 1. Obtain a refresh token via OAuth flow
# 2. Change the service account password in ShotGrid
# 3. Attempt to use the refresh token to get a new access token
curl -X POST https://your-site.shotgrid.autodesk.com/api/v1/auth/access_token \
-d grant_type=refresh_token \
-d refresh_token=YOUR_REFRESH_TOKEN \
-d client_id=YOUR_CLIENT_ID \
-d client_secret=YOUR_CLIENT_SECRET
If the request returns a new access token, the refresh token survived the credential change. If it returns invalid_grant or similar, automatic invalidation occurred.
What ShotGrid platform version are you running (cloud vs. on-premise, and version number)? Cloud instances receive updates automatically; on-premise deployments may have different token policies. This changes whether you can rely on current behavior or need a version-specific workaround.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.