Fix Access List Members cache and eventing.#32619
Merged
Conversation
Two things were happening that were shadowing the Access List members cache and eventing. 1. In the cache collections, the wrong reader was being assigned to the lookup map. The correct reader was being used elsewhere, however, so the caching tests appear to have still been working. 2. The watcher in lib/services/local/events.go apparently collapses prefixes if they overlap. Prefix `access_list_members` is encompassed by `access_list`, so the access list members prefix was eliminated from the watcher. As a result, access list member events were being processed by the access list parser, which resulted in non-critical warnings. Local testing and dogfooding has yielded that this has had no apparent impact, at least in situations without cache propagation. However, I've got a feeling that this could affect situations with multiple auth servers. While I'm here, I've eliminated the pointer-to-pointer logic in the access list unmarshaling, which was excised elsewhere and should be excised here as well.
jakule
approved these changes
Sep 27, 2023
espadolini
reviewed
Sep 27, 2023
espadolini
approved these changes
Sep 27, 2023
This was referenced Sep 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two things were happening that were shadowing the Access List members cache and eventing.
access_list_membersis encompassed byaccess_list, so the access list members prefix was eliminated from the watcher. As a result, access list member events were being processed by the access list parser, which resulted in non-critical warnings.Local testing and dogfooding has yielded that this has had no apparent impact, at least in situations without cache propagation. However, I've got a feeling that this could affect situations with multiple auth servers.
Thanks to @jakule for finding this, as it was hidden in the debug logs and had no apparent impact on tests.