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

Split Mender client and its Auth Manager into two separate components

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Unified communication
    • Labels:

      Description

      Acceptance criteria:

      • Split AuthManager into its own package, github.com/mendersoftware/mender/authmanager.
      • Package must not be used from the rest of the client.
      • The "daemon" inside this package runs in its own Go routine.
      • All existing instances of interacting with the AuthManager must be replaced with DBus calls, just like other daemons do.
      • Server list handling should be moved to the new package (return first server that works in DBus call).
      • The client code outside the authmanager package should no longer parse the ServerURL field.
      • All API calls in the client should be wrapped in retry loops using DBus FetchJwtToken and waiting for signal.
      • Maybe unit tests (but most of this is just moving things around, so maybe it's covered well enough already).
      • Feature branch: feature-unified_comms

      This subtly changes how server failover works. In the past, if there was more than one server, the client would invalidate the token as soon as the first one fails, for every call. In other words, if there was a failover situation, the client would reauthenticate on every API call. With the new method, the client will keep connecting to the first server that worked when the JWT token was issued, until it expires. So in a migration situation, you now have to reject the client in the old server before it will show up in the new one, or else you need to wait up to a week.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10040 Kristian Amlie
                Reporter:
                a10040 Kristian Amlie
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support