Skip to content

optional mount path for approle#292

Merged
chrisarcand merged 1 commit intohashicorp:masterfrom
llafage-claranet:master
Feb 4, 2026
Merged

optional mount path for approle#292
chrisarcand merged 1 commit intohashicorp:masterfrom
llafage-claranet:master

Conversation

@llafage-claranet
Copy link
Contributor

Actually the path for an approle is fixed in code:"/v1/auth/approle/login".
This PR add the possibility to support customizable path, for example, "/v1/auth/my_approle/login"

@llafage-claranet llafage-claranet requested a review from a team June 6, 2023 14:49
@hashicorp-cla
Copy link

hashicorp-cla commented Jun 6, 2023

CLA assistant check
All committers have signed the CLA.

@llafage-claranet
Copy link
Contributor Author

No test as I don't see custom path testing in spec/integration/api/auth_spec.rb

@llafage-claranet
Copy link
Contributor Author

Hello, is it possible to have a review please ? as the change is very small, it should be fast :)

@AnPucel
Copy link
Contributor

AnPucel commented Jun 20, 2023

Hi there! We are definitely happy to take a look at this PR! However, our team has inherited this project and we are currently working on ironing out issues with the CI & automated tests. Once we have those fixed we'll be able to review the PRs and take changes.

@llafage-claranet
Copy link
Contributor Author

Hello, some news maybe ?

@mouchymouchy
Copy link

Hi there
Any new about this PR ?

chrisarcand
chrisarcand previously approved these changes Feb 4, 2026
beekus
beekus previously approved these changes Feb 4, 2026
@chrisarcand chrisarcand dismissed stale reviews from beekus and themself via 33ac22d February 4, 2026 17:22
beekus
beekus previously approved these changes Feb 4, 2026
Adds optional mount parameter to approle() method to support AppRole
authentication against non-default mount points.

Usage:
  # Default mount point
  Vault.auth.approle(role_id, secret_id)

  # Custom mount point
  Vault.auth.approle(role_id, secret_id, mount: "my-approle")

The implementation uses an options hash (mount:) to maintain consistency
with other auth methods like userpass and ldap, and to allow for future
extensibility. Fully backward compatible - defaults to 'approle' mount.

Changes:
- Updated approle() to accept options hash with :mount parameter
- Fixed deprecated JSON.fast_generate to JSON.generate
- Added integration test for custom mount path
- Added documentation examples for both default and custom mounts
- Updated CHANGELOG

Co-authored-by: Laurent Lafage <laurent.lafage@fr.clara.net>
@chrisarcand chrisarcand merged commit d4ee3dd into hashicorp:master Feb 4, 2026
25 checks passed
@chrisarcand chrisarcand mentioned this pull request Feb 4, 2026
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.

6 participants