Commit graph

20 commits

Author SHA1 Message Date
Kainaat Singh
ec68bd9316 Remove future module #1297
Signed-off-by: Kainaat Singh <kainaatsingh93@gmail.com>

remove unwanted lines
2021-04-11 11:37:45 +02:00
Joshua Lock
0c0aaa97eb Port to new securesystemslib w abstract filesystem
Switch to using the new abstract files and directories support in
securesystemslib by taking an object which implements
securesystemslib.storage.StorageBackendInterface in the Repository
constructor, passed in by tuf.repository_tool.create_new_repository() and
tuf.repository_tool.load_repository()

The Updater class in tuf.client.updater does not specify a storage backend
and instead allows the functions in securesystemslib to perform the
default action of instantiating a LocalFilesystemBackend, that is the
updater does not currently support abstract filesystem backends and always
defaults to using local storage.

Finally we drop support for tuf.settings.CONSISTENT_METHOD as it's not as
clear how different copying modes should work when the details of the
underlying storage are abstracted away.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-05-12 22:16:50 +01:00
Joshua Lock
1f0cb9cd52 Add new setting for file hashing algorithms
Using securesystemslib.settings.HASH_ALGORITHMS is undersirable, because
it binds tuf to an implementation detail of the underlying library.
In this specific instance of file hashing algorithms it's even more
undesirable because it's overloading the intended use of the setting
which is "algorithm(s) [...] used to generate key IDs".

Add a new setting tuf.settings.FILE_HASH_ALGORITHMS, with a default
value of ['sha256', 'sha512'] (that matches the current value of
securesystemslib.settings.HASH_ALGORITHMS), to be used for file
hashing operations in tuf.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-03-05 17:55:38 +00:00
Lukas Puehringer
3d342e648f Merge pull request #885 from trishankatdatadog:trishankatdatadog/correctly-rotate-root
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-10-07 11:54:59 +02:00
Lukas Puehringer
71866253ed Move repository_lib.get_taget_hash from sslib
The function used to last be implemented in securesystemslib
and repository_lib.get_taget_hash only served as wrapper.

secure-systems-lab/securesystemslib#165 drops the function as
TUF-specific.

The used constant `securesystemslib.util.HASH_FUNCTION`
is replaced with `tuf.settings.DEFAULT_HASH_ALGORITHM`, both of
which default to 'sha256'.

NOTE: repository_lib.get_taget_hash might be removed altogether in
the future (see corresponding code comment).

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-09-05 12:08:48 +02:00
Trishank K Kuppusamy
3bb4f73950
reduce the excessive # of rotation checks
Signed-off-by: Trishank K Kuppusamy <trishank.kuppusamy@datadoghq.com>
2019-07-02 10:49:50 -04:00
Trishank K Kuppusamy
704b90c4e4
address @lukpueh comments
Signed-off-by: Trishank K Kuppusamy <trishank.kuppusamy@datadoghq.com>
2019-07-01 13:14:07 -04:00
Sebastien Awwad
ec27630a48
minor: PR tweaks based on review: doc, casing, typos, updates
- two reversions to unnecessary changes
- some typo fixes
- capitalization of HTTP/S where reasonable
- commenting out code section with ''' rather than #

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-10-02 15:01:38 -04:00
Trishank K Kuppusamy
b9bc8602c2
Update TUF to handle HTTPS proxies
Signed-off-by: Trishank K Kuppusamy <trishank.kuppusamy@datadoghq.com>
2018-08-31 13:18:35 -04:00
Vladimir Diaz
14f795db57
Disable file logging, by default, in settings.py
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-06-14 11:46:09 -04:00
Vladimir Diaz
6322ed1530
Tweak settings.py for production environments
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-05-21 11:59:30 -04:00
Vladimir Diaz
9685a4db1f
Tweak settings (and add SLEEP_BEFORE_ROUND) to speed up updates
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-03-27 14:41:33 -04:00
Vladimir Diaz
8f65fa4154
Rename license files in modules
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-02-05 11:31:19 -05:00
Vladimir Diaz
3894bc4e31
Add copyright and license info to module files
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-11-30 13:23:38 -05:00
Vladimir Diaz
b5e7325be4 Edit comment/description for settings.HASH_FUNCTION
settings.HASH_FUNCTION is now only used to calculate path hash prefixes.
2017-06-14 15:18:11 -04:00
Vladimir Diaz
90fe62e37c Add setting to support instances of a default hashing algorithm 2017-04-24 16:38:04 -04:00
Vladimir Diaz
e37145b85f Add a 'repositories_directory' setting so that updater objects are able to track multiple repositories 2017-02-03 10:31:20 -05:00
Vladimir Diaz
d959f568bc Add missing settings to tuf/settings.py 2017-01-11 10:48:40 -05:00
Vladimir Diaz
c24d4d384a Fix whitespace in settings.py 2017-01-09 16:55:34 -05:00
Artiom Baloian
b793c81739 Added simple_settings, now it is a requirement of TuF.
Rename conf.py into the settings.py an changed import call.
2016-11-01 15:38:40 -04:00
Renamed from tuf/conf.py (Browse further)