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

Feature: Limit rules for to a particular duration #761

Open
mrsimpson opened this issue Apr 27, 2022 · 3 comments
Open

Feature: Limit rules for to a particular duration #761

mrsimpson opened this issue Apr 27, 2022 · 3 comments
Labels
enhancement New feature or request Policy Specific to the Policy API
Milestone

Comments

@mrsimpson
Copy link

Motivation

There are restrictions to usage of public curb which vary over the year.
E. g. in Germany, there is the famous Oktoberfest (which we'll be assuming to happen in October during the course of this issue, though it's not ;) ).
Currently, the policy features the ability to be limited to a particular duration. However, the rule inside a policy does not.
Therefore, if an agency currently wants to publish special set of rules which will be valid starting and ending within an already known timeframe, the agency needs to

  1. terminate the current policy before start of the additional rules
  2. create a new policy which includes the additional rules at the very top
  3. re-install the original policy after the end of the period

This is error prone, hard to visualize on a UI and tricky for operators.

Solution proposal

The rule could feature a duration property as per ISO_8601. This would not only allow to define a duration, but also recurring intervals.

Adding the duration to the rule of the same policy does not largely increase complexity as it is only respected during auditing.

Is this a breaking change

This is not breaking in the sense of technical breaking changes. However, those new restrictions to a rule would create effort at the provider's end => a major version bump is probably necessary.

Impacted Spec

For which spec is this feature being requested?

  • policy

Describe alternatives you've considered

Another option was to add a relationship between policies (e. g. "this special policy extends the following one"). If a rule from a special policy is applicable, the rules of the extended policy would not be evaluated. However, this idea was discarded as it introduces a new level of complexity.

@mrsimpson
Copy link
Author

/cc @marie-x @avatarneil

@mrsimpson mrsimpson changed the title Limit rules for to a particular duration Feature: Limit rules for to a particular duration Apr 27, 2022
@schnuerle schnuerle added enhancement New feature or request Policy Specific to the Policy API labels May 5, 2022
@schnuerle schnuerle added this to the 2.0.0 milestone May 5, 2022
@jean-populus
Copy link
Collaborator

In CDS there's the concept of Policy priority which could be a way forward given #731

@schnuerle schnuerle modified the milestones: 2.0.0, Future Jan 2, 2023
@schnuerle
Copy link
Member

Moving to a future release so we can review a PR once created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Policy Specific to the Policy API
Projects
None yet
Development

No branches or pull requests

3 participants