-
Notifications
You must be signed in to change notification settings - Fork 387
config: rework privilege revocation #9852
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
config: rework privilege revocation #9852
Conversation
397dc48
to
d84f629
Compare
d84f629
to
412a889
Compare
The patchset looks OK on a brief glance. I'll return here back a bit later to look into the credentials applier test changes deeper. |
412a889
to
184089f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this effort!
I have a few nits (see above), but the patchset is OK for me.
I would like to hear @Lord-KA's feedback before push.
184089f
to
7940cf7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patchset! The fist commit seems good, but I would like some more detailed explanation for the change, if you don't mind
7940cf7
to
dbdc145
Compare
dbdc145
to
36f120f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this patch too, I really like the idea! Everything looks clean besides a few minor details below. Anyway, LGTM.
Currently, if we try to run Tarantool 3.0 with config using old snapshot, we may get a SCHEMA_NEEDS_UPGRADE error because granting and revoking privileges are DDL operations. This leads to a situation where loading Tarantool to perform an upgrade becomes quite problematic. To avoid the issue, this patch causes 'credentials.lua' to issue a warning instead of an error in case of the SCHEMA_NEEDS_UPGRADE error during granting and revoking privileges. Note that it was still possible to startup and perform the upgrade by removing the 'credentials' section from the config or without using config. This is only a part of the solution, the issue will be fixed in tarantool#9849. Part of tarantool#9849 Needed for tarantool#9643 NO_DOC=will be added later NO_CHANGELOG=will be added later
8875c82
to
8937227
Compare
Closes tarantool#9643 @TarantoolBot document Title: config: changes in `credentials` section Now the privileges that were not granted by the configuration, as well as privileges that were not granted solely by the configuration, are not revoked on reload. Privileges that have been granted only by the config module will still be revoked if they are removed from the `credentials` section on reload.
8937227
to
6634833
Compare
Backported to |
Closes #9643
@TarantoolBot document
Title: config: changes in
credentials
sectionNow the privileges that were not granted by the configuration, as well as privileges that were not granted solely by the configuration, are not revoked on reload. Privileges only granted by the config module will still be revoked if they are removed from the
credentials
section on reload.