XMLWordPrintable

    • Team B
    • Sprint 68 (Sep 2020), Sprint 69 (Oct 2020), Sprint 70 (Nov 2020), Sprint 71 (Dec 2020), Sprint 72 (Jan 2021), Sprint 73 (Feb 2021)
    • 4

      Summary

      Currently Zabbix does not provide a way of generating and managing standalone API Auth tokens. Any 3rd party application that uses API must call 'user.login', it is not good for the following reasons:

      • user name and clear text password must be stored on client side
      • no Auth token management, it is impossible to see full list of active tokens, also no way to revoke a token

      Аcceptance

      1. Any Zabbix user having enough permissions may create one or more API Auth tokens
        1. User settings and user editing forms will have access to a list of tokens assigned to this user
        2. Each token will have the following attributes:
          1. Creation time: date and time when the token was created
          2. Expiration time: optional expiration date and time. Token cannot be used after expiration time
          3. Creator: user who created this token
          4. Name: non-unique short name of the token
          5. Description: longer description of the token (optional)
          6. User: to whom this Auth token is assigned, the user to borrow permissions from
          7. Status: active, disabled
          8. Token: value of the API Auth token, visible only when a token is generated
            1. Token must be a randomly generated 32 byte string represented as 64 character HEX value
      1. User roles will be extended to support another allowed action (role): Create and edit API tokens
      2. List of all tokens will be available to super-administrators under Administration->General→Auth tokens
        1. Therefore super-administrators can create new, update and delete tokens created by any user
          1. Only if super-admins has permissions to "Create and edit API tokens"
      3. The following operation will be supported for tokens:
        1. Create, Delete, Disable, Enable
        2. Update: only name, description and status
      4. Zabbix API will be extended to support operations with tokens
        1. Same restrictions for operations as in the UI
        2. Token value is only returned on create, 'get' must not return token value
      5. Access to Zabbix API methods will be possible:
        1. using user name and password authentication (as it is now)
        2. using Auth token given in the "Auth" field

      Nonfunctional requirements

      1. N/A

      Use cases

      1. I want to generate and share Zabbix API token having expiration date and limited permissions with some 3rd party
        1. I do not want to share user name and password!

      Decisions made

      1. No read only tokens for now. It should probably be implemented on user role level
        1. Besides Zabbix 5.2 support filtering for API methods, which is even more flexible
      2. API token values are write-only

        1. temp-user-menu.png
          temp-user-menu.png
          5 kB
        2. spec-user-menu.png
          spec-user-menu.png
          4 kB
        3. image-2020-12-29-11-31-57-781.png
          image-2020-12-29-11-31-57-781.png
          26 kB
        4. single-option-submenu.png
          single-option-submenu.png
          19 kB
        5. back_button_fatal_error.gif
          back_button_fatal_error.gif
          501 kB
        6. mooving_CLose_button.gif
          mooving_CLose_button.gif
          868 kB
        7. Screenshot from 2021-01-14 18-38-18.png
          Screenshot from 2021-01-14 18-38-18.png
          5 kB
        8. Screenshot from 2021-01-14 18-38-44.png
          Screenshot from 2021-01-14 18-38-44.png
          6 kB
        9. zabbix_server.log
          6 kB
        10. not_removed_menu_entry.gif
          not_removed_menu_entry.gif
          1.08 MB
        11. image-2021-01-27-12-44-38-333.png
          image-2021-01-27-12-44-38-333.png
          43 kB

            talbergs Mārtiņš Tālbergs (Inactive)
            palivoda Rostislav Palivoda
            Team B
            Votes:
            5 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved: