datree icon indicating copy to clipboard operation
datree copied to clipboard

Configure a custom "default" schema location and policy config for air gapped environments

Open uriahrokach opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe.

We want to use datree in our air - gapped environment, and so far it's working great, but every time we use it we have to specify --schema-location and --policy-config and then specify our own configuration.

We would like to write a configuration of our own, upload it to git, and then configure it as our default policy, so that we don't have to specify every time.

This would also benfit other teams in our company that would like to use datree, for which we can configure our own policy and then distribute our configuration.

Describe the solution you'd like

There are two good possible solutions in my opinion: The first being two environment variables for the DATREE_SCHEMA_LOCATION and DATREE_POLICY_CONFIG. The second can be configuring this using datree config command.

Describe alternatives you've considered

We have have thought of creating an alias or a bash function for the datree command that contains this, but this would be much better "out of the box".

uriahrokach avatar Jul 24 '22 07:07 uriahrokach

Great idea! Here are the product requirements for who ever wants to grab this one:

  1. Configure --policy-config and --schema-location values by adding it to the config file using the datree set config command or editing the config yaml file itself.
  2. Order for reading values- CLI flag command > Env variable > Config file

adifayer avatar Jul 24 '22 13:07 adifayer

@adifayer I would like to contribute on this enhancement. And I am working on it.

Meyazhagan avatar Apr 10 '23 17:04 Meyazhagan

@Meyazhagan you got it.

eyarz avatar Apr 11 '23 06:04 eyarz