From defd12e2e96762d90cd60dd42820219937e7360f Mon Sep 17 00:00:00 2001 From: Sebastien Awwad Date: Mon, 20 Aug 2018 18:00:40 -0400 Subject: [PATCH] Remove add_restricted_paths from TUTORIAL.md and test_tutorial.py add_restricted_paths was renamed to add_path; however, this function represents a problematic element of TUF that assumes that roles are have a single delegator and delegatee, and that one can refer to a role's expected keys without being concerned about any delegation metadata.... So this is being removed from the tutorial. In time, add_paths will either be removed or changed (to expect a delegator role and a delegatee role, not just a delegatee role). This comment does not do justice to the issue: please see TUF GitHub Issue #660: https://github.com/theupdateframework/tuf/issues/660 Signed-off-by: Sebastien Awwad --- docs/TUTORIAL.md | 2 -- tests/test_tutorial.py | 3 --- 2 files changed, 5 deletions(-) diff --git a/docs/TUTORIAL.md b/docs/TUTORIAL.md index 19b4aa8502..f9ae8bf941 100644 --- a/docs/TUTORIAL.md +++ b/docs/TUTORIAL.md @@ -608,8 +608,6 @@ to some role. >>> for delegation in repository.targets('unclaimed').delegations: ... delegation.load_signing_key(private_unclaimed_key) -# Delegated roles can be restricted to particular paths with add_restricted_paths(). ->>> repository.targets('unclaimed').add_restricted_paths('repository/targets/myproject/*', 'django') ``` ## How to Perform an Update ## diff --git a/tests/test_tutorial.py b/tests/test_tutorial.py index 6e1c78da41..e0b3d0fdbb 100644 --- a/tests/test_tutorial.py +++ b/tests/test_tutorial.py @@ -300,9 +300,6 @@ def test_tutorial(self): for delegation in repository.targets('unclaimed').delegations: delegation.load_signing_key(private_unclaimed_key) - repository.targets('unclaimed').add_restricted_paths( - 'repository/targets/myproject/*', 'django') - # ----- Tutorial Section: How to Perform an Update