Skip to content
Snippets Groups Projects
  1. Nov 24, 2023
  2. Nov 23, 2023
  3. Nov 22, 2023
  4. Nov 21, 2023
  5. Nov 20, 2023
  6. Nov 17, 2023
    • Dmitry Ivanov's avatar
      feat(audit): change audit log format from plain to json · f3364158
      Dmitry Ivanov authored
      This patch changes the way audit records are formatted. Previously
      we would format them as plain strings (we still do that in tlog),
      now we use json to store all KV pairs including the message.
      
      TODO: optimize string allocations using a stream formatter.
      
      Example:
      
      ```
      {
        "time": "2023-11-16T22:48:08.297+0300",
        "level": "WARN",
        "auth_type": "chap-sha1",
        "message": "created user `idris`",
        "title": "create_user",
        "pid": 66625,
        "cord_name": "main",
        "fiber_id": 111,
        "fiber_name": "raft_main_loop",
        "file": "src/storage.rs",
        "line": 2633
      }
      ```
      f3364158
    • Egor Ivkov's avatar
      fix: display actual error in picodata connect · c42d0ba3
      Egor Ivkov authored and Егор Ивков's avatar Егор Ивков committed
      c42d0ba3
    • Dmitry Rodionov's avatar
      chore: order system clusterwide spaces by their id · c0b32a97
      Dmitry Rodionov authored
      This is useful to avoid sorting during snapshot preparation and in
      upcoming access control patch it simplifies the check whether a
      particular space id belongs to system space id range.
      c0b32a97
  7. Nov 16, 2023
  8. Nov 14, 2023
  9. Nov 13, 2023
  10. Nov 10, 2023
    • Dmitry Ivanov's avatar
      feat: implement audit log (initial patch) · ba967f50
      Dmitry Ivanov authored and Yaroslav Dynnikov's avatar Yaroslav Dynnikov committed
      Implemented:
      
      - features:
          * FFI wrappers for `say.{h,c}`
          * safe logger object on top of FFI definitions
          * unified tlog/audit definitions for formatting
          * fixed a needless allocation in tlog (new root per each line)
      
      - events:
          * create_user
          * drop_user
          * create_role
          * drop_role
          * change_password
          * grant_privilege
          * revoke_privilege
          * create_table
          * drop_table
          * grant_role
          * revoke_role
      
      Todo:
      
      - features:
          * unique id generation
          * security subject (who executed the action)
          * audit configuration (via `pico.audit` function)
      
      - well-defined events:
          * create_database (universe)
          * change_config
          * change_current_grade
      
      - special events (local to each node):
          * auth_ok / auth_fail
          * access_denied (still not sure if we absolutely need that)
          * audit_rotate
      
      - Unavailable (haven't been defined yet):
          * rename_user
          * create_procedure
          * drop_procedure
      
      Example:
      
      ```
      $ cat /tmp/audit.log
      2023-11-10 12:07:19.457 [15735] main/103/interactive I> audit log is ready, title: initialize_audit
      2023-11-10 12:07:19.457 [15735] main/103/interactive I> database is starting, title: startup
      2023-11-10 12:07:19.818 [15741] main/103/interactive I> audit log is ready, title: initialize_audit
      2023-11-10 12:07:19.818 [15741] main/103/interactive I> database is starting, title: startup
      2023-11-10 12:07:34.910 [15741] main/111/raft_main_loop storage.rs:2809 W> created user `KEK`, auth_type: chap-sha1, title: create_user
      2023-11-10 12:07:52.869 [15741] main/111/raft_main_loop storage.rs:2861 W> created role `mgr`, title: create_role
      2023-11-10 12:07:55.602 [15741] main/111/raft_main_loop storage.rs:2861 W> created role `kek`, title: create_role
      2023-11-10 12:07:57.594 [15741] main/111/raft_main_loop storage.rs:2906 W> granted role `mgr` to role `kek`, title: grant_role
      2023-11-10 12:08:08.482 [15741] main/111/raft_main_loop storage.rs:2913 W> granted privilege execute on universe `` to role `kek`, title: grant_privilege
      ```
      ba967f50
    • Егор Ивков's avatar
      feat: set max login attempts · a880388e
      Егор Ивков authored and Yaroslav Dynnikov's avatar Yaroslav Dynnikov committed
      a880388e
  11. Nov 09, 2023
  12. Nov 08, 2023
  13. Nov 07, 2023
  14. Nov 06, 2023
    • Kurdakov Alexander's avatar
      feat: add tier entity · 701aa4ab
      Kurdakov Alexander authored
      Transferred replication factor from Properties table to new Tier table
      
      Instance and Replicaset belongs to tier via new field tier in _pico_instance and _pico_replicaset
      
      New cli option init-cfg with path to configuration file in yaml format. For now contains only info about tiers.
      701aa4ab
Loading