Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Support for Java arrays in Native Types聽#1059

Copy link
Copy link

Description

@dteleguin
Issue body actions

Kudos to the team for releasing the amazing and long-awaited feature 馃憦

I would like to emphasize the importance of supporting Java arrays. This might become an issue when integrating CEL into software having a mature and stable data model. For example, JSON Web Token, a structure central to OAuth and OpenID Connect, is modeled in Keycloak as a Jackson-annotated value class. The audience parameter, which supports multiple values, is modeled as String[]. When trying to register the JsonWebToken with CEL, I'm getting the following error:

ERROR: Unsupported type for property 'audience' in class org.keycloak.representations.JsonWebToken
ERROR: Unsupported Java type for CEL mapping: [Ljava.lang.String;

As a workaround, I can parse the string representation of the JWT into a Protobuf Value, which is redundant and adds extra overhead. Also, I doubt we can convince Keycloak to change the type to List as it would be a huge breaking change to Keycloak and existing extensions. That said, it would be very nice to have a native support for Java arrays other than byte[] (for Keycloak, String[] in the first place).

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.