Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-7952

Decision Cache

    XMLWordPrintable

Details

    • Keycloak Sprint 10, Keycloak Sprint 13
    • 7
    • NEW
    • NEW

    Description

      To provide better performance, we could support different layers of cache in order to quickly map past decisions with new authorization requests arriving at the server.

      I can think of two main cache strategies:

      • Permission Cache
      • Policy Decision Cache

      Permission Cache is a cache that is able to map previously granted permissions to new authorization requests as follows:

      • Authorization requests using the same access token or ID token can be mapped to any permissions previously granted. In Keycloak, tokens have a unique id which can be used to do this mapping
      • Based on the permissions previously granted, resolve any permission in the cache that can be mapped to the resources/scopes being requested.
      • Only perform the evaluation on resources that could not be resolved from the cache

      This caching layer in certain cases could completely bypass the evaluation and just resolve permissions from the cache.

      The Policy Decision Cache is a cache in front of each policy provider. Each provider should be able to map previous decisions to new evaluations. For instance, a cache in front of resource permissions could use the token representing the identity to remember decisions, similar to Permission Cache.

      Attachments

        Activity

          Public project attachment banner

            context keys: [headless, issue, helper, isAsynchronousRequest, project, action, user]
            current Project key: KEYCLOAK

            People

              Unassigned Unassigned
              psilva@redhat.com Pedro Igor Craveiro
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: