Skip to content

Implement Validation Webhook for Tokenetes Custom Resources #46

Description

@kchiranjewee63

Current Behavior

Currently, there is no validation webhook for Tokenetes Configuration Resources. Incorrect configurations are only detected at runtime.

Desired Behavior

Implement a validation webhook that performs thorough checks on Tokenetes CRDs, particularly TraTs, before they are persisted in the cluster. This will catch configuration errors early in the deployment process.

Proposed Validations (non-exhaustive)

For TraTs and other Tokenetes CRDs, implement validations including but not limited to:

  1. Variable referencing:
    • Validate correct referencing of user-introduced variables.
    • Verify proper usage of standard variables (e.g., body, headers).
  2. adzMapping validation:
    • Implement stricter validation for the adzMapping field, which currently accepts any input in the CRD definition.
  3. HTTP method names:
    • Ensure that only valid HTTP method names (GET, POST, PUT, DELETE, etc.) are used.

Discussion Points

  • Are there any other important validations we should include?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions