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

Support for Access Token Option in CLI Commands #61

Open
Silinde87 opened this issue Nov 18, 2024 · 2 comments
Open

Support for Access Token Option in CLI Commands #61

Silinde87 opened this issue Nov 18, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Silinde87
Copy link

Hello,

While reviewing the available commands in the CLI, I noticed that there doesn't appear to be an option to pass the accessToken directly as a command-line argument.

Currently, I can configure the access token through config files to utilize the tool within a pipeline. However, I am concerned that this approach might inadvertently expose the access token if the config files are committed to the repository.

Would it be possible to add support for passing the access token directly as an option in the CLI commands? Alternatively, do you recommend a safer way to use an access token—such as leveraging environment variables—so it can be consumed securely within CLI commands?

Thank you!

@bezoerb
Copy link
Member

bezoerb commented Jan 31, 2025

Hey @Silinde87,

sorry for the late reply.
We definitely can add support for passing the access token via CLI argument.

Setting the token as an environment variable should already work fine.
Just set CONTENTFUL_MANAGEMENT_TOKEN in your ci/cd pipeline

@bezoerb bezoerb added the enhancement New feature or request label Jan 31, 2025
@bezoerb
Copy link
Member

bezoerb commented Jan 31, 2025

we should also improve the documentation to list the available environment variables:

  • CONTENTFUL_SPACE_ID
  • CONTENTFUL_ENVIRONMENT_ID
  • CONTENTFUL_MANAGEMENT_TOKEN

@bezoerb bezoerb added the documentation Improvements or additions to documentation label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants