Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

kms-vault: Support HTTP redirect for Vault requests. #52

@chris-giblin

Description

@chris-giblin

As discussed in PR #51 (comment), HTTP redirect responses (3xx) are not currently supported but need to be. The goal of this issue is to implement redirects as required by Vault.

Background information.

  • HTTP redirects are legitimately used when Vault is deployed in a High Availability configuration.
  • Current Vault KMS provider makes explicit, precise check for HTTP status 200 on Vault responses (see PR discussion linked above).
  • The HTTP client currently is not created with a redirect policy. As a result, redirects will not be followed. Because of the previous point, the redirect status code will be compared against 200 and be treated as an error.
  • Consider supporting a KMS provider-specific configuration parameter such as follow-redirects with values true|false, corresponding to the HTTP client Always|Never settings in the HttpRedirect policy, so that redirection can be enabled or disabled.
  • Using the HttpRequest.Builder, create the HTTP client under consideration of the configured redirect policy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions