-
Notifications
You must be signed in to change notification settings - Fork 8k
Fix(admin-ui): key status filtering issue in KeysListTab #34721
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
Merged
edewit
merged 1 commit into
keycloak:main
from
charley-geoffroy:bug/optimize-keylist-filter-usememo
Nov 7, 2024
Merged
Fix(admin-ui): key status filtering issue in KeysListTab #34721
edewit
merged 1 commit into
keycloak:main
from
charley-geoffroy:bug/optimize-keylist-filter-usememo
Nov 7, 2024
Conversation
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
Support customer reports that keys with 'Active' set to 'off' still appear in the Active keys list in the Admin console under Realms settings -> Keys -> Keys list. The root cause was identified as the filtering logic, which does not apply status-based filtering for the first item in FILTER_OPTIONS ('ACTIVE'). This commit corrects the filtering logic to properly exclude keys based on the 'Active' status selection.
Closes #34675
Signed-off-by: Charley <[email protected]>
edewit
approved these changes
Nov 7, 2024
edewit
pushed a commit
to edewit/keycloak
that referenced
this pull request
Nov 7, 2024
) Support customer reports that keys with 'Active' set to 'off' still appear in the Active keys list in the Admin console under Realms settings -> Keys -> Keys list. The root cause was identified as the filtering logic, which does not apply status-based filtering for the first item in FILTER_OPTIONS ('ACTIVE'). This commit corrects the filtering logic to properly exclude keys based on the 'Active' status selection. Closes keycloak#34675 Signed-off-by: Charley <[email protected]> Signed-off-by: Erik Jan de Wit <[email protected]>
edewit
pushed a commit
to edewit/keycloak
that referenced
this pull request
Nov 15, 2024
) Support customer reports that keys with 'Active' set to 'off' still appear in the Active keys list in the Admin console under Realms settings -> Keys -> Keys list. The root cause was identified as the filtering logic, which does not apply status-based filtering for the first item in FILTER_OPTIONS ('ACTIVE'). This commit corrects the filtering logic to properly exclude keys based on the 'Active' status selection. Closes keycloak#34675 Signed-off-by: Charley <[email protected]>
edewit
pushed a commit
to edewit/keycloak
that referenced
this pull request
Nov 20, 2024
) Support customer reports that keys with 'Active' set to 'off' still appear in the Active keys list in the Admin console under Realms settings -> Keys -> Keys list. The root cause was identified as the filtering logic, which does not apply status-based filtering for the first item in FILTER_OPTIONS ('ACTIVE'). This commit corrects the filtering logic to properly exclude keys based on the 'Active' status selection. Closes keycloak#34675 Signed-off-by: Charley <[email protected]> (cherry picked from commit 46f7fb5)
This was referenced Nov 20, 2024
Merged
edewit
pushed a commit
to edewit/keycloak
that referenced
this pull request
Dec 2, 2024
) Support customer reports that keys with 'Active' set to 'off' still appear in the Active keys list in the Admin console under Realms settings -> Keys -> Keys list. The root cause was identified as the filtering logic, which does not apply status-based filtering for the first item in FILTER_OPTIONS ('ACTIVE'). This commit corrects the filtering logic to properly exclude keys based on the 'Active' status selection. Closes keycloak#34675 Signed-off-by: Charley <[email protected]> (cherry picked from commit 46f7fb5) Signed-off-by: Erik Jan de Wit <[email protected]>
ssilvert
pushed a commit
that referenced
this pull request
Dec 9, 2024
…5133) Support customer reports that keys with 'Active' set to 'off' still appear in the Active keys list in the Admin console under Realms settings -> Keys -> Keys list. The root cause was identified as the filtering logic, which does not apply status-based filtering for the first item in FILTER_OPTIONS ('ACTIVE'). This commit corrects the filtering logic to properly exclude keys based on the 'Active' status selection. Closes #34675 (cherry picked from commit 46f7fb5) Signed-off-by: Charley <[email protected]> Signed-off-by: Erik Jan de Wit <[email protected]> Co-authored-by: Charley <[email protected]>
Closed
edewit
added a commit
to edewit/keycloak
that referenced
this pull request
Dec 11, 2024
) (keycloak#35133) Support customer reports that keys with 'Active' set to 'off' still appear in the Active keys list in the Admin console under Realms settings -> Keys -> Keys list. The root cause was identified as the filtering logic, which does not apply status-based filtering for the first item in FILTER_OPTIONS ('ACTIVE'). This commit corrects the filtering logic to properly exclude keys based on the 'Active' status selection. Closes keycloak#34675 (cherry picked from commit 46f7fb5) Signed-off-by: Charley <[email protected]> Signed-off-by: Erik Jan de Wit <[email protected]> Co-authored-by: Charley <[email protected]> Signed-off-by: Erik Jan de Wit <[email protected]>
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.
Issue Overview:
Support customer reports that keys with 'Active' set to 'off' still appear in the Active keys list in the Admin console under Realms settings -> Keys -> Keys list. The root cause was identified as the filtering logic, which does not apply status-based filtering for the first item in FILTER_OPTIONS ('ACTIVE'). This commit corrects the filtering logic to properly exclude keys based on the 'Active' status selection.
Solution
This PR refactors the filtering logic in
KeysListTab.tsxto ensure that only keys matching the selected status appear in the list. Specifically, it usesuseMemoto cache and apply the correct filter based on the current selection, so that keys with an "Inactive" status are no longer shown in the Active keys list.How to Test It
Steps to Reproduce the Bug (without the PR)
In the Keycloak Admin Console, go to Realms settings -> Keys -> Add Provider and add the generated key.
Set the key's Active status to "off".
Observe the bug: The key still appears in Realms settings -> Keys -> keys list, even though its status is set to inactive.
Steps to Verify the Fix (with the PR applied)
Repeat steps 3-4 above to add a new key with the "Active" status set to "off."
Verify that the key does not appear in the Active keys list under Keys list.
Closes #34675