Skip to content

Commit c177dfa

Browse files
authored
Document the format of public keys and signatures (#414)
The meta.security.integrityProtection.{publicKey,signature} fields were underspecified, both in the documentation and the schema. We now describe the expected format as well as state the formal requirements for the Base64 strings. The regular expression used for validating the strings is somewhat sloppy and will allow some non-Base64 strings, but getting a 100% correct expression isn't trivial and an expression that's too strict and rejects some rare corner case could cause real problems. There doesn't appear to be a canonical regexp for Base64 strings, and relying on StackOverflow posts with terribly complicated expressions doesn't feel right.
1 parent fe99891 commit c177dfa

File tree

73 files changed

+10566
-25
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+10566
-25
lines changed
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Copyright 2017-2025 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: https://json-schema.org/draft/2020-12/schema#
17+
_name: EiffelActivityCanceledEvent
18+
_version: 5.0.1
19+
_abbrev: ActC
20+
_description: The EiffelActivityCanceledEvent signals that a previously
21+
triggered activity execution has been canceled _before it has started_.
22+
This is typically used in queuing situations where a queued execution
23+
is dequeued. It is recommended that __CAUSE__ links be used to indicate
24+
the reason.
25+
type: object
26+
properties:
27+
meta:
28+
$ref: ../EiffelMetaProperty/4.0.1.yml
29+
data:
30+
type: object
31+
properties:
32+
reason:
33+
_description: Any human readable information as to the reason
34+
for dequeueing.
35+
type: string
36+
customData:
37+
type: array
38+
items:
39+
$ref: ../EiffelCustomDataProperty/2.0.0.yml
40+
additionalProperties: false
41+
links:
42+
type: array
43+
contains:
44+
type: object
45+
properties:
46+
type:
47+
enum:
48+
- ACTIVITY_EXECUTION
49+
items:
50+
$ref: ../EiffelEventLink/2.0.0.yml
51+
required:
52+
- meta
53+
- data
54+
- links
55+
additionalProperties: false
56+
_links:
57+
ACTIVITY_EXECUTION:
58+
description: Declares the activity execution that was canceled.
59+
In other words, [EiffelActivityTriggeredEvent](../eiffel-vocabulary/EiffelActivityTriggeredEvent.md)
60+
acts as a handle for the activity execution. This differs from
61+
__CONTEXT__. In __ACTIVITY_EXECUTION__ the source carries information
62+
pertaining to the target (i.e. the activity started, finished
63+
or was canceled). In __CONTEXT__, on the other hand, the source
64+
constitutes a subset of the target (e.g. this test case was executed
65+
as part of that activity or test suite).
66+
required: true
67+
multiple: false
68+
targets:
69+
any_type: false
70+
types:
71+
- EiffelActivityTriggeredEvent
72+
CAUSE:
73+
description: While for most events it is recommended that __CAUSE__
74+
SHOULD not be used in conjunction with __CONTEXT__, EiffelActivityCanceledEvent
75+
is a special case as it represents a deviation from previous
76+
intention. Therefore it is recommended that __CAUSE__ always
77+
be included where applicable.
78+
required: false
79+
multiple: true
80+
targets:
81+
any_type: true
82+
types: []
83+
CONTEXT:
84+
description: Identifies the activity or test suite of which this
85+
event constitutes a part.
86+
required: false
87+
multiple: false
88+
targets:
89+
any_type: false
90+
types:
91+
- EiffelActivityTriggeredEvent
92+
- EiffelTestSuiteStartedEvent
93+
FLOW_CONTEXT:
94+
description: 'Identifies the flow context of the event: which is
95+
the continuous integration and delivery flow in which this occurred
96+
– e.g. which product, project, track or version this is applicable
97+
to.'
98+
required: false
99+
multiple: true
100+
targets:
101+
any_type: false
102+
types:
103+
- EiffelFlowContextDefinedEvent
104+
_history:
105+
- version: 5.0.1
106+
changes: Detail the expected representation of public key and signature in meta.security (see [Issue 375](https://github.com/eiffel-community/eiffel/issues/375)).
107+
- version: 5.0.0
108+
changes: Update meta schema to Draft 2020-12 and add link validation.
109+
- version: 4.0.0
110+
changes: Fix bug in schema regarding additionalProperties (see [Issue 376](https://github.com/eiffel-community/eiffel/issues/376)).
111+
- version: 3.2.0
112+
introduced_in: edition-arica
113+
changes: Add schema URL to the meta object (see [Issue 280](https://github.com/eiffel-community/eiffel/issues/280)).
114+
- version: 3.1.0
115+
introduced_in: edition-lyon
116+
changes: Add links.domainId member (see [Issue 233](https://github.com/eiffel-community/eiffel/issues/233)).
117+
- version: 3.0.0
118+
introduced_in: edition-agen
119+
changes: Improved information integrity protection (see [Issue
120+
185](https://github.com/eiffel-community/eiffel/issues/185)).
121+
- version: 2.0.0
122+
introduced_in: edition-agen
123+
changes: Introduced purl identifiers instead of GAVs (see [Issue
124+
182](https://github.com/eiffel-community/eiffel/issues/182))
125+
- version: 1.1.0
126+
introduced_in: edition-toulouse
127+
changes: Multiple links of type FLOW_CONTEXT allowed.
128+
- version: 1.0.0
129+
introduced_in: edition-bordeaux
130+
changes: Initial version.
131+
_examples:
132+
- title: Simple example
133+
url: ../examples/events/EiffelActivityCanceledEvent/simple.json
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Copyright 2017-2025 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: https://json-schema.org/draft/2020-12/schema#
17+
_name: EiffelActivityFinishedEvent
18+
_version: 4.1.1
19+
_abbrev: ActF
20+
_description: The EiffelActivityFinishedEvent declares that a previously
21+
started activity (declared by [EiffelActivityTriggeredEvent](./EiffelActivityTriggeredEvent.md)
22+
followed by [EiffelActivityStartedEvent](./EiffelActivityStartedEvent.md))
23+
has finished.
24+
type: object
25+
properties:
26+
meta:
27+
$ref: ../EiffelMetaProperty/4.0.1.yml
28+
data:
29+
type: object
30+
properties:
31+
outcome:
32+
_description: The outcome of the activity.
33+
type: object
34+
properties:
35+
conclusion:
36+
_description: |-
37+
A terse standardized conclusion of the activity, designed to be machine readable.
38+
SUCCESSFUL signifies that the activity was concluded and the outcome matched expectations.
39+
UNSUCCESSFUL signifies that the activity was concluded, but the outcome did not match expectations. To exemplify, a compilation job was successfully invoked, but compilation failed.
40+
FAILED signifies that the activity could not be successfully executed. To exemplify, a compilation could not be invoked, e.g. due to misconfiguration or environment issues.
41+
ABORTED signifies that the activity was aborted before it could be concluded.
42+
TIMED_OUT signifies that the activity did not conclude within the allowed time frame.
43+
INCONCLUSIVE signifies that the outcome of the activity could not be determined.
44+
type: string
45+
enum:
46+
- SUCCESSFUL
47+
- UNSUCCESSFUL
48+
- FAILED
49+
- ABORTED
50+
- TIMED_OUT
51+
- INCONCLUSIVE
52+
description:
53+
_description: A verbose description of the activity outcome,
54+
designed to provide human readers with further information.
55+
type: string
56+
required:
57+
- conclusion
58+
persistentLogs:
59+
$ref: ../EiffelPersistentLogsProperty/1.0.0.yml
60+
customData:
61+
type: array
62+
items:
63+
$ref: ../EiffelCustomDataProperty/2.0.0.yml
64+
additionalProperties: false
65+
required:
66+
- outcome
67+
links:
68+
type: array
69+
contains:
70+
type: object
71+
properties:
72+
type:
73+
enum:
74+
- ACTIVITY_EXECUTION
75+
items:
76+
$ref: ../EiffelEventLink/2.0.0.yml
77+
required:
78+
- meta
79+
- data
80+
- links
81+
additionalProperties: false
82+
_links:
83+
ACTIVITY_EXECUTION:
84+
description: Declares the activity execution that was finished.
85+
In other words, [EiffelActivityTriggeredEvent](../eiffel-vocabulary/EiffelActivityTriggeredEvent.md)
86+
acts as a handle for the activity execution. This differs from
87+
__CONTEXT__. In __ACTIVITY_EXECUTION__ the source carries information
88+
pertaining to the target (i.e. the activity started, finished
89+
or was canceled). In __CONTEXT__, on the other hand, the source
90+
constitutes a subset of the target (e.g. this test case was executed
91+
as part of that activity or test suite).
92+
required: true
93+
multiple: false
94+
targets:
95+
any_type: false
96+
types:
97+
- EiffelActivityTriggeredEvent
98+
CAUSE:
99+
description: 'Identifies a cause of the event occurring. SHOULD
100+
not be used in conjunction with __CONTEXT__: individual events
101+
providing __CAUSE__ within a larger context gives rise to ambiguity.
102+
It is instead recommended to let the root event of the context
103+
declare __CAUSE__.'
104+
required: false
105+
multiple: true
106+
targets:
107+
any_type: true
108+
types: []
109+
CONTEXT:
110+
description: Identifies the activity or test suite of which this
111+
event constitutes a part.
112+
required: false
113+
multiple: false
114+
targets:
115+
any_type: false
116+
types:
117+
- EiffelActivityTriggeredEvent
118+
- EiffelTestSuiteStartedEvent
119+
FLOW_CONTEXT:
120+
description: 'Identifies the flow context of the event: which is
121+
the continuous integration and delivery flow in which this occurred
122+
– e.g. which product, project, track or version this is applicable
123+
to.'
124+
required: false
125+
multiple: true
126+
targets:
127+
any_type: false
128+
types:
129+
- EiffelFlowContextDefinedEvent
130+
_history:
131+
- version: 4.1.1
132+
changes: Detail the expected representation of public key and signature in meta.security (see [Issue 375](https://github.com/eiffel-community/eiffel/issues/375)).
133+
- version: 4.1.0
134+
changes: Add `data.persistentLogs.integrityProtection.{alg, digest}` (see [Issue 358](https://github.com/eiffel-community/eiffel/issues/358)).
135+
- version: 4.0.0
136+
changes: Update meta schema to Draft 2020-12 and add link validation.
137+
- version: 3.3.0
138+
introduced_in: edition-arica
139+
changes: Add schema URL to the meta object (see [Issue 280](https://github.com/eiffel-community/eiffel/issues/280)).
140+
- version: 3.2.0
141+
introduced_in: edition-lyon
142+
changes: Add links.domainId member (see [Issue 233](https://github.com/eiffel-community/eiffel/issues/233)).
143+
- version: 3.1.0
144+
introduced_in: edition-lyon
145+
changes: Add `data.persistentLogs.{mediaType,tags}`.
146+
- version: 3.0.0
147+
introduced_in: edition-agen
148+
changes: Improved information integrity protection (see [Issue
149+
185](https://github.com/eiffel-community/eiffel/issues/185)).
150+
- version: 2.0.0
151+
introduced_in: edition-agen
152+
changes: Introduced purl identifiers instead of GAVs (see [Issue
153+
182](https://github.com/eiffel-community/eiffel/issues/182))
154+
- version: 1.1.0
155+
introduced_in: edition-toulouse
156+
changes: Multiple links of type FLOW_CONTEXT allowed.
157+
- version: 1.0.0
158+
introduced_in: edition-bordeaux
159+
changes: Initial version.
160+
_examples:
161+
- title: Simple example
162+
url: ../examples/events/EiffelActivityFinishedEvent/simple.json

0 commit comments

Comments
 (0)