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

Auth login flow and env variables interact in an unclear way #501

Open
pierrelalanne opened this issue Mar 29, 2023 · 0 comments
Open

Auth login flow and env variables interact in an unclear way #501

pierrelalanne opened this issue Mar 29, 2023 · 0 comments
Labels
status:new This issue needs to be reviewed type:bug Something isn't working

Comments

@pierrelalanne
Copy link
Collaborator

Environment

  • ggshield version: 1.14.5
  • Operating system (Linux, macOS, Windows): macOS
  • Operating system version: -
  • Python version: -

Describe the bug

If an API key was generated with ggshield auth login and then revoked in the dashboard, and if in the meantime an environment variable is set for GITGUARDIAN_API_KEY, a new run of ggshield auth login will state that ggshield is already authenticated without an expiry date.

This is not exactly true : ggshield is authenticated indeed, yet this is not due to ggshield auth login, but to the env variable being setup.

Steps to reproduce:

  1. Run ggshield auth login to get a token
  2. From GitGuardian's dashboard : revoke the token
  3. Run ggshield auth login again, this will generate another token
  4. Revoke the token once again from the dashboard
  5. Setup an environment variable GITGUARDIAN_API_KEY with a valid key
  6. Run ggshield auth login, you should get the ggshield is already authenticated without an expiry date message

Expected result:

We would expect the auth login flow to start again.

@pierrelalanne pierrelalanne added type:bug Something isn't working status:new This issue needs to be reviewed labels Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:new This issue needs to be reviewed type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant