8000 Clicking the "save" button multiple times in the Saml IDP configuration page corrupts the value of "AuthnContext ClassRefs" · Issue #29314 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Clicking the "save" button multiple times in the Saml IDP configuration page corrupts the value of "AuthnContext ClassRefs" #29314

Closed

Description

@enicolaescu

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

admin/ui

Describe the bug

The problem occurs when I click the "save" button on the configuration page of a Saml IDP with a non-null value in the "AuthnContext ClassRefs" field

The first time I click save the value in the text box vanishes, although it's still persisted in the database and appears again if I refresh the page, however if I click save more than once the value becomes corrupted and it doesn't appear anymore in the "AuthnContext ClassRefs" field because I assume it can't be parsed properly. I will add the details below

Version

24.0.3

Regression

  • The issue is a regression

Expected behavior

When I click the "save" button of the Saml IDP config (or any custom IDP that extends saml by adding "-saml" to it's id) the value of the "AuthnContext ClassRefs" field should not disappear from the UI and it should stay the same regardless how many times I click save

Actual behavior

When I click the "save" button of the Saml IDP config (or any custom IDP that extends saml by adding "-saml" to it's id) the value of the "AuthnContext ClassRefs" field disappears from the UI, if I continue clicking the save button the value becomes corrupted

How to Reproduce?

  1. Create a Saml idp, the configuration doesn't matter since it will not be used
  2. Scroll down to the "AuthnContext ClassRefs" and input any value like "classRef"
  3. Click the save button: the value will vanish from the UI but it's still persisted in the database
  4. Click the save button multiple times and inspect the payload of the PUT request: you will see the corrupted values

click save 1: authnContextClassRefs: "["classRef"]"
click save 2: authnContextClassRefs: ""[\"classRef\"]""
click save 3: authnContextClassRefs: ""\"[\\\"classRef\\\"]\"""
etc

Anything else?

No response

Activity

  1. ssilvert commented on May 6, 2024

    @ssilvert
    Contributor

    I have verified this issue.

    Also, if you type in a ClassRef without hitting Add AuthnContext ClassRef then it will not be saved. This is very confusing for the user as they expect what they typed in to be saved.

  2. added a commit that references this issue on May 15, 2024
    c311238
  3. added 2 commits that reference this issue on May 15, 2024
    ef4a246
    56bf560
  4. added a commit that references this issue on May 15, 2024
    3fb06c0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Fields

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

    0