common-fate / granted

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

🐛 Fix SSO token lookup keys #564

Closed cedieio closed 7 months ago

cedieio commented 7 months ago

What changed?

Updated GetValidSSOToken to use a combination of SSOStartURL and SSOSessionName and GetValidSSOTokenFromPlaintextCache to use SSOStartURL for lookup keys

Why?

The lookup key for GetValidSSOToken has been updated and the code I pushed had the wrong lookup causing panic when trying to export sso as it was finding a nil token. Updated GetValidSSOToken to use the combination of SSOStartURL and SSOSessionName to find it properly. Also updated GetValidSSOTokenFromPlaintextCache to only use SSOStartURL as it's the valid value. Should move to use SSOSessionName in the future. Fix for issue #563.

How did you test it?

sudo make clean
sudo make go-binary
sudo make cli
dassume --export-sso-token

Potential risks

Is patch release candidate?

Link to relevant docs PRs