Problem/Motivation

Data may end up unsynchronized in Keycloak and Drupal.org; so having a way to identify what is not in sync will be useful.

Steps to reproduce

N.A.

Proposed resolution

Create a new drupalorg-keycloak-integrity-check drush command to do that.

Remaining tasks

Write the code.
Review.

User interface changes

New drush command.

API changes

N.A.

Data model changes

N.A.

Issue fork drupalorg-3448936

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

marvil07 created an issue. See original summary.

marvil07’s picture

Status: Active » Needs work
marvil07’s picture

Assigned: marvil07 » Unassigned
Status: Needs work » Needs review
marvil07’s picture

Issue summary: View changes

This is ready for review.
The 3448936-kc-integrity-check and related MR !260 contains the proposed code.

The 3448936-kc-integrity-check-batch branch is there just for comparison.
Using Batch API helped a bit with the performance of the implementation, but the cost was a lot higher complexity.
I would say that performance gain may not be worth in this case.
Hence, no MR opened related to this branch.

drumm made their first commit to this issue’s fork.

  • drumm committed 900b84a5 on 7.x-3.x authored by marvil07
    Issue #3448936: Add keycloak user integrity check command
    
drumm’s picture

Status: Needs review » Fixed

Merged!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

marvil07’s picture

Status: Closed (fixed) » Active

Re-opening, for a follow-up, no need for extra issue.

marvil07’s picture

Status: Active » Needs review

Added new MR https://git.drupalcode.org/project/drupalorg/-/merge_requests/275 with an extra option to use a local file instead of KC REST API.

  • drumm committed 3635bc9b on 7.x-3.x authored by marvil07
    Issue #3448936 by marvil07, drumm: Add keycloak user integrity check...

  • drumm committed 3a443882 on 7.x-3.x
    Issue #3448936: Process Keycloak export directly, do not store uuid...

  • drumm committed beefff1f on 7.x-3.x
    Issue #3448936: Correct the use of the JSON data
    

  • drumm committed 401c1e87 on 7.x-3.x
    Issue #3448936: Add more logging
    

  • drumm committed 3f5ad6e5 on 7.x-3.x
    Issue #3448936: Do not infinite loop
    

  • drumm committed 2986c2f3 on 7.x-3.x
    Issue #3448936: Try some normalization to match formatting
    

  • drumm committed e5e6a91e on 7.x-3.x
    Issue #3448936: Use ASCII, because it is what we have
    

  • drumm committed 740cf708 on 7.x-3.x
    Issue #3448936: Trim names, handle 0 timezone consistently
    

  • drumm committed b8249c4a on 7.x-3.x
    Issue #3448936: Character encoding was fixed upstream
    

  • drumm committed 93b1a0e5 on 7.x-3.x
    Issue #3448936: Trimming is not necessary
    

  • drumm committed 49dc1c4e on 7.x-3.x
    Issue #3448936: Empty names that are only whitespace, add quoting for...

  • drumm committed 775ae633 on 7.x-3.x
    Issue #3448936: Edge cases for sigma at end of word and dotted I...
drumm’s picture

Status: Needs review » Fixed

We may add more special handling for edge cases, but this is all good to close.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.