8000 Implementation for feature Expiration for Admin Events #12476 by thpeter · Pull Request #12501 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Implementation for feature Expiration for Admin Events #12476 - #12501

Merged
hmlnarik merged 1 commit into
keycloak:mainfrom
bosch-io:feature/CIAMAUTHZ-5090-add-admin-event-expiration
Sep 6, 2022
Merged

hmlnarik merged 1 commit into
keycloak:mainfrom
bosch-io:feature/CIAMAUTHZ-5090-add-admin-event-expiration

Conversation

@thpeter
@thpeter thpeter commented Jun 14, 2022 •
Copy link
Copy Markdown
Contributor

introduce expiration option for admin events
Fixes: #12476

Note for backport: Caused #14294

@hmlnarik hmlnarik added the status/hold PR should not be merged. On hold for later. label Jun 15, 2022
@hmlnarik hmlnarik left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please hold on with this PR until #12233 is resolved.

@stianst
stianst commented Jun 22, 2022
Copy link
Copy Markdown
Contributor

@hmlnarik who should review this one? do you want someone from the store team to deal with it?

@hmlnarik
hmlnarik requested a review from mhajas June 22, 2022 13:36
@hmlnarik hmlnarik left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is out of sync with the recent changes in #11933. Please see inline.

As a general rule, please use realm attributes to store the admin event timeout, and adjust admin UI javascript accordingly (applies to keycloak-admin-ui as well).

@mhajas mhajas left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR @thpeter! I added one additional comment related to the new store changes.

@thpeter
thpeter force-pushed the feature/CIAMAUTHZ-5090-add-admin-event-expiration branch from 1792cc5 to bc780eb Compare June 30, 2022 09:30
@thpeter
thpeter force-pushed the feature/CIAMAUTHZ-5090-add-admin-event-expiration branch from bc780eb to 3d0eabf Compare June 30, 2022 11:41
@thpeter
thpeter force-pushed the feature/CIAMAUTHZ-5090-add-admin-event-expiration branch from 3d0eabf to 2d32bcf Compare August 26, 2022 07:27
@thpeter
thpeter requested a review from hmlnarik September 1, 2022 09:07
@stianst stianst added priority/important Must be worked on very soon and removed status/hold PR should not be merged. On hold for later. labels Sep 2, 2022
@stianst
stianst commented Sep 2, 2022
Copy link
Copy Markdown
Contributor

@hmlnarik @mhajas loks like @thpeter have pushed the requested changes, could you re-review please?

@hmlnarik
hmlnarik requested a review from mhajas September 2, 2022 12:40
@hmlnarik hmlnarik left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 8000 for the changes! The code is almost good, please see inline?
Could you please add a test similar to EventStoreProviderTest.clearOld testing this new functionality.

Comment thread model/jpa/pom.xml Resolved
Comment on lines 2448 to 2450
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note these changes should be also propagated to the new admin console, see https://github.com/keycloak/keycloak-ui.
Cc: @edewit @ssilvert Could you please advise here how to incorporate the changes here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note these changes should be also propagated to the new admin console, see https://github.com/keycloak/keycloak-ui. Cc: @edewit @ssilvert Could you please advise here how to incorporate the changes here?

Added issue in keycloak-ui repo. We will take care of it right after this is merged. You can ping me in the issue to let me know when that is done.

https://github.com/keycloak/keycloak-ui/issues/3265

@sschu
sschu force-pushed the feature/CIAMAUTHZ-5090-add-admin-event-expiration branch 3 times, most recently from 0fcd9d8 to 2dee316 Compare September 6, 2022 06:37
@hmlnarik
hmlnarik commented Sep 6, 2022
Copy link
Copy Markdown
Contributor

@sschu It seems the last force push somehow reverted the changes I could see pushed yesterday, could you please check?

@sschu
sschu force-pushed the feature/CIAMAUTHZ-5090-add-admin-event-expiration branch from 2dee316 to cddcea7 Compare September 6, 2022 09:44
@sschu
sschu commented Sep 6, 2022
Copy link
Copy Markdown
Contributor

@hmlnarik The test failure is in org.keycloak.testsuite.model.session.OfflineSessionPersistenceTest.testPersistenceMultipleNodesClientSessionsAtRandomNode, I don't think that this is related to this feature.

@hmlnarik hmlnarik left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Thanks for the PR!

@hmlnarik
hmlnarik merged commit 19d6916 into keycloak:main Sep 6, 2022
<kc-tooltip>{{:: 'events.expiration.tooltip' | translate}}</kc-tooltip>
<div class="col-md-6 time-selector">
<input class="form-control" type="number" data-ng-model="realm.attributes.adminEventsExpiration" id="adminEventsExpiration" name="adminEventsExpiration" min="0"/>
<select class="form-control" name="adminEventsExpirationUnit" data-ng-model="realm.attributes.adminEventsExpirationUnit">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't notice this before but why is this an attribute of the realm instead of one that's on the event config?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edewit What kind of event config do you mean? The expiration config for user events is already a column on the REALM table. The configuration for admin events was implemented similarly, just using a realm attribute in order to not have a schema change.

@hmlnarik
hmlnarik commented Sep 9, 2022
Copy link
Copy Markdown
Contributor

@sschu This PR has apparently caused #14294. Could you please check if these are related?

@sschu
sschu commented Sep 9, 2022
Copy link
Copy Markdown
Contributor

@hmlnarik Will do.

@hmlnarik
hmlnarik commented Sep 9, 2022
Copy link
Copy Markdown
Contributor

@sschu Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/important Must be worked on very soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expiration for Admin Events

7 participants

0