Conversation
vknabel
marked this pull request as ready for review
September 22, 2026 11:39
simcod
reviewed
Sep 25, 2026
Comment on lines
+59
to
+63
| // IsTenantLogin returns true if name field satisfies our requirements. | ||
| optional bool is_tenant_login = 80048962 [(buf.validate.predefined).cel = { | ||
| id: "string.is_tenant_login" | ||
| message: "must be within 2 and 128 characters" | ||
| expression: "this.size() >= 2 && this.size() <= 128" |
Contributor
There was a problem hiding this comment.
Currently not used for validation yet. Do you want to use it somewhere?
There was a problem hiding this comment.
In #10 we just use is_name at the moment.
Comment on lines
+120
to
+131
| // ProjectRolesKeysValid ensures that project roles keys met our requirements. | ||
| optional bool project_roles_keys_valid = 80068953 [(buf.validate.predefined).cel = { | ||
| id: "project_roles.key.valid" | ||
| message: "subject must be a '*', or a valid UUID" | ||
| expression: "this.all(k, k == '*' || k.matches('^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'))" | ||
| }]; | ||
| // TenantRolesKeysValid ensures that tenant roles keys met our requirements. | ||
| optional bool tenant_roles_keys_valid = 80068954 [(buf.validate.predefined).cel = { | ||
| id: "tenant_roles.key.valid" | ||
| message: "subject must be '*' or between 2 and 128 characters" | ||
| expression: "this.all(k, k == '*' || this.size() >= 2 || this.size() <=128 )" | ||
| }]; |
Contributor
There was a problem hiding this comment.
Same as above. Not used yet.
| optional bool tenant_roles_keys_valid = 80068954 [(buf.validate.predefined).cel = { | ||
| id: "tenant_roles.key.valid" | ||
| message: "subject must be '*' or between 2 and 128 characters" | ||
| expression: "this.all(k, k == '*' || this.size() >= 2 || this.size() <=128 )" |
Contributor
There was a problem hiding this comment.
Suggested change
| expression: "this.all(k, k == '*' || this.size() >= 2 || this.size() <=128 )" | |
| expression: "this.all(k, k == '*' || k.size() >= 2 && k.size() <=128 )" |
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.
Used Qwen 3.8
Implements parts of https://github.com/fi-ts/fco-apiserver/issues/5
Taken from metal-stack/api