mattcasters opened a new pull request, #7365:
URL: https://github.com/apache/hop/pull/7365

   # PR Recap: Support for OpenBAO as a Variable Resolver
   
   This PR introduces support for **OpenBAO** as a Variable Resolver in Apache 
Hop (Issue #7326) and refactors the existing HashiCorp Vault variable resolver 
to share configuration and resolution logic under the hood.
   
   ---
   
   ## Architectural Decisions
   
   1. **SDK Upgrade:** 
      - Upgraded the underlying Vault Java Driver dependency from 
`com.bettercloud:vault-java-driver` (deprecated/abandoned) to 
`io.github.jopenlibs:vault-java-driver:6.2.2` (community-maintained fork with 
MIT license).
      - This version features package renaming to `io.github.jopenlibs.vault` 
and changes the `Vault` class from a concrete class to an `interface` 
instantiated via `Vault.create(VaultConfig)`. It also extracts SSL 
configurations into a dedicated `SslConfig` builder class.
   
   2. **Single Plugin Packaging (Anti-Classloader Issues):**
      - Initially, a separate `hop-tech-openbao` module was proposed. However, 
to avoid classloader isolation issues when sharing the Vault driver library, 
the **OpenBAO resolver has been packaged directly inside the existing 
`hop-tech-vault` plugin**.
      - The plugin now ships both `Vault-Variable-Resolver` (`#{vault:...}`) 
and `OpenBao-Variable-Resolver` (`#{openbao:...}`) in a single JAR, sharing the 
same dependencies and classloader.
   
   3. **Core Refactoring:**
      - Extracted shared properties, annotations, and API logic to the abstract 
base class 
[BaseVaultVariableResolver](file:///home/matt/git/mattcasters/hop/plugins/tech/vault/src/main/java/org/apache/hop/core/variables/resolver/vault/BaseVaultVariableResolver.java).
      - Refactored 
[VaultVariableResolver](file:///home/matt/git/mattcasters/hop/plugins/tech/vault/src/main/java/org/apache/hop/core/variables/resolver/vault/VaultVariableResolver.java)
 to extend the base class.
      - Added 
[OpenBaoVariableResolver](file:///home/matt/git/mattcasters/hop/plugins/tech/vault/src/main/java/org/apache/hop/core/variables/resolver/vault/OpenBaoVariableResolver.java)
 as a subclass.
   
   ---
   
   ## Summary of Changes
   
   ### 1. Core Codebase
   * 
[BaseVaultVariableResolver.java](file:///home/matt/git/mattcasters/hop/plugins/tech/vault/src/main/java/org/apache/hop/core/variables/resolver/vault/BaseVaultVariableResolver.java)
 **[NEW]**: Abstract base variable resolver with fields, annotations, 
`SslConfig`, and resolver logic.
   * 
[OpenBaoVariableResolver.java](file:///home/matt/git/mattcasters/hop/plugins/tech/vault/src/main/java/org/apache/hop/core/variables/resolver/vault/OpenBaoVariableResolver.java)
 **[NEW]**: OpenBAO implementation overriding the ID to 
`"OpenBao-Variable-Resolver"`.
   * 
[VaultVariableResolver.java](file:///home/matt/git/mattcasters/hop/plugins/tech/vault/src/main/java/org/apache/hop/core/variables/resolver/vault/VaultVariableResolver.java)
 **[MODIFY]**: Refactored to inherit from base resolver.
   * [pom.xml 
(plugins/tech/vault)](file:///home/matt/git/mattcasters/hop/plugins/tech/vault/pom.xml)
 **[MODIFY]**: Upgraded driver dependency to version `6.2.2`.
   
   ### 2. Integration Tests
   * 
[integration-tests/vault/](file:///home/matt/git/mattcasters/hop/integration-tests/vault)
 **[RENAME/NEW]**: Renamed from `resolver` to `vault` and updated metadata and 
docker compose configuration 
([integration-tests-vault.yaml](file:///home/matt/git/mattcasters/hop/docker/integration-tests/integration-tests-vault.yaml)).
   * 
[integration-tests/openbao/](file:///home/matt/git/mattcasters/hop/integration-tests/openbao)
 **[NEW]**: Duplicated and updated test workflows to target the 
`"OpenBao-Variable-Resolver"` using `#{openbao:...}` resolver syntax.
   * 
[integration-tests-openbao.yaml](file:///home/matt/git/mattcasters/hop/docker/integration-tests/integration-tests-openbao.yaml)
 **[NEW]**: Docker Compose file configured with standard OpenBAO health checks.
   
   ### 3. Documentation
   * 
[hashicorp-vault-variable-resolver.adoc](file:///home/matt/git/mattcasters/hop/docs/hop-user-manual/modules/ROOT/pages/metadata-types/variable-resolver/hashicorp-vault-variable-resolver.adoc)
 **[MODIFY]**: Added documentation for the new `Namespace` setting.
   * 
[openbao-variable-resolver.adoc](file:///home/matt/git/mattcasters/hop/docs/hop-user-manual/modules/ROOT/pages/metadata-types/variable-resolver/openbao-variable-resolver.adoc)
 **[NEW]**: Created user manual page for the OpenBAO resolver.
   * 
[index.adoc](file:///home/matt/git/mattcasters/hop/docs/hop-user-manual/modules/ROOT/pages/metadata-types/variable-resolver/index.adoc)
 & 
[nav.adoc](file:///home/matt/git/mattcasters/hop/docs/hop-user-manual/modules/ROOT/nav.adoc)
 **[MODIFY]**: Registered the new OpenBAO docs page in indexes and sidebar 
navigation.
   
   ---
   
   ## Verification & Testing
   
   1. **Spotless & Compilation:**
      - Applied Spotless formatting.
      - Built full client successfully with Maven wrapper:
        ```bash
        ./mvnw -T4 -Pfast-build clean install
        ```
   
   2. **Integration Tests Execution:**
      - **Vault Tests:** Successfully passed (exited with `0`):
        ```bash
        ./scripts/run-tests-docker.sh PROJECT_NAME=vault
        ```
      - **OpenBAO Tests:** Successfully passed (exited with `0`):
        ```bash
        ./scripts/run-tests-docker.sh PROJECT_NAME=openbao
        ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to