Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rolie examples #315

Merged
merged 15 commits into from Jul 28, 2021
10 changes: 10 additions & 0 deletions csaf_2.0/examples/ROLIE/example-01-category.json
@@ -0,0 +1,10 @@
{
"categories": [
{
"term": "Example Company Product A"
},
{
"term": "Example Company Product B"
}
]
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this also need to specify a scheme to which these categories relate. Though, I'm not sure what the value of that field should be, so:

{
   "categories": {
      "category": [
         {
            "term": "Example Company Product A"
         },
         {
            "term": "Example Company Product B"
         }
      ],
      "scheme": "<reference to itself?>"
   }
}

Perhaps it can just be an arbitrary URN that gets then used in the individual documents. I think only terms specific to the urn:ietf:params:rolie:category:information-type category don't need to be explicitly noted in the category document.

For now, I'd recommend using a self-reference to the category document itself as the scheme.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this also need to specify a scheme to which these categories relate.

I agree that there SHOULD be a category scheme. However, while reading RFC 5023 Section 7 I did not see that it is mandatory

    appInlineCategories =
       element app:categories {
           attribute fixed { "yes" | "no" }?,
           attribute scheme { atomURI }?,
           (atomCategory*,
           undefinedContent)
       }

Therefore, I skipped it. But I might have overlooked something. Can you please double-check that?

If it is necessary, I second your approach to app the reference to itself in the document.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevertheless, you are right about mentioning of category.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed that in 10eae59.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, it is optional. Let's leave it out. Thanks for the category fix!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. I also fixed that in the service document examples and fixed a filename error.

12 changes: 7 additions & 5 deletions csaf_2.0/examples/ROLIE/example-01-feed-tlp-white.json
Expand Up @@ -8,10 +8,12 @@
"href": "https://psirt.domain.tld/advisories/csaf/feed-tlp-white.json"
}
],
"category": {
"scheme": "urn:ietf:params:rolie:category:information-type",
"term": "security advisory"
},
"category": [
{
"scheme": "urn:ietf:params:rolie:category:information-type",
"term": "csaf"
}
],
"updated": "2021-01-01T12:00Z",
"entry": [
{
Expand All @@ -33,7 +35,7 @@
"src": "https://psirt.domain.tld/advisories/csaf/2020/ESA-001.json"
},
"format": {
"schema": "https://raw.githubusercontent.com/oasis-tcs/csaf/master/csaf_2.0/json_schema/csaf_json_schema.json",
"schema": "https://docs.oasis-open.org/csaf/csaf/v2.0/csaf_json_schema.json",
"version": "2.0"
}
}
Expand Down
21 changes: 21 additions & 0 deletions csaf_2.0/examples/ROLIE/example-01-service.json
@@ -0,0 +1,21 @@
{
"service": {
"workspace": [
{
"title": "Public CSAF feed",
"collection": [
{
"title": "Example CSAF feed (TLP:WHITE)",
"href": "https://psirt.domain.tld/advisories/csaf/feed-tlp-white.json",
"categories": [
{
"scheme": "urn:ietf:params:rolie:category:information-type",
"term": "csaf"
}
]
}
]
}
]
}
}
54 changes: 54 additions & 0 deletions csaf_2.0/examples/ROLIE/example-02-service.json
@@ -0,0 +1,54 @@
{
"service": {
"workspace": [
{
"title": "Public CSAF feed",
"collection": [
{
"title": "Example CSAF feed (TLP:WHITE)",
"href": "https://psirt.domain.tld/advisories/csaf/feed-tlp-white.json",
"categories": [
{
"scheme": "urn:ietf:params:rolie:category:information-type",
"term": "csaf"
}
]
}
]
},
{
"title": "Private CSAF feeds",
"collection": [
{
"title": "Example CSAF feed (TLP:AMBER)",
"href": "https://psirt.domain.tld/advisories/tlp-amber/csaf/feed-tlp-amber.json",
"categories": [
{
"scheme": "urn:ietf:params:rolie:category:information-type",
"term": "csaf"
},
{
"scheme": "urn:ietf:params:rolie:category:information-type",
"term": "tlp-amber"
}
]
},
{
"title": "Example CSAF feed (TLP:RED)",
"href": "https://psirt.domain.tld/advisories/tlp-red/csaf/feed-tlp-red.json",
"categories": [
{
"scheme": "urn:ietf:params:rolie:category:information-type",
"term": "csaf"
},
{
"scheme": "urn:ietf:params:rolie:category:information-type",
"term": "tlp-red"
}
]
}
]
}
]
}
}
45 changes: 38 additions & 7 deletions csaf_2.0/prose/csaf-v2-editor-draft.md
Expand Up @@ -4907,10 +4907,12 @@ MUST exist. Each ROLIE feed document MUST be a JSON file that conforms with [RFC
"href": "https://psirt.domain.tld/advisories/csaf/feed-tlp-white.json"
}
],
"category": {
"scheme": "urn:ietf:params:rolie:category:information-type",
"term": "security advisory"
},
"category": [
{
"scheme": "urn:ietf:params:rolie:category:information-type",
"term": "csaf"
}
],
"updated": "2021-01-01T12:00Z",
"entry": [
{
Expand All @@ -4932,7 +4934,7 @@ MUST exist. Each ROLIE feed document MUST be a JSON file that conforms with [RFC
"src": "https://psirt.domain.tld/advisories/csaf/2020/ESA-001.json"
},
"format": {
"schema": "https://raw.githubusercontent.com/oasis-tcs/csaf/master/csaf_2.0/json_schema/csaf_json_schema.json",
"schema": "https://docs.oasis-open.org/csaf/csaf/v2.0/csaf_json_schema.json",
"version": "2.0"
}
}
Expand All @@ -4948,7 +4950,27 @@ The use and therefore the existence of ROLIE category document is optional. If i
*Example 101:*

```
TODO: Provide EXAMPLE 101 for ROLIE service document
{
"service": {
"workspace": [
{
"title": "Public CSAF feed",
"collection": [
{
"title": "Example CSAF feed (TLP:WHITE)",
"href": "https://psirt.domain.tld/advisories/csaf/feed-tlp-white.json",
"categories": [
{
"scheme": "urn:ietf:params:rolie:category:information-type",
"term": "csaf"
}
]
}
]
}
]
}
}
```

### 7.1.17 Requirement 17: ROLIE category document
Expand All @@ -4958,7 +4980,16 @@ The use and therefore the existence of ROLIE category document is optional. If i
*Example 102:*

```
TODO: Provide EXAMPLE 102 for ROLIE category document
{
"categories": [
{
"term": "Example Company Product A"
},
{
"term": "Example Company Product B"
}
]
}
```

### 7.1.18 Requirement 18: Integrity
Expand Down