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

Allow passing customer headers from the CLI #2932

Open
jeremyoverman opened this issue Jan 2, 2025 · 2 comments
Open

Allow passing customer headers from the CLI #2932

jeremyoverman opened this issue Jan 2, 2025 · 2 comments

Comments

@jeremyoverman
Copy link

Feature description

The Infisical CLI should support sending custom HTTP headers with requests, such as Cf-Access-Client-Id and Cf-Access-Client-Secret, to facilitate authentication when the Infisical server is protected by a reverse proxy or Cloudflare Access.

Why would it be useful?

This feature would allow users to seamlessly integrate the Infisical CLI with security solutions like Cloudflare Access, which require custom headers for authentication. It would enable users to interact with their Infisical instance in environments where external authentication layers are in place, without needing to bypass or weaken security measures. This would improve compatibility and enhance usability for users with advanced networking setups.

Additional context

Currently, when the Infisical server is protected by Cloudflare Access, the CLI cannot pass the required authentication headers (Cf-Access-Client-Id and Cf-Access-Client-Secret) to gain access. This limitation forces users to use workarounds such as bypass policies, which may not align with their security requirements. Supporting custom headers would provide a more secure and flexible solution.

@akhilmhdh
Copy link
Member

Very interesting! Need to explore more about this and the recommended way other CLI execute it.

@nayyara-airlangga
Copy link

nayyara-airlangga commented Jan 9, 2025

We can use Vault's CLI as an example. They support this in two ways in which we can try to do:

  1. Using multiple --header flags in the format of headername:headervalue to specify the custom headers. Link to PR
  2. Using an environment variable such as INFISICAL_CUSTOM_HEADERS and specify the headers as INFISICAL_CUSTOM_HEADERS=headername1:headervalue1 headername2:headervalue2 where the headers are separated by spaces. Link to PR

I think the first approach might be good to prioritize. I'd be interested to pick this one up if you don't mind @akhilmhdh

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

No branches or pull requests

3 participants