Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keycloak 19 cannot register post logout redirect URIs whose length in total is over 4000 #14013

Closed
tnorimat opened this issue Aug 26, 2022 · 0 comments · Fixed by #14360
Closed
Labels
area/oidc Indicates an issue on OIDC area kind/bug Categorizes a PR related to a bug status/triage
Milestone

Comments

@tnorimat
Copy link
Contributor

Describe the bug

In the previous version of keycloak, we could register post logout redirect URIs whose length in total is over 4000 to Valid Redirect URIs field of client settings.
In keycloak 19, post logout redirect URIs needs to be stored in post logout redirect URIs field of client settings inpendently. However, when I tried to register such the post logout redirect URIs that could be registered in the previous version on keycloak, I encountered the exception (javax.persistence.PersistenceException).

Version

19.0.0, 19.0.1

Expected behavior

Several post logout redirect URIs whose length in total is over 4000 can be successfully registered.

Actual behavior

The exception (javax.persistence.PersistenceException) is thrown.

How to Reproduce?

On client settings, try to register several post logout redirect URIs whose length in total is over 4000.

Anything else?

It seems that this exception is thrown because ClientAttributeEntity put the following limitation on value field.

@Table(name="CLIENT_ATTRIBUTES")
@Entity
@IdClass(ClientAttributeEntity.Key.class)
public class ClientAttributeEntity {

    @Id
    @ManyToOne(fetch= FetchType.LAZY)
    @JoinColumn(name = "CLIENT_ID")
    protected ClientEntity client;

    @Id
    @Column(name="NAME")
    protected String name;

    @Column(name = "VALUE", length = 4000)
    protected String value;

From keycloak 19.0.0, post logout redirect URIs are stored as Client Attribute.

I propose that we would lift the limitation on value field of ClientAttributeEntity the same as RoleAttributeEntity, GroupAttributeEntity, UserAttributeEntity, and RealmAttributeEntity.

@tnorimat tnorimat added kind/bug Categorizes a PR related to a bug status/triage labels Aug 26, 2022
@stianst stianst added the area/oidc Indicates an issue on OIDC area label Aug 26, 2022
tnorimat added a commit to Hitachi/keycloak that referenced this issue Sep 13, 2022
tnorimat added a commit to Hitachi/keycloak that referenced this issue Oct 6, 2022
hmlnarik pushed a commit that referenced this issue Oct 6, 2022
@stianst stianst added this to the 20.0.0 milestone Oct 14, 2022
andre-nascimento6791 pushed a commit to andre-nascimento6791/keycloak-cnd-work that referenced this issue Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/oidc Indicates an issue on OIDC area kind/bug Categorizes a PR related to a bug status/triage
Projects
None yet
2 participants