Μετάβαση στο περιεχόμενο

SmartAuth 2.0.78: reliable connection limits on the local network, and each user's sessions in full Dolibarr lists

Έργο : SmartAuth Εκδότης : CAP-REL Έκδοση : 2.0.78 Ημερομηνία : Dolibarr 18 έως 24

Ασφάλεια σταθερή ανακοινώθηκε χθες δηλωμένη συμβατότητα στα English
Αυτή η ανακοίνωση είναι μετάφραση. Διαβάστε την αρχική έκδοση (Français)

This version includes the changes released since 2.0.70.

Reliable connection limits on the local network

SmartAuth limits connection attempts, token renewals, QR code pairing, and password reset by IP address. Until now, it trusted the address announced in the X-Real-IP and X-Forwarded-For headers as soon as a request came from a private address. In a shop or office, where all tablets and workstations have a private address, any device could therefore change its address with each attempt and bypass these limits.

By default, SmartAuth now only trusts the proxy installed on the same machine as Dolibarr. A reverse proxy located on another machine or in a Docker container must be declared in the Trusted proxy IPs setup.

Each user's sessions in full Dolibarr lists

The SmartAuth tab on the user card is divided into three sub-tabs: Devices, Tokens, and API Connections. These are full Dolibarr lists, with filters, sorting, pagination, column selection, and bulk actions: revoke or delete devices, deactivate or delete tokens. They no longer stop at the last five rows, and a token's history opens in one click.

Renaming a device, from its tokens or from the device list, renames the phone and all its applications: a single name appears everywhere.

These lists show the user's IP addresses and browsers: viewing them on another user's card now requires the SmartAuth read permission.

Stay connected on a daily-used device

A SmartMaker application renews its access token every hour. SmartAuth limited this renewal to one hundred times per device: an application left open all day would ask for the password again after one to two weeks. This limit is now a duration: a device stays connected for 90 days after its connection, regardless of usage, then asks for the password once. A device left unused for 30 days must still reconnect.

The duration is set by the constant SMARTAUTH_TOKEN_FAMILY_MAX_DAYS, in days. A value of 0 removes the limit, which is discouraged: a stolen session would remain valid as long as it is used.

A device that resends its renewal request, on an unstable mobile network for example, is no longer disconnected for that reason.

Know why a device was disconnected

SmartAuth closes a session when its renewal token is presented a second time—a sign of a copied token—or when it reaches its maximum duration. The rejected request then appears in the logs of the SmartAuth tab on the user card, with the reason in the Message column. For this, the log must be enabled (Enable web log collection, in the module setup).

The list of tokens in the same tab can be filtered for expired tokens, which are no longer counted among active tokens.

A more informative API log

  • A denied request includes its reason and the user who sent it.
  • Each connection and token renewal is linked to its token and user.
  • Photos, documents, and other responses are logged with their actual type and size.
  • The Item column, always empty, is hidden.

Open the application from the QR code

The QR code on the SmartAuth tab opens a module’s application, and its address is displayed with it.

Update

  1. Replace the module folder, then deactivate and reactivate it: since 2.0.70, the database gains a table and two columns in the API log. Until the module is reactivated, the log continues to be filled without the user or the reason for refusals.
  2. If your reverse proxy is on another machine or in a Docker container, declare its address in Trusted proxy IPs. Otherwise, all customers appear with the proxy's address and share the same limits.
  3. Grant the SmartAuth read permission to those who view other users' sessions from their card.