Skip to content

fix(ee): remove broken curl-based Automation Hub token validation#554

Merged
rockygeekz merged 2 commits intoansible:mainfrom
cidrblock:fix/remove-token-curl-validation
Mar 24, 2026
Merged

fix(ee): remove broken curl-based Automation Hub token validation#554
rockygeekz merged 2 commits intoansible:mainfrom
cidrblock:fix/remove-token-curl-validation

Conversation

@cidrblock
Copy link
Copy Markdown
Collaborator

Summary

  • Removes the "Validate Automation Hub Token" step from the scaffolded EE workflow
  • The step was broken: it sent the offline/refresh token directly as a Bearer token to console.redhat.com/api/automation-hub/, which always fails (401/403) because the token must first be exchanged for an access token via Red Hat SSO (sso.redhat.com/.../openid-connect/token)
  • Valid tokens were reported as invalid, while the build itself succeeded because ansible-galaxy handles the SSO exchange automatically via the auth_url in ansible.cfg
  • The "Check if tokens are configured" steps remain, so downstream jobs still know whether secrets are present

Why not fix the validation?

Exchanging the offline token via SSO would require hardcoding the Red Hat SSO URL and client_id, adding jq as a dependency, and would only work for console.redhat.com (not on-prem PAH). The build step is the authoritative check — if the token is bad, ansible-galaxy collection install will fail with a clear error.

Reported by

@NilashishCinternal feedback

Test plan

  • pytest — 196 passed, 3 skipped
  • pre-commit run --all-files — all checks passed
  • Fixtures regenerated

Made with Cursor

cidrblock and others added 2 commits March 24, 2026 14:09
The "Validate Automation Hub Token" step sent the offline/refresh
token directly as a Bearer token to console.redhat.com, which always
fails because the token must first be exchanged via Red Hat SSO. This
caused valid tokens to be reported as invalid, while the build itself
succeeded (ansible-galaxy handles the SSO exchange via auth_url).

Remove the curl validation and let the build be the authoritative
check. The "Check if tokens are configured" steps remain so
downstream jobs still know whether secrets are present.

Made-with: Cursor
@NilashishC NilashishC force-pushed the fix/remove-token-curl-validation branch from 0cfca70 to 50fd20d Compare March 24, 2026 08:39
@github-actions github-actions bot added fix and removed fix labels Mar 24, 2026
@rockygeekz rockygeekz merged commit b2f55f7 into ansible:main Mar 24, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants