box: add auth_history and last_modified fields to _user space
See the doc bot request for the description of the new fields. Note that we only store the value of the 'last_modified' field in struct user_def, because 'auth_history' will be used only in Lua code. Needed for https://github.com/tarantool/tarantool-ee/issues/298 Needed for https://github.com/tarantool/tarantool-ee/issues/299 NO_CHANGELOG=no user-visible effects in CE; will be added to EE @TarantoolBot document Title: Document auth_history and last_modified _user space fields Field name: auth_history. Field no: 6. Type: array. Description: The field stores an array of previous authentication data: when a user password is changed, the last value of the 'auth' field is appended to 'auth_history'. The length of the history is configured by the `box.cfg.password_history_length` option, which is available only in Tarantool EE, where it's used to prevent users from reusing old passwords. In Tarantool CE, the array is always empty. Field name: last_modified. Field no: 7. Type: unsigned. Description: The field stores the timestamp (seconds since Unix epoch) of the last user password update. It's never used in Tarantool CE. In Tarantool EE, it's used to disable users that haven't changed the password for more than `box.cfg.password_lifetime_days`. `box.schema.upgrade()` sets the new field values to an empty array and 0 for users that haven't updated them yet.
Showing
- src/box/alter.cc 4 additions, 0 deletionssrc/box/alter.cc
- src/box/bootstrap.snap 0 additions, 0 deletionssrc/box/bootstrap.snap
- src/box/lua/schema.lua 8 additions, 3 deletionssrc/box/lua/schema.lua
- src/box/lua/upgrade.lua 19 additions, 0 deletionssrc/box/lua/upgrade.lua
- src/box/schema_def.h 2 additions, 0 deletionssrc/box/schema_def.h
- src/box/user_def.c 1 addition, 0 deletionssrc/box/user_def.c
- src/box/user_def.h 5 additions, 0 deletionssrc/box/user_def.h
- test/box-luatest/upgrade/2.10.4/00000000000000000009.snap 0 additions, 0 deletionstest/box-luatest/upgrade/2.10.4/00000000000000000009.snap
- test/box-luatest/user_auth_history_last_modified_upgrade_test.lua 99 additions, 0 deletions...-luatest/user_auth_history_last_modified_upgrade_test.lua
- test/box-py/bootstrap.result 9 additions, 7 deletionstest/box-py/bootstrap.result
- test/box/access.result 107 additions, 50 deletionstest/box/access.result
- test/box/access.test.lua 67 additions, 22 deletionstest/box/access.test.lua
- test/box/access_bin.result 1 addition, 1 deletiontest/box/access_bin.result
- test/box/access_misc.result 4 additions, 4 deletionstest/box/access_misc.result
- test/box/access_misc.test.lua 1 addition, 1 deletiontest/box/access_misc.test.lua
Loading