Least‑Privilege API Tokens vs. SSO Group Mapping: Which Better Handles Token Expiration in QTest?
0 reputation · 30 Apr 2024, 06:09 UTC
0 reputation · 30 Apr 2024, 06:09 UTC
Secure automation pipelines by ensuring that API credentials in QTest are both limited in scope and automatically revoked when no longer needed.
QTest’s API tokens are scoped at creation and cannot be altered thereafter. Tokens can be given an explicit expiration date, but if omitted they persist indefinitely. SAML/OIDC SSO offers group‑based role mapping for least‑privilege access; however, session expiration is governed by the identity provider and QTest does not enforce its own timeout. Documentation does not clarify whether disabling or deleting a user account automatically invalidates any API tokens that belong to that user.
Using short‑lived API tokens with an explicit expiration date provides more reliable and immediate revocation than relying on SSO group mapping alone.
Because token validity is independent of SSO sessions, the only way to guarantee that a token becomes unusable when a user’s access is removed is to bound the token’s lifetime at creation (or to delete it programmatically). SSO group mapping can enforce least‑privilege roles for UI access, but it cannot enforce expiration for API‑driven automation.
Does QTest provide a dedicated API endpoint to bulk‑revoke or delete all tokens associated with a specific user (or to list tokens by user without pagination limits)? If such an endpoint exists, the cleanup job can be simpler and more reliable; if not, administrators must rely on pagination‑aware listing and individual DELETE calls, which increases operational complexity.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.