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

Fix sudo paths missing from OpenAPI and docs #21772

Merged
merged 9 commits into from
Jul 19, 2023

Commits on Jul 12, 2023

  1. Fix sudo paths missing from OpenAPI and docs

    Various sudo (a.k.a. root-protected) paths are implemented in
    non-standard ways, and as a result:
    
    * are not declared as x-vault-sudo in the OpenAPI spec
    
    * and as a result of that, are not included in the hardcoded patterns
      powering the Vault CLI `-output-policy` flag
    
    * and in some cases are missing from the table of all sudo paths in the
      docs too
    
    Fix these problems by:
    
    * Adding `seal` and `step-down` to the list of root paths for the system
      backend. They don't need to be there for enforcement, as those two
      special endpoints bypass the standard request handling code, but they
      do need to be there for the OpenAPI generator to be able to know they
      require sudo.
    
      The way in which those two endpoints do things differently can be
      observed in the code search results for `RootPrivsRequired`:
      https://github.com/search?q=repo%3Ahashicorp%2Fvault%20RootPrivsRequired&type=code
    
    * Fix the implementation of `auth/token/revoke-orphan` to implement
      endpoint sudo requirements in the standard way. Currently, it has an
      **incorrect** path declared in the special paths metadata, and then
      compensates with custom code throwing an error within the request
      handler function itself.
    maxb committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    01f87c9 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2023

  1. Configuration menu
    Copy the full SHA
    f7ca560 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2023

  1. changelog

    maxb committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    64530c2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ed8edc0 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2023

  1. Configuration menu
    Copy the full SHA
    b4244c4 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2023

  1. Configuration menu
    Copy the full SHA
    22b66de View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bbe23bd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c1b1fb6 View commit details
    Browse the repository at this point in the history
  4. Update vault/token_store.go

    Co-authored-by: Anton Averchenkov <[email protected]>
    maxb and averche authored Jul 19, 2023
    Configuration menu
    Copy the full SHA
    651bbae View commit details
    Browse the repository at this point in the history