Skip to content
Snippets Groups Projects
  1. Dec 28, 2023
  2. Dec 19, 2023
  3. Dec 03, 2023
  4. Dec 01, 2023
    • Dmitry Ivanov's avatar
      fix(auth): check if user exists in auth attempts tracker · 1e69a241
      Dmitry Ivanov authored
      This patch fixes a possible DOS by checking whether the user exists
      before creating a record for its unsuccessful auth attempt. This is
      due to the fact that `box.session.on_auth` will be called even for
      unknown users (this helps vanilla users log such events).
    • Dmitry Ivanov's avatar
      feat(audit): add authentication events · 2c9a13f3
      Dmitry Ivanov authored
      This patch adds two new events:
      * auth_ok
      * auth_fail, which may contain "verdict" describing user suspension.
      
      Examples:
      
      ```json
      {
        "id": "1.1.19",
        "message": "successfully authenticated user `guest`",
        "severity": "low",
        "time": "2023-11-30T19:02:10.708+0300",
        "title": "auth_ok",
        "user": "guest"
      }
      ```
      
      ```json
      {
        "id": "1.0.11",
        "message": "failed to authenticate user `borat`",
        "severity": "high",
        "time": "2023-11-30T18:58:48.635+0300",
        "title": "auth_failed",
        "user": "borat"
      }
      ```
      2c9a13f3
  5. Nov 29, 2023
    • Dmitry Ivanov's avatar
      feat(audit): implement composite record id · 1340f8a3
      Dmitry Ivanov authored
      Logically, the record id consists of 3 fields:
      * `raft_id` -- raft id of the current node (or `null` if uninitialized);
      * `count` -- in-memory id which is auto incremented for each new record;
      * `gen` -- persistent id which is incremented each time node is started.
      
      However, in practice they are stored inside a global `LogicalClock`.
      
      This is what the record looks like now:
      
      ```json
      {
        "id": "1.0.3",
        "instance_id": "i1",
        "message": "a new instance `i1` joined the cluster",
        "raft_id": "1",
        "severity": "low",
        "time": "2023-11-29T17:07:36.524+0300",
        "title": "join_instance"
      }
      ```
      
      Note how those fields are concatenated using `.`; the resulting
      unique id is represented by a json string type.
      
      Furthermore, since audit record logger now depends on the
      raft machine's state, we decided to move its initialization
      further into the init sequence (postjoin).
      1340f8a3
  6. Nov 28, 2023
  7. Nov 24, 2023
  8. Nov 23, 2023
  9. Nov 22, 2023
  10. Nov 21, 2023
  11. Nov 20, 2023
  12. Nov 17, 2023
  13. Nov 16, 2023
    • Dmitry Ivanov's avatar
      feat(audit): add low-level config for the audit log · a5d1a3c4
      Dmitry Ivanov authored
      This patch implements an `--audit` flag (disabled by default) which
      gives user the ability to enable and configure the audit log. The
      flag takes a string containing the mode and parameters needed to
      initialize tarantool's logging machinery.
      
      See the flag's documentation for more info.
      
      Example:
      
      ```
      picodata run --interactive --audit=/tmp/audit.log
      ```
      a5d1a3c4
    • Georgy Moshkin's avatar
      refactor: mod vshard · bc97d2cb
      Georgy Moshkin authored
      bc97d2cb
  14. 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
  15. Nov 09, 2023
  16. Nov 08, 2023
  17. Nov 07, 2023
  18. 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
  19. Nov 03, 2023
  20. Nov 01, 2023
  21. Oct 31, 2023
    • Dmitry Rodionov's avatar
      refactor: move cli related stuff to src/cli · e8ca68f1
      Dmitry Rodionov authored
      main.rs has grown a bit, adding new stuff to it doesnt feel natural.
      Smaller files are easier to digest. For me it is easier to find stuff
      when there are less files on the top level and some hierarchy shows.
      where to go. A while back I wanted to move sql command to separate
      file but there is already sql.rs on the top level.
      
      This patch solves this issue.
      e8ca68f1
  22. Oct 30, 2023
  23. Oct 27, 2023
  24. Oct 24, 2023
Loading