Skip to content

Fix Vault namespace handling for AppRole authentication#18

Merged
sumedhe merged 3 commits intowso2-extensions:masterfrom
SavinduDimal:master
Apr 29, 2026
Merged

Fix Vault namespace handling for AppRole authentication#18
sumedhe merged 3 commits intowso2-extensions:masterfrom
SavinduDimal:master

Conversation

@SavinduDimal
Copy link
Copy Markdown
Contributor

Purpose

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ensures the configured HashiCorp Vault namespace is applied consistently to both secret reads and AppRole authentication, so AppRole login targets the intended non-root namespace.

Changes:

  • Apply the configured namespace at the VaultConfig level for secret reads.
  • Apply the configured namespace at the VaultConfig level for AppRole login.
  • Normalize (trim) the namespace and skip namespace configuration when not provided.
Comments suppressed due to low confidence (1)

src/main/java/org/wso2/carbon/securevault/hashicorp/repository/HashiCorpSecretRepository.java:204

  • The exception message in this secret-read path says "Error retrieving service token using AppRole", which is misleading when logical.read(path) fails. Please update it to describe the actual operation (reading a secret) and ideally include the relevant path/alias for easier troubleshooting.
        } catch (VaultException e) {
            throw new HashiCorpVaultException("Error retrieving service token using AppRole", e);
        }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sumedhe sumedhe merged commit 71ad929 into wso2-extensions:master Apr 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants