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

CSP Token exchange still can fail #122

Open
petewall opened this issue Jul 12, 2022 · 1 comment
Open

CSP Token exchange still can fail #122

petewall opened this issue Jul 12, 2022 · 1 comment

Comments

@petewall
Copy link
Contributor

Even after the code to retry the token request, I'm still seeing intermittent issues with token exchange errors:

$ MARKETPLACE_ENV=staging mkpcli attach vm -p gp-releng-test-1 -v 6.99.99 --create-version --file gpdb6-photon3-ova/greenplum-virtual-machine-v2.0.0-greenplum-6.99.99-photon3.ova --pca-file gpdb6-ova-pca/gpdb-pca-1.0.0.pdf
Error: failed to exchange api token: failed to exchange refresh token for access token: 400

Error: failed to initialize token services: failed to parse CSP Public key: invalid character '<' looking for beginning of value

Error: failed to exchange api token: failed twice to exchange refresh token for access token: 503 Service Unavailable

@petewall
Copy link
Contributor Author

A few possible fixes:

  1. Implement retry logic for all errors, not just 503
  2. Implement retry logic for the whole key exchange
  3. Allow for the auth token to be supplied and if so, shortcut the whole token exchange piece. This has the advantage of speeding up multiple calls in sequence

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

1 participant