Skip to content

Commit 1b501f9

Browse files
mnm678lukpueh
andauthored
TAP 13: Describe interaction with TAP 4 (#149)
* typos Signed-off-by: Marina Moore <[email protected]> * [TAP 13] Add interaction with TAP 4 Signed-off-by: Marina Moore <[email protected]> * [TAP 13] Add threshold Elsewhere in the TAP, we discuss using a larger threshold for certain security properties, but the TAP did not include a way to specify these thresholds Signed-off-by: Marina Moore <[email protected]> * [TAP 13] Allow each TAP 4 repository to define a target mapping Signed-off-by: Marina Moore <[email protected]> * [TAP 13] Clarifications from code review Signed-off-by: Marina Moore <[email protected]> * Update tap13.md Co-authored-by: Lukas Pühringer <[email protected]> Signed-off-by: Marina Moore <[email protected]> * [TAP 13] targets mapping is a list of objects Signed-off-by: Marina Moore <[email protected]> * [TAP 13] use 'targets' for metadata and 'target' for files Signed-off-by: Marina Moore <[email protected]> Signed-off-by: Marina Moore <[email protected]> Signed-off-by: Marina Moore <[email protected]> Co-authored-by: Lukas Pühringer <[email protected]>
1 parent 87dcb9e commit 1b501f9

File tree

1 file changed

+55
-15
lines changed

1 file changed

+55
-15
lines changed

tap13.md

+55-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
* TAP: 13
2-
* Title: User Selection of the Top-Level Target Files Through Mapping Metadata
2+
* Title: User Selection of the Top-Level Targets Files Through Mapping Metadata
33
* Version: 1
44
* Last-Modified: 02-Nov-2021
55
* Author: Justin Cappos, Joshua Lock, Marina Moore, Lukas Pühringer
@@ -37,17 +37,17 @@ For these repositories, the owner of a delegated targets role needs a mechanism
3737
to ensure that their users can define and pin keys.
3838

3939
To allow for safer use of these untrusted repositories, we propose adding
40-
namespaces to TUF repositories which enable explicit trust decisions. In This
40+
namespaces to TUF repositories which enable explicit trust decisions. In this
4141
mode, if Alice and Bob both use repository X and ask for package foo, they may
4242
get different results based on their trusted namespaces.
43-
In summary; this proposal enables clients to restrict the targets they consume
43+
In summary; this proposal enables clients to restrict the targets roles they consume
4444
to filtered views of the repository.
4545

4646
These different views could be defined by either different users on the
4747
repository, made available by the repository administrator, or be created by
4848
some other third party. Some likely uses include:
4949
* **Limiting packages on a repository to those that have been signed by their
50-
developer.** For example, in the proposed
50+
developer.** For example, in the proposed
5151
[PyPI Maximum Security Model](https://www.python.org/dev/peps/pep-0480/),
5252
packages that are only signed by the repository are listed under the 'unclaimed'
5353
targets role, while packages that are signed by developers are delegated
@@ -70,7 +70,7 @@ specific packages and Alice wishes to install only those packages. Every other
7070
user clearly should not be subject to those constraints.
7171

7272
Second, Alice may be concerned that a full repository compromise may include
73-
the root role. Since the root role in TUF indicates the top-level target's
73+
the root role. Since the root role in TUF indicates the top-level targets'
7474
role key, this compromise can enable the attacker full control of Alice's
7575
namespace. Alice may want to require that the security team at her company
7676
still be used to decide which packages to trust.
@@ -111,21 +111,32 @@ match with Alice's in this case.
111111

112112
# Specification
113113

114-
In order to support this situation, we propose a change to the mapping
114+
In order to support this situation, we propose a mapping
115115
metadata to enable the name and key(s) for a targets metadata file to be specified.
116116
This targets metadata file will be uploaded to the repository and will be used as though
117-
it is the top-level targets metadata file by the client instead of the top-level targets
117+
it is the top-level targets metadata file by the client instead of the top-level targets
118118
metadata file listed in the repository's root metadata. As is true in all TUF repositories,
119119
all targets metadata files are listed in the snapshot file and benefit from the usual
120120
rollback and similar protections provided.
121121

122122
Note that both the name and the key MUST be specified. If the name
123123
were permitted to be specified without the key, then the repository
124124
would be trusted to serve the correct file, without any offline key attesting
125-
to which keys indicate the targets role.
125+
to which keys indicate the targets role. The resulting metadata will look like:
126+
127+
```
128+
{
129+
"targets_rolename": ROLENAME,
130+
"threshold": THRESHOLD,
131+
"keys":{
132+
KEYID : KEY,
133+
...
134+
}
135+
}
136+
```
126137

127138
As such, we add to the [Mechanisms that Assigns Targets to Repositories](https://github.com/theupdateframework/taps/blob/master/tap4.md#mechanism-that-assigns-targets-to-repositories)
128-
support for a reference to the targets file in an identical way to the
139+
support for a reference to the targets metadata file in an identical way to the
129140
root file's reference in the [TUF specification](https://github.com/theupdateframework/specification/blob/master/tuf-spec.md#4-document-formats).
130141
However, additionally, the file name must be specified as this is no longer
131142
targets.json.
@@ -138,26 +149,55 @@ files. All targets metadata files (top-level and otherwise) are also stored in
138149
same METAPATH location listed in snapshot.json.
139150

140151
The changes in the client application workflow are fairly minor from this
141-
TAP. Steps 4.0 and 4.4.0 should refer to the specified target's metadata file instead
152+
TAP. Steps 4.0 and 4.4.0 should refer to the specified targets' metadata file instead
142153
of the top-level targets metadata file. Additionally, instead of verifying the targets metadata
143154
file using the key in the root metadata in step 4.0, verification must use the
144155
keys listed in the mapping metadata.
145156

146157
There likely also needs to be a clarity pass throughout to make this potential
147158
use mode clearer in the specification.
148159

149-
From an operational standpoint, a lost targets key for a delegated target could have been
160+
From an operational standpoint, a lost targets key for a delegated targets role could have been
150161
remedied before by the repository but this no longer works in every case. For example,
151-
previously if the repository delegated to a target from the top-level targets role, that
162+
previously if the repository delegated to a targets role from the top-level targets role, that
152163
file could be updated by the top-level targets role if Alice’s key changed or was lost.
153164
However, as the repository’s root role is no longer trusted to provide top-level targets keys
154165
and different clients may have different top-level targets keys, any clients using this
155166
TAP must take more care. Thus, one should take into account the operational difficultly to touch
156-
clients in the case of key loss or compromise for the top-level targets metadata file. If it is
157-
operationally difficult to touch the clients, then the client may perhaps use a threshold of
158-
offline keys before delegating to a developer’s key. [TAP 8](tap8.md) also provides support for
167+
clients in the case of key loss or compromise for the top-level targets metadata file. If it is
168+
operationally difficult to touch the clients, then the client may perhaps use a threshold of
169+
offline keys before delegating to a developer’s key. [TAP 8](tap8.md) also provides support for
159170
cases where the key needs to be rotated or changed and the key is still accessible to the developer.
160171

172+
## Interaction with TAP 4
173+
174+
If a client is using TAP 4 to provide mapping metadata to multiple repositories,
175+
they MAY provide a TAP 13 targets mapping for each repository or group of repositories.
176+
An optional `targets_mappings` field will be added to TAP 4 to provide this mapping
177+
when TAP 13 is used. The mappings will be resolved in order, so the first mapping
178+
will have higher priority than the second, and so on. This field will be resolved
179+
after the TAP 4 `mapping` field and will contain:
180+
181+
```
182+
"targets_mappings": [
183+
{
184+
"repositories": [REPOSITORY_NAME, ...],
185+
"targets_rolename": ROLENAME,
186+
"threshold": THRESHOLD,
187+
"keys":{
188+
KEYID : KEY,
189+
...
190+
}
191+
},
192+
...
193+
]
194+
```
195+
196+
Where `REPOSITORY_NAME` is the name of the target repository defined in TAP 4,
197+
and the other fields are as described above.
198+
199+
If a client is not using TAP 4, the targets mapping may instead be in a separate
200+
metadata file as described above.
161201

162202
# Security Analysis
163203

0 commit comments

Comments
 (0)