IAM: Add email, login field validation to User create/update API (#112391)

* wip

* wip

* wip

(cherry picked from commit 8cedf25892)

* Search seems to be working, the validation is still wip

* Use keyword.Name analyzer for Filterable fields

* Only string fields should be indexed with keyword analyzer

* Change search query for email and login fields to use term query
* Remove unnecessary Exact from the resource protobuf definitions

Co-Authored-By: Ryan McKinley <ryantxu@gmail.com>

* Add legacy search support to the API

* Tests for legacy search, validate and integration tests for user

* Lint

* Add snapshot tests to userDocumentBuilder

* Address CodeQL issues

* Improvements, handle Mode2, tests should pass

* Change default limit from 0 to 1 for requests

* Cleanup

* Add fixme

* Update pkg/registry/apis/iam/register.go

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>

* Update pkg/registry/apis/iam/user/legacy_search.go

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
This commit is contained in:
Misi
2025-10-23 11:29:02 +02:00
committed by GitHub
co-authored by Ryan McKinley Stephanie Hingtgen
parent f191acf811
commit ad9d8098ef
26 changed files with 1269 additions and 45 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ metadata:
namespace: default
name: abcdefghijkl
spec:
email: testuser1@example123.com
email: testuser1@example123
login: testuser1
name: Test User 1
provisioned: false