Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-4009

Implement DBus API: GetJwtToken

    XMLWordPrintable

    Details

      Description

      Acceptance criteria:

      • DBus implementation must using Glib's GIO dbus library (search for D-Bus to find various sub categories).
      • DBus must live in the separate authentication Go routine from MEN-4015, and be multiplexed with channel requests from the client.
      • Client must register itself on the system bus as io.mender.AuthenticationManager
      • The D-Bus object name must be /io/mender/AuthenticationManager
      • The interface name must be io.mender.Authentication1
      • The member name must be GetJwtToken (the full name will be io.mender.Authentication1.GetJwtToken if combined with the interface name)
      • The endpoint must return the current JWT token.
      • If no JWT token is available, error must be returned.
      • Endpoint must not trigger authentication (this is a different endpoint).
      • Following MEN-4032, it must be possible to completely compile out the Glib dependency, and hence the API.

      This introduction page is useful to understand the different DBus concepts. Also, in the demo that was made for this feature earlier, this command line was used to query the deployment API, which may serve as an example:

      dbus-send --print-reply --system --dest=com.mender.MenderClient /com/mender/MenderClient com.mender.Deployments.CheckForDeployment
      

      In the case of authentication, this would be:

      dbus-send --print-reply --system --dest=com.mender.AuthenticationManager /com/mender/AuthenticationManager com.mender.Authentication.GetJwtToken
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tranchitella Fabio Tranchitella
                Reporter:
                a10040 Kristian Amlie
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel