common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
955 stars 90 forks source link

add flag that waits for access to be active #682

Closed meyerjrr closed 2 weeks ago

meyerjrr commented 2 weeks ago

What changed?

New flag added to the assume command --wait which when used with a Common Fate integration, will wait for 15 minutes reattempting to grab credentials.

Why?

This flag can be used when requesting access that requires manual approval and activation, removing the need to run the assume command twice.

How did you test it?

See below.

Potential risks

This changes the retry logic to use a constant retry rather than Fibonacci. There is a possibility that the constant attempt at requesting access could cause 429 errors, but in testing this did not happen (over a 10 minute period)

Is patch release candidate?

Link to relevant docs PRs

meyerjrr commented 2 weeks ago

UX now waits for approval and activates automatically when approved Screenshot 2024-06-13 at 11 59 44 AM

If the user cannot self activate, this is the UX Screenshot 2024-06-13 at 11 59 57 AM

chrnorm commented 2 weeks ago

I've also tweaked the error message to be slightly more user friendly, so it now reads Request was approved but failed to activate, you might not have permission to activate. You can try and activate the access using the Common Fate web console.

That said, my issue from above is still present