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

No stdout output/feedback during long series of authenticator config update requests #1108

Open
1 task
gim- opened this issue Jul 19, 2024 · 2 comments
Open
1 task
Assignees

Comments

@gim-
Copy link

gim- commented Jul 19, 2024

Problem Statement

When applying a config with custom authentication flow, somewhere near the end keycloak-config-cli makes a series of silent requests to update authenticator configurations, even if they haven't changed. This can be seen in the Keycloak admin events:

{"authUsername":"admin","realmName":"REALM","resourcePath":"authentication/config/3b7931a9-0b0b-4419-b53a-b6bc8a73dc90","ipAddress":"172.18.0.1","operationType":"UPDATE","eventType":"ADMIN","resourceType":"AUTHENTICATOR_CONFIG"}

I assume due to Keycloak Admin API limitations there's no efficient way to check if config changed or not, so the tool is just overwriting everything just in case (correct me if I'm wrong). (since the tool is using realm export representation, can't it compare new config with old one to avoid redundant updates?)

But I'd expect some feedback when it does it instead of silence, as the delay is quite significant with a large number of configurations in a file.

Proposed Solution

Add some feedback to stdout when updating authenticator configs so it doesn't appear like the tool isn't doing anything.

Printing a separate log message for each request would probably be too much, so maybe it could print some progress every N number of seconds? E.g.

Updating authenticator configurations (0/300)
Updating authenticator configurations (50/300)
Updating authenticator configurations (110/300)
...
Updating authenticator configurations (300/300)

Environment

  • Keycloak Version: 22.0.11.redhat-00001
  • keycloak-config-cli Version: v6.1.5
  • Java Version: 21

Additional information

No response

Acceptance Criteria

  • As a user, I can see that keycloak-config-cli is performing a long series of UPDATE requests to Keycloak
@gim- gim- changed the title No stdout output/feedback during authenticator config update requests No stdout output/feedback during long series of authenticator config update requests Jul 19, 2024
@Motouom
Copy link
Collaborator

Motouom commented Nov 20, 2024

Hello @gim-

Thanks for reporting your issue.

This Tool in general does not override directly. It does an export and compares it with your import using remote state management. You can refer to this documentation to see

This is the file that performs the export and then does the comparison to ensure that the configurations are synchronized

@Motouom
Copy link
Collaborator

Motouom commented Nov 20, 2024

Hello @gim-

Thanks for reporting your issue.

This Tool in general does not override directly. It does an export and compares it with your import using remote state management. You can refer to this documentation to see

This is the file that performs the export and then does the comparison to ensure that the configurations are synchronized

Concerning the feedback to stdout, we will see how to work on it.

@Motouom Motouom self-assigned this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

2 participants