Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openapi: Fix logic for labeling unauthenticated/sudo paths #19600

Merged
merged 7 commits into from
Mar 20, 2023

Conversation

averche
Copy link
Contributor

@averche averche commented Mar 16, 2023

The previous logic for matching unauthenticated & sudo paths in OpenAPI did not take into account the + wildcard, so some of the PKI paths were skipped.

With new logic, these are the new unauthenticated paths introduced for builtin plugins:

❱ diff unauth_before unauth_after2
27a28,30
> "/identity/oidc/provider/{name}/.well-known/keys"
> "/identity/oidc/provider/{name}/.well-known/openid-configuration"
> "/identity/oidc/provider/{name}/token"
57a61,69
> "/{pki_mount_path}/issuer/{issuer_ref}/crl"
> "/{pki_mount_path}/issuer/{issuer_ref}/crl/delta"
> "/{pki_mount_path}/issuer/{issuer_ref}/crl/delta/der"
> "/{pki_mount_path}/issuer/{issuer_ref}/crl/delta/pem"
> "/{pki_mount_path}/issuer/{issuer_ref}/crl/der"
> "/{pki_mount_path}/issuer/{issuer_ref}/crl/pem"
> "/{pki_mount_path}/issuer/{issuer_ref}/der"
> "/{pki_mount_path}/issuer/{issuer_ref}/json"
> "/{pki_mount_path}/issuer/{issuer_ref}/pem"

The list of "sudo" paths is unaffected by this PR for builtin plugins.

Resolves: #19581, VAULT-14576

@averche averche added this to the 1.13.1 milestone Mar 16, 2023
@averche averche marked this pull request as ready for review March 20, 2023 00:50
@averche averche requested review from a team and cipherboy March 20, 2023 00:50
@cipherboy
Copy link
Contributor

Looks like I mislead you a little about PathManager potentially working for this scenario! :o

Copy link
Contributor

@dhuckins dhuckins left a comment

Choose a reason for hiding this comment

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

ty for the tests!

@averche
Copy link
Contributor Author

averche commented Mar 20, 2023

Looks like I mislead you a little about PathManager potentially working for this scenario! :o

All good 😄, I was considering amending the PathManager to support the + wildcards but decided it might be too risky given its other uses.

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.

OpenAPI: some PKI unauthed endpoints aren't being marked as such
3 participants