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

Document "artifact rule" rationale #4

Open
lukpueh opened this issue Oct 9, 2017 · 7 comments
Open

Document "artifact rule" rationale #4

lukpueh opened this issue Oct 9, 2017 · 7 comments

Comments

@lukpueh
Copy link
Member

lukpueh commented Oct 9, 2017

The recent discussion about whether and why we decided to replace the implicit DISALLOW * with an implicit ALLOW * when verifying expected materials and products makes it clear that we need to document these decisions more thoroughly.

in-toto/in-toto#43 shows how the current design of MATCH rules (only) evolved.

@SantiagoTorres suggests to create a Wiki that summarizes such on- and offline discussions and provides additional information about the rationale behind certain design decision that would go beyond the scope of the specification.

@reza-curtmola
Copy link

I missed all the discussion for the rationale why we prefer an implicit rule ALLOW * instead of a DENY * at the end of the artifact rules. Santiago mentioned that this is preferred because of the feedback received, which is mostly to improve usability.

I don't have a strong preference for either one, but I wanted to make sure that Justin is also on board with this choice.

@JustinCappos
Copy link
Contributor

JustinCappos commented Oct 11, 2017 via email

@lukpueh
Copy link
Member Author

lukpueh commented Oct 11, 2017

I think the main argument was that having to explicitly authorize (ALLOW) every material and product seems cumbersome, given that we mostly care for linking (MATCH) products of one step to the materials of the next step.
And that for a more restrictive layout, a project owner can always use an explicit DISALLOW * rule.

lukpueh added a commit to in-toto/in-toto that referenced this issue Oct 18, 2017
Until now every recorded artifact had to be consumed by a rule.
That is, when verifying the batch of rules for a certain artifact
type (material or product) reported for a step or inspection, the
verification routine would keep a temporary queue of all
artifacts of that type for that step or inspection and remove
them from the queue each time an artifact was matched by a rule's
artifact pattern.

If any artifacts remained in the queue after verifying all rules
(for that artifact type of that step or inspection) a
RuleVerficationError was raised.

This behavior amounted to an implicit `DISALLOW *` at the end of
a given `expected_materials` or `expected_products` list.

With this change the implicit `DISALLOW *` is removed, i.e. replaced
with an implicit `ALLOW *`.

However a layout designer can still add an explicit `DISALLOW *`
at the end of a given rule list to fail if corresponding
artifacts are not matched by any prior rule's pattern.

The rationale for this change can be found in in-toto/specification#4.
@JustinCappos
Copy link
Contributor

I'd like to see some examples of this so we can better understand the implications.

If there is an explicit ALLOW *, doesn't this mean new items can effectively always be silently added?

@SantiagoTorres
Copy link
Member

Sorry I missed this comment. I'll upload some examples soon to the repository's wiki to help us document these design decisions.

An explicit ALLOW * does indeed allow a step to register any products in their materials and products. Much like a firewall, I think having an explicit DISALLOW for good practice is a better decision than the opposite.

@JustinCappos
Copy link
Contributor

JustinCappos commented Oct 27, 2017 via email

@lukpueh
Copy link
Member Author

lukpueh commented Apr 12, 2019

Below is a mostly exhaustive list of related historic and ongoing in-toto issues and PRs. It's worth combing through these, when rehashing the artifact rule rational.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants