Repository navigation
Conversation
Signed-off-by: Eric Barault <eric.barault@gmail.com>
Signed-off-by: Eric Barault <eric.barault@gmail.com>
…n.crossplane.io_inputs.yaml) Signed-off-by: Eric Barault <eric.barault@gmail.com>
Signed-off-by: Eric Barault <eric.barault@gmail.com>
Signed-off-by: Eric Barault <eric.barault@gmail.com>
Signed-off-by: Eric Barault <eric.barault@gmail.com>
Author
|
someone to review this ? |
blacksoxx
reviewed
Oct 26, 2026
blacksoxx
left a comment
There was a problem hiding this comment.
Pulled the branch and ran it with Go 1.26.0, the version CI uses: go vet ./... is clean, go test ./... passes, the new table test passes under -race (all nine cases), and go generate ./input/... leaves the tree unchanged, so the packaged input schema matches the Go type. The ambiguity guard treating a paginated response as ambiguous is the right call for something that feeds grants, and the OData literal escaping now also covers the UPN path, which previously interpolated the value as is. From my side this looks good to merge; the call is the maintainers'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
UserValidationcurrently always looks upuserPrincipalName. For B2B guests, the tenant-specific UPN often differs from their mail address, so callers must expose or reconstruct a guest UPN to resolve a user.This adds an optional
userLookupField(userPrincipalNameormail). Omitting it keeps the existing UPN lookup. It works with bothusersandusersRefand leaves the returned user fields unchanged.Mail lookups fail on multiple matches or a paginated response rather than returning several principals for one requested owner. No-match behavior is unchanged (empty results). Filter values escape OData apostrophes, and unsupported lookup properties are rejected. No additional Graph permissions are required beyond the existing User.Read.All used for user validation.
Includes generated input schema, README documentation, and SDK request/response tests against a local HTTP server: default/explicit UPN, mail lookup of a guest with a different UPN, apostrophe escaping, no matches, ambiguous/paginated results and invalid field rejection. No live Entra calls or deployment are part of these tests.
Validation
go generate ./input/...go mod tidygo test ./...go test -race ./...go vet ./...golangci-lint run(v2.12.2, matching upstream CI)I have: