-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Comments
Very interesting! Need to explore more about this and the recommended way other CLI execute it. |
We can use Vault's CLI as an example. They support this in two ways in which we can try to do:
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 |
Custom HTTP Headers Support for Infisical CLIOverviewThis enhancement adds support for custom HTTP headers in the Infisical CLI, enabling seamless integration with security solutions like Cloudflare Access. The implementation allows users to configure custom headers that are automatically included in all requests made by the CLI. Implementation DetailsThe solution introduces a new configuration structure for HTTP headers and modifies the agent manager to handle these headers consistently across all requests. Technical ImplementationAdded an HttpConfig structure to manage custom headers Configuration StructureThe CLI now supports HTTP header configuration through the agent configuration file: infisical:
address: https://app.infisical.com
http:
headers:
Cf-Access-Client-Id: "client-id-value"
Cf-Access-Client-Secret: "client-secret-value" |
Feature description
The Infisical CLI should support sending custom HTTP headers with requests, such as
Cf-Access-Client-Id
andCf-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.
The text was updated successfully, but these errors were encountered: