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

Fixes #333 Apply feedback from Matt #338

Merged
merged 10 commits into from
Aug 15, 2024
14 changes: 0 additions & 14 deletions calm/control-example/control-instance.json

This file was deleted.

22 changes: 10 additions & 12 deletions calm/control-example/one-node-wonder.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
{
"$schema": "https://raw.githubusercontent.com/finos/architecture-as-code/main/calm/draft/2024-08/meta/calm.json",
"id": "one-node-wonder.json",
Copy link
Member

Choose a reason for hiding this comment

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

No pattern ID?

"title": "Demonstration of domain and controls",
"nodes": [
{
"unique-id": "example-system",
"node-type": "system",
"name": "Example System",
"description": "Example System",
"domains": {
"cbom": [
{
"unique-id": "ci-arch-001",
"description": "Evidence of Pre Production Review",
"requirement-schema": "control-specification.json",
"requirement-instance": "control-instance.json",
"evidence": [
"controls": {
"cbom": {
"description": "Control requirements for delivering patterns",
"requirements": [
{
"evidence-link": "https://evidence.com/12345",
"evidence-id": "12345"
"control-requirement": {
"$ref": "https://raw.githubusercontent.com/finos/architecture-as-code/main/calm/control-example/pre-prod-review-specification.json"
},
"control-config": {
"$ref": "https://raw.githubusercontent.com/finos/architecture-as-code/main/calm/control-example/pre-prod-review-configuration.json"
}
}
]
}
]
}
}
],
Expand Down
9 changes: 9 additions & 0 deletions calm/control-example/pre-prod-review-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://raw.githubusercontent.com/finos/architecture-as-code/main/calm/control-example/control-specification.json",
"title": "Evidence of pre-production review",
"control-id": "ci-arch-001",
"name": "Architecture review pre-production",
"scope-text": "All workloads going to production",
"scope-rego": "input.metadata.target-deployment.environment == Production",
"description": "As part of the SDLC requirements, each workload going to production is subject to an architecture review"
}
8 changes: 8 additions & 0 deletions calm/control-example/pre-prod-review-evidence.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://raw.githubusercontent.com/finos/architecture-as-code/main/calm/draft/2024-08/meta/control.json#/defs/evidence",
"evidence": {
"unique-id": "pre-prod-review-evidence",
"evidence-path": "https://evidence.com/12345",
"control-configuration-uri": "https://raw.githubusercontent.com/finos/architecture-as-code/main/calm/control-example/pre-prod-review-configuration.json"
}
}
jpgough-ms marked this conversation as resolved.
Show resolved Hide resolved
jpgough-ms marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,46 +1,35 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "control-specification.json",
"$id": "https://raw.githubusercontent.com/finos/architecture-as-code/main/calm/control-example/control-specification.json",
"title": "Example Production Control Specification",
"type": "object",
"allOf": [
{
"$ref": "https://raw.githubusercontent.com/finos/architecture-as-code/main/calm/draft/2024-08/meta/control-requirement.json"
}
],
"properties": {
"control-id": {
"const": "ci-arch-001"
},
"name": {
"const": "Architecture review pre-production"
},
"description": {
"const": "As part of the SDLC requirements, each workload going to production is subject to an architecture review"
},
"scope-text": {
"const": "All workloads going to production"
},
"scope-rego": {
"const": "input.metadata.target-deployment.environment == Production"
},
"data-fields": {
"type": "object",
"properties": {
"review-date": {
"type": "string",
"format": "date"
},
"reviewed-by": {
"type": "string"
},
"docs-link": {
"type": "string",
"format": "uri"
}
},
"required": [
"review-date",
"reviewed-by",
"docs-link"
]
}
},
"required": [
"scope-text",
"scope-rego",
"control-id",
"name",
"scope-text",
"scope-rego"
"description"
]
}
33 changes: 33 additions & 0 deletions calm/draft/2024-08/meta/control-requirement.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/finos/architecture-as-code/main/calm/draft/2024-08/meta/control-requirement.json",
"title": "Common Architecture Language Model Control Requirement",
"description": "Schema for defining control requirements within the Common Architecture Language Model.",
"type": "object",
"properties": {
"control-id": {
"type": "string",
"description": "The unique identifier of this control, which has the potential to be used for linking evidence"
},
"name": {
"type": "string",
"description": "The name of the control requirement that provides contextual meaning within a given domain"
},
"description": {
"type": "string",
"description": "A more detailed description of the control and information on what a developer needs to consider"
}
},
"required": [
"control-id",
"name",
"description"
],
"examples": [
{
"control-id": "CR-001",
"name": "Access Control",
"description": "Ensure that access to sensitive information is restricted."
}
]
}
49 changes: 49 additions & 0 deletions calm/draft/2024-08/meta/control.json
Copy link
Member

Choose a reason for hiding this comment

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

We should add a reference to the control.json into the calm.json the same way core.json is referenced otherwise the one-node-wonder doesn't know what a control-requirement is because the schema reference is to calm which currently knows nothing about controls.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's interesting, is this something we've broken with interface.json!

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/finos/architecture-as-code/main/calm/draft/2024-08/meta/control.json",
"title": "Common Architecture Language Model Controls",
"description": "Controls model requirements for domains. For example, a security domain contains a series of control requirements",
"$defs": {
"control-detail": {
"type": "object",
"properties": {
"control-requirement": {
"$ref": "https://raw.githubusercontent.com/finos/architecture-as-code/main/calm/draft/2024-08/meta/control-requirement.json",
"description": "The requirement schema that specifies how a control should be defined"
},
"control-config": {
"$ref": "https://raw.githubusercontent.com/finos/architecture-as-code/main/calm/draft/2024-08/meta/control-requirement.json",
"description": "The configuration of how the control requirement schema is met"
}
},
"required": [
"control-requirement"
]
},
"controls": {
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9-]+$": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "A description of a control and how it applies to a given architecture"
},
"requirements": {
"type": "array",
"items": {
"type": "#/$defs/control-detail",
"description": "The detail of a how a specified control is structured and (if it currently does) is configured to meet the requirement"
}
}
},
"required": [
"description",
"requirements"
]
}
}
}
}
}
12 changes: 6 additions & 6 deletions calm/draft/2024-08/meta/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"metadata": {
"$ref": "#/defs/metadata"
},
"domains": {
"$ref": "domain.json#/defs/domains"
"controls": {
"$ref": "control.json#/defs/controls"
}
},
"defs": {
Expand Down Expand Up @@ -56,8 +56,8 @@
"$ref": "interface.json#/defs/interface-type"
}
},
"domains": {
"$ref": "domain.json#/defs/domains"
"controls": {
"$ref": "control.json#/defs/controls"
},
"metadata": {
"$ref": "#/defs/metadata"
Expand Down Expand Up @@ -128,8 +128,8 @@
"metadata": {
"$ref": "#/defs/metadata"
},
"domains": {
"$ref": "domain.json#/defs/domains"
"controls": {
"$ref": "control.json#/defs/controls"
}
},
"required": [
Expand Down
62 changes: 0 additions & 62 deletions calm/draft/2024-08/meta/domain.json

This file was deleted.

37 changes: 37 additions & 0 deletions calm/draft/2024-08/meta/evidence.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/finos/architecture-as-code/main/calm/draft/2024-08/meta/evidence.json",
"title": "Common Architecture Language Model Evidence",
"description": "Schema for defining evidence for control requirements within the Common Architecture Language Model.",
"type": "object",
"properties": {
"evidence": {
"type": "object",
"properties": {
"unique-id": {
"type": "string",
"description": "CALM unique-id for future linking and uniquely defining this evidence"
},
"evidence-paths": {
"type": "array",
"description": "Paths to the evidence relating to a specific control",
"items": {
"type": "string"
}
},
"control-configuration-uri": {
"type": "string",
"description": "URI for the control configuration this evidence relates to"
}
},
"required":[
"unique-id",
"evidence-paths",
"control-configuration-uri"
]
}
},
"required": [
"evidence"
]
}
Loading