GET /session/updateUserAttributeCache/{tenant}/{userId}

Internal Endpoint

This endpoint is available only for services within the yuuvis® Momentum cluster. Never expose it for public access in the authentication-prod.yml configuration file.

As of Version

product version 2023 Autumn

Request MethodGET
Response FormatJSON
Description

Stores the user attributes for the requested user specified by tenant and userId in a Redis cache.

The parameter authorization.cacheUserAttributes has to be set to true. This means that authorities information (and abac information if available) are not stored in the JWT but in a Redis cache instead to reduce the header size of cluster-internal HTTP requests.

If authorization.cacheUserAttributes is false (default), the user attributes are retrieved without storing them in a cache.

The AUTHENTICATION service retrieves the user's attributes

  • either from the Redis cache or,
  • if not available in the cache, via GET user.info webhook and stores them in the cache.

If the request was successfully processed, the user's attributes are returned in JSON format in the response body.

Request Example

curl http://authentication-internal/session/updateUserAttributeCache/yuuvistest/406b5a28-7a8b-4c36-a569-df7bff480375

Response Example

200 OK

{
    "username": "mustermann",
    "id": "406b5a28-7a8b-4c36-a569-df7bff480375",
    "credentialsNonExpired": true,
    "accountNonExpired": true,
    "accountNonLocked": true,
    "enabled": true,
    "tenant": "yuuvistest",
    "authorities": [
        "TENANT_ADMIN",
        "SYSTEM_INTEGRATOR",
        "ACCESS_MAILBOXES"
    ],
    "abac": {
      "mailGroups": [
           "mailbox_sales",
           "mailbox_pm"
       ],
       "sap_permissions": [
           "sap_read",
           "sap_write"
       ]
    }
}