enhancement
major
minor
defect
critical
major
minor
major
#30095
OpenAPI Client: Parameter Value from a Secret Source
Background
The parameters for a call to an OpenAPI interface are configured using a ValueProducerFactory. Currently, the options available are a function argument (ParameterValue), a constant value (ConstantValue), and a computed value (ComputedValue).
If an interface expects a secret as a parameter (e.g., an API key or a token in a query, header, or path parameter), it must currently be specified as a constant value in plain text in the configuration.
Change
New ValueProducerFactory SecretValue (tag secret-value). Its value comes from a SecretSource, which is re-read each time the interface is called. A rotated secret is thus used without restarting the application.
The ` secret ` property accepts the same formats as the other secret properties:
- Element without a class: Name of a secret in the installation’s secret store (recommended).
- Element with a class: another source, e.g., FileSecretSource or EnvironmentSecretSource.
- Attribute value: encrypted secret (or prefixed with ` unencrypted:`).
{{{#!xml <value class="com.top_logic.service.openapi.client.registry.impl.value.SecretValue">
<secret name="my_api_key"/>
</value> }}}