Class V1FieldSelectorAttributes
java.lang.Object
io.kubernetes.client.openapi.models.V1FieldSelectorAttributes
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-02-04T19:05:53.712211Z[Etc/UTC]",
comments="Generator version: 7.6.0")
public class V1FieldSelectorAttributes
extends Object
FieldSelectorAttributes indicates a field limited access. Webhook authors are encouraged to * ensure rawSelector and requirements are not both set * consider the requirements field if set * not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the *SubjectAccessReview endpoints of the kube-apiserver: * If rawSelector is empty and requirements are empty, the request is not limited. * If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. * If rawSelector is empty and requirements are present, the requirements should be honored * If rawSelector is present and requirements are present, the request is invalid.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddRequirementsItem
(V1FieldSelectorRequirement requirementsItem) boolean
static V1FieldSelectorAttributes
Create an instance of V1FieldSelectorAttributes given an JSON stringrawSelector is the serialization of a field selector that would be included in a query parameter.requirements is the parsed interpretation of a field selector.int
hashCode()
rawSelector
(String rawSelector) requirements
(List<V1FieldSelectorRequirement> requirements) void
setRawSelector
(String rawSelector) void
setRequirements
(List<V1FieldSelectorRequirement> requirements) toJson()
Convert an instance of V1FieldSelectorAttributes to an JSON stringtoString()
static void
validateJsonElement
(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_RAW_SELECTOR
- See Also:
-
SERIALIZED_NAME_REQUIREMENTS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1FieldSelectorAttributes
public V1FieldSelectorAttributes()
-
-
Method Details
-
rawSelector
-
getRawSelector
rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver's *SubjectAccessReview will parse the rawSelector as long as the requirements are not present.- Returns:
- rawSelector
-
setRawSelector
-
requirements
-
addRequirementsItem
-
getRequirements
requirements is the parsed interpretation of a field selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood.- Returns:
- requirements
-
setRequirements
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement
- JSON Element- Throws:
IOException
- if the JSON Element is invalid with respect to V1FieldSelectorAttributes
-
fromJson
Create an instance of V1FieldSelectorAttributes given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1FieldSelectorAttributes
- Throws:
IOException
- if the JSON string is invalid with respect to V1FieldSelectorAttributes
-
toJson
Convert an instance of V1FieldSelectorAttributes to an JSON string- Returns:
- JSON string
-