Skip to content

Commit 5064038

Browse files
committed
ArtC: Add integrityProtection member
1 parent 758cbf9 commit 5064038

File tree

4 files changed

+564
-1
lines changed

4 files changed

+564
-1
lines changed
Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
# Copyright 2017-2022 Ericsson AB and others.
2+
# For a full list of individual contributors, please see the commit history.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
---
16+
$schema: http://json-schema.org/draft-04/schema#
17+
_abbrev: ArtC
18+
_description: The EiffelArtifactCreatedEvent declares that a software
19+
artifact has been created, what its coordinates are, what it contains
20+
and how it was created.
21+
type: object
22+
properties:
23+
meta:
24+
$ref: ../EiffelMetaProperty/3.1.0.yml
25+
data:
26+
type: object
27+
properties:
28+
identity:
29+
_description: The identity of the created artifact, in [purl
30+
format](https://github.com/package-url/purl-spec).
31+
_format: '[purl specification](https://github.com/package-url/purl-spec)'
32+
type: string
33+
pattern: '^pkg:'
34+
fileInformation:
35+
_description: A list of the artifact file contents. This information
36+
is optional and, when included, MAY include a complete or
37+
incomplete list of contents. In other words, it may be used
38+
to highlight only particular files of interest, such as launcher
39+
binaries or other entry-points.
40+
type: array
41+
items:
42+
type: object
43+
properties:
44+
name:
45+
_description: The name (including relative path from
46+
the root of the artifact) on syntax appropriate for
47+
the artifact packaging type.
48+
type: string
49+
tags:
50+
_description: Any tags associated with the file, to support
51+
navigation and identification of items of interest.
52+
type: array
53+
items:
54+
type: string
55+
integrityProtection:
56+
_description: An optional object containing a digest of
57+
the file's contents, i.e. a checksum, computed using
58+
the specified algorithm.
59+
type: object
60+
properties:
61+
alg:
62+
_description: The cryptographic algorithm used to compute
63+
the digest of the file's contents.
64+
_format: One of the hash algorithms listed in section 1 of
65+
[NIST FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf),
66+
excluding "SHA-1".
67+
type: string
68+
enum:
69+
- SHA-224
70+
- SHA-256
71+
- SHA-384
72+
- SHA-512
73+
- SHA-512/224
74+
- SHA-512/256
75+
digest:
76+
_description: The digest of the file contents.
77+
_format: A lowercase string of hexadecimal digits.
78+
type: string
79+
pattern: ^[0-9a-f]+$
80+
required:
81+
- alg
82+
- digest
83+
additionalProperties: false
84+
required:
85+
- name
86+
additionalProperties: false
87+
buildCommand:
88+
_description: The command used to build the artifact within
89+
the identified environment. Used for reproducability purposes.
90+
type: string
91+
requiresImplementation:
92+
_description: |-
93+
Defines whether this artifact requires an implementing artifact. This is typically used for interfaces requiring some backend implementation, although the interface does not presume to define _which_ implementation. Implicitly interpreted as "ANY" if undefined.
94+
NONE signifies that there SHALL no implementations of this artifact. In other words, a composition containing another artifact identifying it in __data.implements__ would be illegal.
95+
ANY signifies that there may or may not be implementations of this artifact.
96+
EXACTLY_ONE signifies that a legal composition must contain one and only one implementation of this artifact.
97+
AT_LEAST_ONE signifies that a legal composition must contain one or more implementations of this artifact.
98+
type: string
99+
enum:
100+
- NONE
101+
- ANY
102+
- EXACTLY_ONE
103+
- AT_LEAST_ONE
104+
dependsOn:
105+
_description: An array of [purl identified](https://github.com/package-url/purl-spec)
106+
entities this artifact depends on. While not included in
107+
the purl specification itself, the Eiffel protocol allows
108+
version range notation according to [Maven syntax](https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN402)
109+
to be used for the version component of the package identity.
110+
Note that the purl specification always requires the version
111+
component to be percent-encoded.
112+
_format: '[purl specification](https://github.com/package-url/purl-spec)'
113+
type: array
114+
items:
115+
type: string
116+
pattern: '^pkg:'
117+
implements:
118+
_description: An array of [purl identified](https://github.com/package-url/purl-spec)
119+
entities this artifact implements. The typical use case of
120+
this is to identify interfaces implemented by this artifact.
121+
While not included in the purl specification itself, the
122+
Eiffel protocol allows version range notation according to
123+
[Maven syntax](https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN402)
124+
to be used for the version component of the package identity.
125+
Note that the purl specification always requires the version
126+
component to be percent-encoded.
127+
_format: '[purl specification](https://github.com/package-url/purl-spec)'
128+
type: array
129+
items:
130+
type: string
131+
pattern: '^pkg:'
132+
name:
133+
_description: Any (colloquial) name of the artifact. Unlike
134+
__data.identity__, this is not intended as an unambiguous
135+
identifier of the artifact, but as a descriptive and human
136+
readable name.
137+
type: string
138+
customData:
139+
type: array
140+
items:
141+
$ref: ../EiffelCustomDataProperty/1.0.0.yml
142+
required:
143+
- identity
144+
additionalProperties: false
145+
links:
146+
type: array
147+
items:
148+
$ref: ../EiffelEventLink/1.1.1.yml
149+
required:
150+
- meta
151+
- data
152+
- links
153+
additionalProperties: false
154+
_links:
155+
CAUSE:
156+
description: 'Identifies a cause of the event occurring. SHOULD
157+
not be used in conjunction with __CONTEXT__: individual events
158+
providing __CAUSE__ within a larger context gives rise to ambiguity.
159+
It is instead recommended to let the root event of the context
160+
declare __CAUSE__.'
161+
required: false
162+
multiple: true
163+
targets:
164+
any_type: true
165+
types: []
166+
COMPOSITION:
167+
description: Identifies the composition from which this artifact
168+
was built.
169+
required: false
170+
multiple: false
171+
targets:
172+
any_type: false
173+
types:
174+
- EiffelCompositionDefinedEvent
175+
CONTEXT:
176+
description: Identifies the activity or test suite of which this
177+
event constitutes a part.
178+
required: false
179+
multiple: false
180+
targets:
181+
any_type: false
182+
types:
183+
- EiffelActivityTriggeredEvent
184+
- EiffelTestSuiteStartedEvent
185+
ENVIRONMENT:
186+
description: Identifies the environment in which this artifact
187+
was built.
188+
required: false
189+
multiple: false
190+
targets:
191+
any_type: false
192+
types:
193+
- EiffelEnvironmentDefinedEvent
194+
FLOW_CONTEXT:
195+
description: 'Identifies the flow context of the event: which is
196+
the continuous integration and delivery flow in which this occurred
197+
– e.g. which product, project, track or version this is applicable
198+
to.'
199+
required: false
200+
multiple: true
201+
targets:
202+
any_type: false
203+
types:
204+
- EiffelFlowContextDefinedEvent
205+
PREVIOUS_VERSION:
206+
description: Identifies a latest previous version (there may be
207+
more than one in case of merges) of the artifact the event represents.
208+
required: false
209+
multiple: true
210+
targets:
211+
any_type: false
212+
types:
213+
- EiffelArtifactCreatedEvent
214+
_history:
215+
- version: 3.3.0
216+
introduced_in: No edition set
217+
changes: Added data.fileInformation.integrityProtection member (see [Issue 290](https://github.com/eiffel-community/eiffel/issues/290)).
218+
- version: 3.2.0
219+
introduced_in: 'No edition set'
220+
changes: Add schema URL to the meta object (see [Issue 313](https://github.com/eiffel-community/eiffel/issues/313)).
221+
- version: 3.1.0
222+
introduced_in: '[edition-lyon](../../../tree/edition-lyon)'
223+
changes: Add links.domainId member (see [Issue 233](https://github.com/eiffel-community/eiffel/issues/233)).
224+
- version: 3.0.0
225+
introduced_in: '[edition-agen](../../../tree/edition-agen)'
226+
changes: Improved information integrity protection (see [Issue
227+
185](https://github.com/eiffel-community/eiffel/issues/185)).
228+
- version: 2.0.0
229+
introduced_in: '[dc5ec6f](../../../blob/dc5ec6fb87e293eeffe88fdafe698eec0f5a2c89/eiffel-vocabulary/EiffelArtifactCreatedEvent.md)'
230+
changes: Introduced purl identifiers instead of GAVs (see [Issue
231+
182](https://github.com/eiffel-community/eiffel/issues/182))
232+
- version: 1.1.0
233+
introduced_in: '[edition-toulouse](../../../tree/edition-toulouse)'
234+
changes: Multiple links of type FLOW_CONTEXT allowed.
235+
- version: 1.0.0
236+
introduced_in: '[edition-bordeaux](../../../tree/edition-bordeaux)'
237+
changes: Initial version.
238+
_examples:
239+
- title: Simple example
240+
url: ../examples/events/EiffelArtifactCreatedEvent/simple.json
241+
- title: Interface example
242+
url: ../examples/events/EiffelArtifactCreatedEvent/interface.json
243+
- title: Backend example
244+
url: ../examples/events/EiffelArtifactCreatedEvent/backend.json
245+
- title: Dependent example
246+
url: ../examples/events/EiffelArtifactCreatedEvent/dependent.json

eiffel-vocabulary/EiffelArtifactCreatedEvent.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!---
2-
This file was generated from ../definitions/EiffelArtifactCreatedEvent/3.2.0.yml.
2+
This file was generated from ../definitions/EiffelArtifactCreatedEvent/3.3.0.yml.
33
See that file for a copyright notice.
44
--->
55

@@ -29,6 +29,24 @@ __Type:__ String[]
2929
__Required:__ No
3030
__Description:__ Any tags associated with the file, to support navigation and identification of items of interest.
3131

32+
#### data.fileInformation.integrityProtection
33+
__Type:__ Object
34+
__Required:__ No
35+
__Description:__ An optional object containing a digest of the file's contents, i.e. a checksum, computed using the specified algorithm.
36+
37+
##### data.fileInformation.integrityProtection.alg
38+
__Type:__ String
39+
__Format:__ One of the hash algorithms listed in section 1 of [NIST FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf), excluding "SHA-1".
40+
__Required:__ Yes
41+
__Legal values:__ SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256
42+
__Description:__ The cryptographic algorithm used to compute the digest of the file's contents.
43+
44+
##### data.fileInformation.integrityProtection.digest
45+
__Type:__ String
46+
__Format:__ A lowercase string of hexadecimal digits.
47+
__Required:__ Yes
48+
__Description:__ The digest of the file contents.
49+
3250
### data.buildCommand
3351
__Type:__ String
3452
__Required:__ No
@@ -235,6 +253,7 @@ __Description:__ A URI pointing at a location from where the schema used when cr
235253

236254
| Version | Introduced in | Changes |
237255
| ------- | ------------- | ------- |
256+
| 3.3.0 | No edition set | Added data.fileInformation.integrityProtection member (see [Issue 290](https://github.com/eiffel-community/eiffel/issues/290)). |
238257
| 3.2.0 | No edition set | Add schema URL to the meta object (see [Issue 313](https://github.com/eiffel-community/eiffel/issues/313)). |
239258
| 3.1.0 | [edition-lyon](../../../tree/edition-lyon) | Add links.domainId member (see [Issue 233](https://github.com/eiffel-community/eiffel/issues/233)). |
240259
| 3.0.0 | [edition-agen](../../../tree/edition-agen) | Improved information integrity protection (see [Issue 185](https://github.com/eiffel-community/eiffel/issues/185)). |
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"meta": {
3+
"type": "EiffelArtifactCreatedEvent",
4+
"version": "3.2.0",
5+
"time": 1234567890,
6+
"id": "aaaaaaaa-bbbb-5ccc-8ddd-eeeeeeeeeee0"
7+
},
8+
"data": {
9+
"identity": "pkg:generic/empty-file",
10+
"fileInformation": [
11+
{
12+
"name": "empty-file.txt",
13+
"integrityProtection": {
14+
"alg": "SHA-256",
15+
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
16+
}
17+
}
18+
],
19+
"name": "This artifact is just an empty file"
20+
},
21+
"links": [
22+
{
23+
"type": "CAUSE",
24+
"target": "aaaaaaaa-bbbb-5ccc-8ddd-eeeeeeeeeee1"
25+
},
26+
{
27+
"type": "COMPOSITION",
28+
"target": "aaaaaaaa-bbbb-5ccc-8ddd-eeeeeeeeeee1"
29+
}
30+
]
31+
}

0 commit comments

Comments
 (0)