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

Custom user attributes not available in javascript policy

    XMLWordPrintable

Details

    • Enhancement
    • Status: Closed
    • Major
    • Resolution: Won't Do
    • 4.1.0.Final
    • None
    • Authorization Services
    • None
    • NEW
    • NEW

    Description

      Attempted to write a javascript policy to control access, based on user's attributes (ABAC).

      Following the documentation, custom user's attributes should be available in the script via
      $evaluation.getContext().getIdentity().getAttributes() however custom attributes are not available there.

      However, calling $evaluation.getRealm().getUserAttributes(identity.getId()) gives the custom user properties (and only these)

      Attachments

        Activity

          People

            Unassigned Unassigned
            ngmip ng Mip (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: