Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for valueExpression (0.26 sec)

  1. staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/compile_test.go

    						}
    					})
    					t.Run("auditAnnotation.valueExpression", func(t *testing.T) {
    						// Test audit annotation compilation by casting the result to a string
    						options := OptionalVariableDeclarations{HasParams: tc.hasParams, HasAuthorizer: tc.hasAuthorizer}
    						result := compiler.CompileCELExpression(&fakeAuditAnnotationCondition{
    							ValueExpression: "string(" + expr + ")",
    						}, options, envType)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation_test.go

    					Prefix: pointer.String("prefix"),
    				},
    				Extra: []api.ExtraMapping{
    					{Key: "example.org/foo", ValueExpression: ""},
    				},
    			},
    			structuredAuthnFeatureEnabled: true,
    			want:                          `issuer.claimMappings.extra[0].valueExpression: Required value: valueExpression is required`,
    		},
    		{
    			name: "extra mapping value expression is invalid",
    			in: api.ClaimMappings{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 87.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/validator_test.go

    				{
    					Error: fmt.Errorf("valueExpression ''this is not valid CEL' resulted in error: <nil>"),
    					ExpressionAccessor: &AuditAnnotationCondition{
    						ValueExpression: "'this is not valid CEL",
    					},
    				},
    			},
    			auditAnnotations: []PolicyAuditAnnotation{
    				{
    					Action: AuditAnnotationActionError,
    					Error:  "valueExpression ''this is not valid CEL' resulted in error: <nil>",
    				},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/plugin.go

    	celExpressionAccessor := make([]cel.ExpressionAccessor, len(inputValidations))
    	for i, validation := range inputValidations {
    		validation := AuditAnnotationCondition{
    			Key:             validation.Key,
    			ValueExpression: validation.ValueExpression,
    		}
    		celExpressionAccessor[i] = &validation
    	}
    	return celExpressionAccessor
    }
    
    func convertv1beta1Variables(variables []v1.Variable) []cel.NamedExpressionAccessor {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  5. pkg/apis/admissionregistration/validation/validation.go

    	}
    
    	trimmedValueExpression := strings.TrimSpace(v.ValueExpression)
    	if len(trimmedValueExpression) == 0 {
    		allErrors = append(allErrors, field.Required(fldPath.Child("valueExpression"), "valueExpression is not specified"))
    	} else if len(trimmedValueExpression) > maxAuditAnnotationValueExpressionLength {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 56.6K bytes
    - Viewed (0)
  6. pkg/apis/admissionregistration/validation/validation_test.go

    				AuditAnnotations: []admissionregistration.AuditAnnotation{{
    					Key:             "something",
    					ValueExpression: "true",
    				}},
    			},
    		},
    		expectedError: `spec.auditAnnotations[0].valueExpression: Invalid value: "true": must evaluate to one of [string null_type]`,
    	}, {
    		name: "invalid auditAnnotations valueExpression",
    		config: &admissionregistration.ValidatingAdmissionPolicy{
    			ObjectMeta: metav1.ObjectMeta{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 147.1K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go

    		seenExtraKeys.Insert(mapping.Key)
    
    		if len(mapping.ValueExpression) == 0 {
    			allErrs = append(allErrs, field.Required(fldPath.Child("valueExpression"), "valueExpression is required"))
    			continue
    		}
    
    		compilationResult, err := compileClaimsCELExpression(compiler, &authenticationcel.ExtraMappingExpression{
    			Key:        mapping.Key,
    			Expression: mapping.ValueExpression,
    		}, fldPath.Child("valueExpression"))
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 31.3K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/oidc_test.go

    								Key:             "example.org/admin",
    								ValueExpression: `(has(claims.is_admin) && claims.is_admin) ? "true":""`,
    							},
    							{
    								Key:             "example.org/admin_1",
    								ValueExpression: `claims.?is_admin.orValue(false) == true ? "true":""`,
    							},
    							{
    								Key:             "example.org/non_existent",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 97.7K bytes
    - Viewed (0)
  9. staging/src/k8s.io/api/admissionregistration/v1/types.go

    	// The valueExpression may be no longer than 5kb in length.
    	// If the result of the valueExpression is more than 10kb in length, it
    	// will be truncated to 10kb.
    	//
    	// If multiple ValidatingAdmissionPolicyBinding resources match an
    	// API request, then the valueExpression will be evaluated for
    	// each binding. All unique values produced by the valueExpressions
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 23 17:42:49 UTC 2024
    - 61.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/api/admissionregistration/v1/generated.proto

      // The valueExpression may be no longer than 5kb in length.
      // If the result of the valueExpression is more than 10kb in length, it
      // will be truncated to 10kb.
      //
      // If multiple ValidatingAdmissionPolicyBinding resources match an
      // API request, then the valueExpression will be evaluated for
      // each binding. All unique values produced by the valueExpressions
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 23 17:42:49 UTC 2024
    - 51.8K bytes
    - Viewed (0)
Back to top