broamski / aws-mfa

Manage AWS MFA Security Credentials
MIT License
1.01k stars 163 forks source link

Is there an option to clear the session token? #48

Open mark-sawers opened 4 years ago

mark-sawers commented 4 years ago

Would be nice to clear or pre-expire the token. This is more for testing policies, profiles and such, so may not be a common use case.

The workaround is to manually delete the entries in the ~/.aws/credentials file.

martin-displayr commented 10 months ago

Another use case is when you want to restart the clock on that 36 hour max window. Because if you do another aws-mfa --device arn:aws:iam::123:mfa/abc --duration 129600 when already authenticated, it will say something like:

INFO - Validating credentials for profile: default INFO - Your credentials are still valid for 18999.929462 seconds they will expire at 2023-09-11 14:42:44

hmoffatt commented 10 months ago

Another use case is when you want to restart the clock on that 36 hour max window.

Doesn't the force option achieve this?