-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Title: Support prefix specification in generic credential injector
Current behaviour
The generic credential injector injects the raw value from a SdsSecretConfig directly into a specified header. (note: When only name is specified in SdsSecretConfig, it loads credential from secret in static resource.)
Currently, there is no native way to append a scheme or prefix (like Bearer ) to the credential during injection. Users are forced to add an extra header-mutation filter to prepend the prefix (#37001), which adds complexity and overhead to the filter chain.
The Problem: Dynamic Secrets
While a user can theoretically hardcode a prefix if using an inline_string, this is not possible when the secret is loaded dynamically via filename for example - no way to transform xyz123 into Bearer xyz123 without an additional mutation step.
Example proposed config (Simplified):
generic:
header: "Authorization"
header_value_prefix: "Bearer "
credential:
sds_secret_config:
name: "my_token"