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

Do not read DISPATCH_API_KEY #15

Closed
wants to merge 1 commit into from

Conversation

chriso
Copy link
Contributor

@chriso chriso commented Apr 17, 2024

We no longer accept an API key via DISPATCH_API_KEY, since it overrides the local configuration and makes it too easy to use the wrong key.

The API key is read from the local YAML configuration (populated by dispatch login). An override can still be provided to all commands via -k,--api-key. If the user really wants to use the value of the DISPATCH_API_KEY environment variable, they can explicitly opt-in by invoking dispatch with --api-key $DISPATCH_API_KEY.

Note that dispatch run sets/overrides the value of DISPATCH_API_KEY before spawning the local application. There's no need to strip the value from the environment, though we could perhaps print a warning if it's set to something other than the value found in local configuration or the one passed to -k,--api-key ?

cc #8.

@chriso chriso self-assigned this Apr 17, 2024
@chriso chriso requested review from achille-roussel and Pryz April 17, 2024 00:13
@chriso
Copy link
Contributor Author

chriso commented Apr 17, 2024

Closing this because we have a use case in mind.

@chriso chriso closed this Apr 17, 2024
@chriso chriso deleted the no-api-key-env-var branch April 17, 2024 01:04
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

Successfully merging this pull request may close these issues.

1 participant