Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport -> release/3.9.x] fix(vault): support array type config reference and multiple nginx subsystem #13953

Merged
merged 1 commit into from
Nov 29, 2024

Commits on Nov 29, 2024

  1. fix(vault): support array type config reference and multiple nginx su…

    …bsystem (#13855)
    
    * fix(vault): allow arrays in conf loader to be referenced
    
    ### Summary
    
    The commit includes the following fix for vault:
    
    Fix the issue that array-type configuration's element cannot be referenced. conf_loader now supports iterate through array-like configuration field and deref the secrets one by one.
    
    Enable the vault to dereference secrets using partial SSL configurations, for example, lua_ssl_trusted_certificate=system, {vault://abc/def}. This is implemented especially for resty environments that execute the actual kong command, with the opts pre_cmd = true. Vault related functionalities can work normally by using valid partial configuration generated in the pre_cmd environment. This change does not have a separate changelog entry because it is part of the previous "array-type config vault ref" fix and is more inline with user's intuition.
    
    Fix the issue that vault reference cannot work well when multiple subsystems(http/stream) are enabled. The kong_processed_secrets environment variable/file are now generated by subsystems, so enabling multiple subsystem will generates multiple env var/secret file for storing vault deref result.
    
    * fix(vault): allow arrays in conf loader to be referenced (#12672)
    
    * fix(*): special treatment for pre_cmd
    
    * fix(cmd): fix vault refs when both http and stream are enabled
    
    * tests(*): fix prepare cmd test
    
    * tests(*): add vault related cmd tests
    
    * docs(changelog): add changelog
    
    * test(*): try to fix test
    
    * fix(*): unsetenv unconditionally clean http/stream env
    
    ---------
    
    Signed-off-by: Aapo Talvensaari <[email protected]>
    Co-authored-by: Aapo Talvensaari <[email protected]>
    (cherry picked from commit bc0acea)
    windmgc authored and github-actions[bot] committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    2d9c56f View commit details
    Browse the repository at this point in the history