question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Confirm terminating roles logic from spec

See original GitHub issue

In https://github.com/php-tuf/php-tuf we are making sure we have the logic correct around terminating delegations. As we have updated our implementation of the spec from v1.0.9(the release when we started) to the most recent releases we have notice there has been some changes to wording in this area of the spec.

To make sure we get the logic correct for terminating delegations I have created this simple example to make sure our assumptions are correct(actually we don’t all have same assumptions these are mine) TUF delegation assumptions

Constraints

term = terminating delegation non-term = non terminating delegation Priority: The roles in each level are ordered from left to right in the order they would appear under [delegations][roles] All roles have paths = [‘assets/*’] (just to provide matches for every role only focus on terminating logic now) Target being searched for = 'assets/always-match.txt’

Expected outcome

Expected role evaluation: Targets -> A > B > C > D

Am I correct?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
tedbowcommented, Jun 16, 2021

Thanks everyone for the confirmation. I working on fixing our implementation increasing our test coverage for different cases here https://github.com/php-tuf/php-tuf/pull/216

If anyone is interested we test our client implementation by creating test fixtures with a FixtureBuilder that uses the Python server implementation. For example here is 1 for that PR that creates the above test case https://github.com/php-tuf/php-tuf/blob/tedbow-fix_terminating_2/fixtures/TUFTestFixtureTerminatingDelegation/__init__.py (BTW @phenaproxima and myself are learning python to create these test fixtures so don’t expect great python code 😁)

We then make test case for a given test fixture and given target, whether it should be found and which metadata files the client should retreive/evaluate to determine this. Like this case for role “F” in the example not finding a target because of terminating delegation in “B” https://github.com/php-tuf/php-tuf/blob/tedbow-fix_terminating_2/tests/Client/UpdaterTest.php#L653

1reaction
mnm678commented, Jun 14, 2021

The spec states that

A terminating delegation for a package causes any further statements about a package that are not made by the delegated party or its descendants to be ignored.

Which by a literal reading does contradict TAP 3. I don’t think TAP 3 is supported by 1.0 of the specification, but this is something we should figure out before adding it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Termination analysis - The Mercury Language Reference Manual
The compiler includes a termination analyser which can be used to prove termination of predicates and functions. Details of the analysis is available...
Read more >
Work with Amazon EC2 Auto Scaling termination policies
Default termination policy and mixed instances groups​​ The same logic applies to Auto Scaling groups that use a mixed instances configuration with weights ......
Read more >
Termination - Learn TLA+
The most common temporal logic you'll want to check is Termination, and TLC provides a handy ... This will succeed if, for all...
Read more >
Revoke asset access when an individual is terminated.
The organization shall immediately cancel access authorization when a user no longer has a need to access the data for his/her duties.
Read more >
Roles Assigned Externally For Terminated Employees
Symptoms · 1. Login to fusion application · 2. Search a terminated user · 3. Verify user's employment status is terminated · 4....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found