Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defaults & Overrides #431

Open
20 of 42 tasks
guicassolato opened this issue Feb 15, 2024 · 2 comments
Open
20 of 42 tasks

Defaults & Overrides #431

guicassolato opened this issue Feb 15, 2024 · 2 comments
Assignees
Labels
area/api Changes user facing APIs kind/epic Master issue tracking broken down work

Comments

@guicassolato
Copy link
Contributor

guicassolato commented Feb 15, 2024

Extend the Kuadrant Policy APIs so we support use cases of Defaults & Overrides (D/O) for Inherited Policies, including the following base use cases:

  • Defaults: policies set at a lower level in the hierarchy supersede ones set (as "defaults") at a higher level, or "more specific beats less specific"
  • Overrides: policies set at a higher level in the hierarchy supersede ones set at the lower levels, or "less specific beats more specific"

As well as the following derivative cases:

  • Merged defaults: default policy rules that are merged into the more specific policies (as opposed to an atomic less specific set of rules that is activated only when another more specific one is absent)
  • Merged overrides: override policy rules that are merged into the more specific policies (as opposed to an atomic less specific set of rules that is activated fully replacing another more specific one that is present)
  • Constraints: specialization of an override that rather than declaring concrete values, specify constraints for values – typically numeric values and regular patterns (e.g. limited sets) – declared at the lower levels, that is used to "clip" the requested specific values within the boundaries dictated by the constraint, in an override fashion – e.g.: min value, max value, in operator.
  • Deactivation: specialization that completes a merge default use case by allowing lower level policies to disable ("deactivate") individual defaults set a higher level (as opposed to superseding those defaults with actual more specific policy rules with meaning)

Out of scope:

  • Requirements: high level policies that declare requirements to be fulfilled by more specific (lower level) policies without specifying concrete default or override values or constraints. E.g.: "an authentication policy must be enforced, but none is provided by default."

Affected APIs:

  • AuthPolicy
  • RateLimitPolicy

Non-affected APIs, while these are considered Direct Policies, i.e. with no hierarchical effect:

  • DNSPolicy
  • TLSPolicy

Implementation steps

Tier 0: Specification and WIP to close first

(priority: 0)

Tier 1

(priority: 1)

Tier 2

(priority: 2)

Tier 3

(priority: 3)

Enhancements & refactoring

(priority: 4)

Unresolved questions & Future possibilities

(priority: 5)

Tests

@guicassolato guicassolato added area/api Changes user facing APIs kind/epic Master issue tracking broken down work labels Feb 15, 2024
@guicassolato guicassolato self-assigned this Feb 15, 2024
@guicassolato guicassolato transferred this issue from Kuadrant/architecture Feb 26, 2024
@guicassolato guicassolato added the status/discussing Further information is requested label Feb 26, 2024
@KevFan
Copy link
Contributor

KevFan commented Mar 4, 2024

Implementation steps looks good to me to cover the RFC suggestions 👍

I've updated the PR link for RateLimit WasmPlugin Controller as the intial PR has now been superseded by #447

@guicassolato
Copy link
Contributor Author

About using maps vs listMapType and the effects on merging into spec fields, to leave no doubts, @youngnick has added an excellent example to kubernetes-sigs/gateway-api#2813.

cc @maleck13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Changes user facing APIs kind/epic Master issue tracking broken down work
Projects
Status: In Progress
Development

No branches or pull requests

2 participants