client-python icon indicating copy to clipboard operation
client-python copied to clipboard

Add capability to add custom headers in opencti http client

Open richard-julien opened this issue 1 year ago • 0 comments

Problem to Solve

In some case it could be interesting to add custom headers in query between worker/connectors and opencti. Case need to be handle in

  • opencti_api_client to add headers
  • connector_helper to get information from the conf

Example in connector configuration

opencti:
  url: 'http://localhost:4000'
  token: 'd434ce02-e58e-4cac-8b4c-42bf16748e84'
  custom_headers: "X-Custom-Header01: some_value;X-Custom-Header02: some_value"

Or by env variable

OPENCTI_CUSTOM_HEADERS="Content-Type: application/json;Authorization: Bearer my_token;X-Custom-Header: some_value"

Separator used is defined with ;

richard-julien avatar Feb 17 '25 17:02 richard-julien