-
Notifications
You must be signed in to change notification settings - Fork 271
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
WIP: Remove the need of manually marking roles as dirty #1038
Commits on May 27, 2020
-
Mark correctly roles as dirty in repository_tool.py
Add mark_role_as_dirty parameter to (un)load_signing_key() which is False by default since the functions have mainly the goal to load metadata from the filesystem. Add mark_role_as_dirty parameter to remove_signature() to match its corresponding add_signature(). Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
Configuration menu - View commit details
-
Copy full SHA for 2f83b6b - Browse repository at this point
Copy the full SHA 2f83b6bView commit details -
Add mark_role_as_dirty parameter to add_role()
Add a boolean parameter to give the flexibility to repository tools to mark newly added roles as dirty depending on being created or loaded from disk. Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
Configuration menu - View commit details
-
Copy full SHA for 6411de8 - Browse repository at this point
Copy the full SHA 6411de8View commit details -
Update tests calling add_role()
Update accordingly the tests for the new parameter of add_role(). Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
Configuration menu - View commit details
-
Copy full SHA for b9b95f1 - Browse repository at this point
Copy the full SHA b9b95f1View commit details -
Remove unnecessary globals in roledb.py
Remove unnecessary global declarations of variables which are not assigned a value inside the functions (or not referenced at all). Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
Configuration menu - View commit details
-
Copy full SHA for ac9ab6a - Browse repository at this point
Copy the full SHA ac9ab6aView commit details -
Add mark_role_as_dirty parameter to Targets class
Add a boolean parameter to the Targets class constructor so that when a new delegation object is created, the new rolename is correctly marked as dirty in roledb . By default Targets objects are added to roledb with empty roleinfo and are marked as dirty later on "update" but this is not the case for delegations. Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
Configuration menu - View commit details
-
Copy full SHA for 4d86eed - Browse repository at this point
Copy the full SHA 4d86eedView commit details -
Propagate dirty roles in roledb
Recursively mark as dirty all roles affected by the roledb update of a given role e.g.: 'targets' -> 'snapshot' -> 'timestamp' and in case of a key update: 'targets' -> 'root' Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
Configuration menu - View commit details
-
Copy full SHA for 93968f2 - Browse repository at this point
Copy the full SHA 93968f2View commit details -
Add 'delegating_role' to role metadata
Add a new field in internal role metadata for storing the delegating role. This is needed since all updates on roledb are performed on the delegated role which has no knowledge about its 'delegator'. When a delegated role is marked as dirty the 'delegating_role' information is used to trigger an update chain. Update the load_repository() function to load the delegations metadata starting from 'targets' in order to get the 'delegating_role'. Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
Configuration menu - View commit details
-
Copy full SHA for 3fb09c2 - Browse repository at this point
Copy the full SHA 3fb09c2View commit details -
Update _log_status_of_top_level_roles
Update _log_status_of_top_level_roles() function to accommodate for the inter-dependencies triggered when marking a role dirty. Do some basic clean up to avoid code repetition. Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
Configuration menu - View commit details
-
Copy full SHA for 0410847 - Browse repository at this point
Copy the full SHA 0410847View commit details -
Add TOP_LEVEL_ROLES as a global variable
Add TOP_LEVEL_ROLES as a global variable in roledb. Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
Configuration menu - View commit details
-
Copy full SHA for 7100dc3 - Browse repository at this point
Copy the full SHA 7100dc3View commit details -
Update tests with the new logic for marking roles dirty Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
Configuration menu - View commit details
-
Copy full SHA for 1a6fb34 - Browse repository at this point
Copy the full SHA 1a6fb34View commit details