Skip to content

Add properties to config file along with serialization/deserialization logic #2733

@aaronburtle

Description

@aaronburtle

In order to support using Azure Key Vault to store secrets, we will provide users with a way to configure the way that we retrieve these secrets. We will require that the user include the azure-key-vault property, which if they wish to use secrets must include an endpoint. Once an endpoint is included we then can allow them to configure a number of properties that make up the retry-policy. We therefore add the following to the DAB config schema at the top level and include the ability to configure these settings use the CLI dab configure command.

{
  "azure-key-vault" : {
    "endpoint": "url", (string, not required)
    "retry-policy": {
        "mode": "fixed | exponential", (enum, default: exponential)
        "max-count": 3, (integer, default: 3)
        "delay-seconds": 1, (integer, default: 1)
        "max-delay-seconds": 100 (integer, default: 60),
        "network-timeout-seconds": 100 (integer, default: 60),
    }
  }
}

JSON Schema

Update our JSON schema. Add properties and constraints and defaults.

  1. azure-key-vault.retry-policy.mode requires azure-key-vault.endpoint
  2. azure-key-vault.retry-policy.max-count requires azure-key-vault.endpoint
  3. azure-key-vault.retry-policy.delay-seconds requires azure-key-vault.endpoint
  4. azure-key-vault.retry-policy.max-delay-seconds requires azure-key-vault.endpoint AND azure-key-vault.retry-policy.mode == exponential
  5. azure-key-vault.retry-policy.network-timeout-seconds requires azure-key-vault.endpoint

CLI updates

Add command line support.

  1. Add dab configure --azure-key-vault.endpoint
  2. Add dab configure --azure-key-vault.retry-policy.mode
  3. Add dab configure --azure-key-vault.retry-policy.max-count
  4. Add dab configure --azure-key-vault.retry-policy.delay-seconds
  5. Add dab configure --azure-key-vault.retry-policy.max-delay-seconds
  6. Add dab configure --azure-key-vault.retry-policy.network-timeout-seconds

Reference other PRs that have included additions to the config file to see broader context of how new properties in the config need to be integrated into the broader codebase. For an example of adding to the object model and config/schema see: #2606

For an example of adding CLI configure options see: #2435

Metadata

Metadata

Assignees

Labels

cliconfigchanges related to config

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions