Skip to content

Migrate the OIDC auth provider form to use vee-validate#17738

Open
rak-phillip wants to merge 7 commits into
rancher:masterfrom
rak-phillip:task/vee-validate-oidc-auth-provider
Open

Migrate the OIDC auth provider form to use vee-validate#17738
rak-phillip wants to merge 7 commits into
rancher:masterfrom
rak-phillip:task/vee-validate-oidc-auth-provider

Conversation

@rak-phillip
Copy link
Copy Markdown
Member

@rak-phillip rak-phillip commented May 19, 2026

Summary

This migrates the custom validation implementation for the OIDC auth provider to a pure vee-validate/zod implementation.

Fixes #17754

Occurred changes and/or fixed issues

  • Migrate computed props to composition api for oidc
  • Validate oidc auth provider form with vee-validate/zod
  • Add vee-validate to ArrayList
  • Fix unit tests

Technical notes summary

In order to get this to work with useForm from vee-validate, we need to find a way to sync values from the form's mixins with the composition API. This is currently accomplished via watchers that exist to sync values with the refs (99078ad). I think that the proper, long-term solution will be to migrate away from mixins to the composition API. Take care in reviewing this pattern, there's a higher risk of errors with the current approach.

The validation approach using vee-validate/zod is used to demonstrate validation without the form-validation mixin or bridge in use. More information about the patterns represented in this PR can be found in the vee-validation documentation: https://vee-validate.logaretm.com/v4/guide/composition-api/typed-schema/#zod

Areas or cases that should be tested

Test configuring the Keycloak auth provider. Instructions for getting started can be found in: https://github.com/rancher/ui-internal-tools/tree/main/keycloak

Areas which could experience regressions

There are risks that the authentication logic has been unintentionally altered with this change. Edge-cases could need additional consideration. For example, what happens if the form passes validation in the UI, but the server rejects the form?

Screenshot/Video

Inline validation errors

image

URL validation

image

ArrayList validation

image

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility
  • The PR has considered, and if applicable tested with, the three Global Roles Admin, Standard User and User Base

@rak-phillip rak-phillip changed the title Task/vee validate OIDC auth provider Migrate the OIDC auth provider form to use vee-validate May 19, 2026
@rancher-ui-project-bot rancher-ui-project-bot Bot added this to the v2.15.0 milestone May 20, 2026
@rak-phillip rak-phillip force-pushed the task/vee-validate-oidc-auth-provider branch from 71dee87 to 47d0240 Compare May 20, 2026 23:41
@rak-phillip rak-phillip marked this pull request as ready for review May 20, 2026 23:42
@rak-phillip rak-phillip requested a review from codyrancher May 20, 2026 23:42
Comment thread shell/edit/auth/oidc.vue Outdated
Comment thread shell/components/form/ArrayList.vue Outdated
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
@rak-phillip rak-phillip force-pushed the task/vee-validate-oidc-auth-provider branch from 47d0240 to 213eeba Compare May 21, 2026 22:12
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
@rak-phillip rak-phillip requested a review from codyrancher May 21, 2026 22:24
Copy link
Copy Markdown
Member

@codyrancher codyrancher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good with me on the technical side.

I think you still wanted to get the opinion of UX, if not I think I'd want to talk about the array list error indicator.

@rak-phillip
Copy link
Copy Markdown
Member Author

I think you still wanted to get the opinion of UX, if not I think I'd want to talk about the array list error indicator.

Yes, I am scheduling time to discuss this with @oboc-sts next week, as well as a few other design changes that have come through with recent PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate OIDC auth provider form to vee-validate

2 participants