hashicorp / vault-plugin-secrets-azure

Vault Azure Secrets plugin
Mozilla Public License 2.0
26 stars 20 forks source link

correct msgraph search query - fixes #189 #196

Closed sspans-sbp closed 3 months ago

sspans-sbp commented 4 months ago

Overview

The refactored validation for static service principals was checking the application_object_id by searching for an application_id. This updates the search to search for application_object_id instead.

Design of Change

Only the search filter was updated.
The lookup could possibly be improved by fetching the application object directly rather than searching. But in this case I've opted for the smallest change to resolve the regression.

Related Issues/Pull Requests

[x] Issue #189

Contributor Checklist

[ ] Add relevant docs to upstream Vault repository, or sufficient reasoning why docs won’t be added yet My Docs PR Link Example [ ] Add output for any tests not ran in CI to the PR description (eg, acceptance tests) [x] Backwards compatible

hashicorp-cla-app[bot] commented 4 months ago

CLA assistant check
All committers have signed the CLA.

sspans-sbp commented 4 months ago

@vinay-gopalan any chance you could review / merge this one?

gsantos-hc commented 4 months ago

@sspans-sbp I found the same bug while working on something else. Agree that it's only in Vault 1.16+.

There's also a GetApplication interface at the top of api/applications.go. The interface's variable name is still clientId, which will be confusing in IDEs. Would you also update that to objectId?

sspans-sbp commented 3 months ago

A better solution was merged in #200