Kuadrant / Kuadrant/kuadrant-console-plugin
TLSPolicy Issuer State Caching Bypass
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 65
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 44
Description
**Describe the bug**
The TLSPolicy creation form allows submission without a valid Issuer selected if the user toggles between the "ClusterIssuer" and "Issuer" radio types. The validation logic checks the cached state of the hidden input rather than strictly enforcing validation on the active, visible input.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to 'Kuadrant -> Policies -> TLS' in the OpenShift Console.
2. Click on 'Create TLS Policy'.
3. Ensure 'ClusterIssuer' is selected under the Issuer Type radio buttons.
4. Select a valid ClusterIssuer from the dropdown.
5. Toggle the Issuer Type radio button to 'Issuer'.
6. Do not select an Issuer from the newly appeared dropdown (leave it empty).
7. Fill in the remaining required fields (Policy Name, Target Gateway).
8. Notice that the 'Create' button remains enabled. Click it and see the resulting invalid YAML generation/API error.
**Expected behavior**
the form validation should strictly evaluate the currently active Issuer Type. If the 'Issuer' radio button is selected, it should require a valid selection from the 'Issuer' dropdown and ignore any cached state from the 'ClusterIssuer' dropdown, keeping the 'Create' button disabled until a valid selection is made.
**Screenshots**
**Additional context**
Also because is rendered as a sibling of the actions within the PatternFly flex container (inside KuadrantCreateUpdate.tsx), the block-level height of the error alert distorts the flexbox layout. This causes the "Create" button to stretch vertically into a oval shape instead of retaining its standard rounded-rectangle styling.
Contributor guide
Research direction
Start in KuadrantCreateUpdate.tsx and reproduce the TLS Policy form flow by switching between ClusterIssuer and Issuer after selecting an issuer. Trace validation for the active dropdown and inspect the AlertGroup and Button layout inside the PatternFly ActionGroup; done means an empty active issuer disables Create, and the error alert does not distort the button shape.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100