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

Rewrite vault core, issue AppRoles to minions #62684

Merged
merged 104 commits into from
Dec 16, 2023

Commits on Oct 4, 2022

  1. Rewrite vault core, orchestrate AppRoles for minions

    This commit represents a fundamental rewrite in how Salt interacts with
    Vault. The master should still be compatible with minions running the
    old code. There should be no breaking changes to public interfaces and
    the old configuration format should still apply.
    
    Core:
    - Issue AppRoles to minions
    - Manage entities with templatable metadata for minions
    - Use inbuilt Salt cache
    - Separate config cache from token cache
    - Cache: introduce connection-scope vs global scope
    
    Utility module:
    - Support being imported (__utils__ deprecation)
    - Raise exceptions on queries to simplify response handling
    - Add classes to wrap complexity, especially regarding KV v2
    - Lay some groundwork for renewing tokens
    
    Execution module:
    - Add patch_secret
    - Add version support to delete_secret
    - Allow returning listed keys only in list_secret
    - Add policy_[fetch/write/delete] and policies_list
    - Add query for arbitrary API queries
    
    State module:
    - Make use of execution module
    - Change output format
    
    Docs:
    - Update for new configuration format
    - Correct examples
    - Add configuration examples
    - Add required policies
    lkubb committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    5449abf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8cc6f2f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    60bddc6 View commit details
    Browse the repository at this point in the history
  4. Fix old vault runner tests

    lkubb committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    99260fe View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7182b19 View commit details
    Browse the repository at this point in the history
  6. Adapt vault ext_pillar tests

    lkubb committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    7365f6e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    edf378b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f09a016 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9fa4274 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    aa61b88 View commit details
    Browse the repository at this point in the history
  11. Add vault state module pytests

    lkubb committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    e881749 View commit details
    Browse the repository at this point in the history
  12. Fix tests lint

    lkubb committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    48a2256 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    1cfcc30 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    c233158 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    32090e0 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    bf62a15 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    e43f53a View commit details
    Browse the repository at this point in the history
  18. Refactor vault pytest support

    lkubb committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    71b764d View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    4282caa View commit details
    Browse the repository at this point in the history
  20. Improve caching behavior, fix tests

    * Always use session cache as well
    * Also flush session cache when requested
    * Make KV metadata caching behavior configurable
    * Update tests to account for changes from prev commit
    lkubb committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    fd9b796 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    f0942e1 View commit details
    Browse the repository at this point in the history
  22. Remove runner approle param overrides

    There is no simple way to ensure they are kept.
    lkubb committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    4a28ab3 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    88ba07d View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    78db0f1 View commit details
    Browse the repository at this point in the history
  25. Cleanup tests

    lkubb committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    4d00606 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    b1b6884 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    4d6e89f View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    cf16697 View commit details
    Browse the repository at this point in the history
  29. Add changelog (partly)

    lkubb committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    52e07c3 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2022

  1. Merge branch 'master' into approle-minions-vault

    Thomas Phipps authored Oct 5, 2022
    Configuration menu
    Copy the full SHA
    f4d0d50 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    72b647d View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2022

  1. Configuration menu
    Copy the full SHA
    8c8d331 View commit details
    Browse the repository at this point in the history
  2. Correct verify semantics

    lkubb committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    07a3586 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    db0706e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3f31f1f View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2022

  1. Add test for issue 58580

    lkubb committed Oct 8, 2022
    Configuration menu
    Copy the full SHA
    d3dc2e1 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2022

  1. Fix vault docs

    lkubb committed Oct 9, 2022
    Configuration menu
    Copy the full SHA
    519ee59 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ced497b View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2022

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

Commits on Oct 13, 2022

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

Commits on Oct 14, 2022

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

Commits on Oct 19, 2022

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

Commits on Oct 20, 2022

  1. Merge branch 'master' into approle-minions-vault

    Thomas Phipps authored Oct 20, 2022
    Configuration menu
    Copy the full SHA
    cd2369c View commit details
    Browse the repository at this point in the history
  2. Simplify config_location merge

    lkubb committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    cc84901 View commit details
    Browse the repository at this point in the history
  3. Cleanup

    lkubb committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    297e687 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a7e775a View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2022

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

Commits on Dec 5, 2022

  1. Configuration menu
    Copy the full SHA
    47fee10 View commit details
    Browse the repository at this point in the history
  2. Fix make_request warning

    lkubb committed Dec 5, 2022
    Configuration menu
    Copy the full SHA
    80a22f8 View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2022

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

Commits on Dec 20, 2022

  1. Configuration menu
    Copy the full SHA
    0e78728 View commit details
    Browse the repository at this point in the history
  2. Increase documented version

    lkubb committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    8568e45 View commit details
    Browse the repository at this point in the history
  3. Improve lease handling

    lkubb committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    78d6bae View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2023

  1. Configuration menu
    Copy the full SHA
    b7e94fd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c318c32 View commit details
    Browse the repository at this point in the history
  3. Fix docs build

    lkubb committed Jan 3, 2023
    Configuration menu
    Copy the full SHA
    17fa4e2 View commit details
    Browse the repository at this point in the history
  4. Adapt formatting

    * assert what you get against what you expect
    * drop empty parentheses after wrapper
    * use `is` to compare against strictly boolean vars
    lkubb committed Jan 3, 2023
    Configuration menu
    Copy the full SHA
    ca8322f View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2023

  1. Fix issue param overrides

    * during pillar rendering, they were always reset by the master (for
      AppRoles)
    * overrides were only respected for some settings (AppRoles)
    * old config syntax was using the old syntax internally (tech debt)
    lkubb committed Jan 6, 2023
    Configuration menu
    Copy the full SHA
    ad35e70 View commit details
    Browse the repository at this point in the history
  2. Introduce session-scoped cache

    lkubb committed Jan 6, 2023
    Configuration menu
    Copy the full SHA
    e1a8d42 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f617a09 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2023

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

Commits on Jan 8, 2023

  1. Configuration menu
    Copy the full SHA
    0f68834 View commit details
    Browse the repository at this point in the history
  2. Rename session token cache key

    lkubb committed Jan 8, 2023
    Configuration menu
    Copy the full SHA
    83458fa View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2023

  1. Add lease management utility

    lkubb committed Jan 9, 2023
    Configuration menu
    Copy the full SHA
    618a3e8 View commit details
    Browse the repository at this point in the history
  2. Fix runner integration tests

    after renaming the token cache key
    lkubb committed Jan 9, 2023
    Configuration menu
    Copy the full SHA
    95e2fcb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    77e2772 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d6d77b2 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2023

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

Commits on Jan 16, 2023

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

Commits on Apr 12, 2023

  1. Configuration menu
    Copy the full SHA
    2af084d View commit details
    Browse the repository at this point in the history
  2. Rename changelog files (.md)

    lkubb committed Apr 12, 2023
    Configuration menu
    Copy the full SHA
    e2f908c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1d37cc5 View commit details
    Browse the repository at this point in the history
  4. Correct meta[data] payload key

    For tokens it is `meta`, but for secret IDs, `metadata`.
    lkubb committed Apr 12, 2023
    Configuration menu
    Copy the full SHA
    008d730 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2023

  1. Reuse TCP connection

    lkubb committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    9f58c41 View commit details
    Browse the repository at this point in the history
  2. Refactor utils module

    lkubb committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    7fe512a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    520ef97 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2023

  1. Always use unwrap_client config as expected server

    This should fix the test failure in the runner integration test
    TestAppRoleIssuance::test_server_switch_does_not_break_minion_auth
    lkubb committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    dc0b617 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    788a07a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6e4da71 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4f2e13c View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2023

  1. Configuration menu
    Copy the full SHA
    69fef51 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    60f7286 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2023

  1. Revoke tokens, fire events, improve cache/exception handling

    * Tokens (and therefore associated leases) are revoked when cleared by default
    * It's possible to disable clearing cache when a perfectly valid token
      is available, but a PermissionDeniedError is encountered.
    * UnwrapExceptions always cause an event to be fired
    * It's possible to enable sending of events when
        a) cache is cleared
        b) a lease is requested from cache, but it is/will be invalid
    * A VaultAuthException does not immediately lead to clearing
      the connection cache
    * get_authd_client and others: multiple small enhancements and fixes
    lkubb committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    108a95c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    439b330 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    35b0e1a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a86cfc7 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2023

  1. Minor internal fixes

    `is_valid_for` is present on all lease-like objects, while `is_valid`
    specifically should account for more, e.g. the number of uses.
    
    The Vault API does not return 404 when a lookup fails.
    lkubb committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    f5943ea View commit details
    Browse the repository at this point in the history

Commits on May 2, 2023

  1. Configuration menu
    Copy the full SHA
    5bb2de9 View commit details
    Browse the repository at this point in the history
  2. Add release note

    lkubb committed May 2, 2023
    Configuration menu
    Copy the full SHA
    15944a6 View commit details
    Browse the repository at this point in the history
  3. Address review remarks

    lkubb committed May 2, 2023
    Configuration menu
    Copy the full SHA
    5a302dc View commit details
    Browse the repository at this point in the history

Commits on May 11, 2023

  1. Configuration menu
    Copy the full SHA
    0310a82 View commit details
    Browse the repository at this point in the history
  2. Fix release notes

    lkubb committed May 11, 2023
    Configuration menu
    Copy the full SHA
    32f9773 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2023

  1. Configuration menu
    Copy the full SHA
    0b77146 View commit details
    Browse the repository at this point in the history
  2. Address other review remarks

    lkubb committed May 29, 2023
    Configuration menu
    Copy the full SHA
    e20c496 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4ee39da View commit details
    Browse the repository at this point in the history
  4. Small QoL additions

    lkubb committed May 29, 2023
    Configuration menu
    Copy the full SHA
    60bd374 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    753417d View commit details
    Browse the repository at this point in the history
  6. Fix lint

    lkubb committed May 29, 2023
    Configuration menu
    Copy the full SHA
    101c65d View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2023

  1. Configuration menu
    Copy the full SHA
    90750ce View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e940419 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2023

  1. Configuration menu
    Copy the full SHA
    0182a00 View commit details
    Browse the repository at this point in the history
  2. Add missing fixes

    lkubb committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    e1903de View commit details
    Browse the repository at this point in the history
  3. Fix unit tests

    In some cases, the `spec` calls were failing because the underlying
    object was already patched
    lkubb committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    f6f397c View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2023

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