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

Improve trusted cert loading in Certificate Auth #27902

Merged
merged 7 commits into from
Jul 29, 2024

Commits on Jul 29, 2024

  1. Improve trusted cert loading in Certificate Auth

    Currently, cert auth has a cache of certName->trusted certificate data.  This cache is updated lazily on login.  In highly concurrent situations, several logins
    of the same cert or more likely, logins not specifying role name may happen simulataneously.  In the status quo, each results in going to storage, fetching the role data
    (or all roles!), unmarshalling, and certificate parsing.
    
    This change puts a lock matrix in front of the cache miss scenario, so only one of the logins will load and process the role data.  In addition, we treat
    the absent role name specially, caching it separately so that it cannot be flushed by eviction on the role cache.
    sgmiller committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    ac1bbb7 View commit details
    Browse the repository at this point in the history
  2. changelog

    sgmiller committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    638847a View commit details
    Browse the repository at this point in the history
  3. cleanup

    sgmiller committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    ccb7a25 View commit details
    Browse the repository at this point in the history
  4. Lock around reads correctly

    sgmiller committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    73624ef View commit details
    Browse the repository at this point in the history
  5. check cache first

    sgmiller committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    da782ef View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3836c15 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e2a71ed View commit details
    Browse the repository at this point in the history