You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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]>
@@ -37,17 +37,17 @@ For these repositories, the owner of a delegated targets role needs a mechanism
37
37
to ensure that their users can define and pin keys.
38
38
39
39
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
41
41
mode, if Alice and Bob both use repository X and ask for package foo, they may
42
42
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
44
44
to filtered views of the repository.
45
45
46
46
These different views could be defined by either different users on the
47
47
repository, made available by the repository administrator, or be created by
48
48
some other third party. Some likely uses include:
49
49
***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
51
51
[PyPI Maximum Security Model](https://www.python.org/dev/peps/pep-0480/),
52
52
packages that are only signed by the repository are listed under the 'unclaimed'
53
53
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
70
70
user clearly should not be subject to those constraints.
71
71
72
72
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'
74
74
role key, this compromise can enable the attacker full control of Alice's
75
75
namespace. Alice may want to require that the security team at her company
76
76
still be used to decide which packages to trust.
@@ -111,21 +111,32 @@ match with Alice's in this case.
111
111
112
112
# Specification
113
113
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
115
115
metadata to enable the name and key(s) for a targets metadata file to be specified.
116
116
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
118
118
metadata file listed in the repository's root metadata. As is true in all TUF repositories,
119
119
all targets metadata files are listed in the snapshot file and benefit from the usual
120
120
rollback and similar protections provided.
121
121
122
122
Note that both the name and the key MUST be specified. If the name
123
123
were permitted to be specified without the key, then the repository
124
124
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
+
```
126
137
127
138
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
129
140
root file's reference in the [TUF specification](https://github.com/theupdateframework/specification/blob/master/tuf-spec.md#4-document-formats).
130
141
However, additionally, the file name must be specified as this is no longer
131
142
targets.json.
@@ -138,26 +149,55 @@ files. All targets metadata files (top-level and otherwise) are also stored in
138
149
same METAPATH location listed in snapshot.json.
139
150
140
151
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
142
153
of the top-level targets metadata file. Additionally, instead of verifying the targets metadata
143
154
file using the key in the root metadata in step 4.0, verification must use the
144
155
keys listed in the mapping metadata.
145
156
146
157
There likely also needs to be a clarity pass throughout to make this potential
147
158
use mode clearer in the specification.
148
159
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
150
161
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
152
163
file could be updated by the top-level targets role if Alice’s key changed or was lost.
153
164
However, as the repository’s root role is no longer trusted to provide top-level targets keys
154
165
and different clients may have different top-level targets keys, any clients using this
155
166
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
159
170
cases where the key needs to be rotated or changed and the key is still accessible to the developer.
160
171
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
0 commit comments