From 8bacfe49400dc5d467eec95eb13c99f77194bd65 Mon Sep 17 00:00:00 2001 From: Sam Leeflang Date: Wed, 18 Sep 2024 16:46:29 +0200 Subject: [PATCH] Change env and secret for MAS --- .../schema/machine-annotation-service.json | 9 +++++---- .../environmental-variable-example.json | 4 ++++ .../0.3.0/examples/secret-variable.json | 4 ++++ .../0.3.0/schema/environmental-variable.json} | 17 ++++++++--------- .../0.3.0/schema/secret-variable.json} | 18 +++++++++--------- 5 files changed, 30 insertions(+), 22 deletions(-) create mode 100644 data-model/fdo-type/shared-model/0.3.0/examples/environmental-variable-example.json create mode 100644 data-model/fdo-type/shared-model/0.3.0/examples/secret-variable.json rename data-model/fdo-type/{machine-annotation-service/0.3.0/schema/machine-annotation-service-environment.json => shared-model/0.3.0/schema/environmental-variable.json} (65%) rename data-model/fdo-type/{machine-annotation-service/0.3.0/schema/machine-annotation-service-secret.json => shared-model/0.3.0/schema/secret-variable.json} (56%) diff --git a/data-model/fdo-type/machine-annotation-service/0.3.0/schema/machine-annotation-service.json b/data-model/fdo-type/machine-annotation-service/0.3.0/schema/machine-annotation-service.json index 3eeceb9..a3a81e9 100644 --- a/data-model/fdo-type/machine-annotation-service/0.3.0/schema/machine-annotation-service.json +++ b/data-model/fdo-type/machine-annotation-service/0.3.0/schema/machine-annotation-service.json @@ -217,17 +217,18 @@ "description": "Object containing the tombstone metadata of the object", "$ref": "https://schemas.dissco.tech/schemas/fdo-type/shared-model/0.3.0/tombstone-metadata.json" }, - "ods:hasEnvironment": { + "ods:hasEnvironmentalVariable": { "type": "array", "description": "Environmental variables to supply to the MAS, non-sensitive", "items": { - "$ref": "https://schemas.dissco.tech/schemas/fdo-type/machine-annotation-service/0.3.0/machine-annotation-service-environment.json" + "$ref": "https://schemas.dissco.tech/schemas/fdo-type/shared/0.3.0/environment-variable.json" } }, - "ods:hasSecret": { + "ods:hasSecretVariable": { "type": "array", + "description": "Secret variables to supply to the MAS", "items": { - "$ref": "https://schemas.dissco.tech/schemas/fdo-type/machine-annotation-service/0.3.0/machine-annotation-service-secret.json" + "$ref": "https://schemas.dissco.tech/schemas/fdo-type/shared/0.3.0/secret-variable.json" } } }, diff --git a/data-model/fdo-type/shared-model/0.3.0/examples/environmental-variable-example.json b/data-model/fdo-type/shared-model/0.3.0/examples/environmental-variable-example.json new file mode 100644 index 0000000..57fb079 --- /dev/null +++ b/data-model/fdo-type/shared-model/0.3.0/examples/environmental-variable-example.json @@ -0,0 +1,4 @@ +{ + "schema:name": "server.port", + "schema:value": 8080 +} \ No newline at end of file diff --git a/data-model/fdo-type/shared-model/0.3.0/examples/secret-variable.json b/data-model/fdo-type/shared-model/0.3.0/examples/secret-variable.json new file mode 100644 index 0000000..582585e --- /dev/null +++ b/data-model/fdo-type/shared-model/0.3.0/examples/secret-variable.json @@ -0,0 +1,4 @@ +{ + "schema:name": "database.password", + "ods:secretKeyRef": "db-password" +} \ No newline at end of file diff --git a/data-model/fdo-type/machine-annotation-service/0.3.0/schema/machine-annotation-service-environment.json b/data-model/fdo-type/shared-model/0.3.0/schema/environmental-variable.json similarity index 65% rename from data-model/fdo-type/machine-annotation-service/0.3.0/schema/machine-annotation-service-environment.json rename to data-model/fdo-type/shared-model/0.3.0/schema/environmental-variable.json index 8df6fda..12d0e32 100644 --- a/data-model/fdo-type/machine-annotation-service/0.3.0/schema/machine-annotation-service-environment.json +++ b/data-model/fdo-type/shared-model/0.3.0/schema/environmental-variable.json @@ -1,12 +1,12 @@ { - "$id": "https://schemas.dissco.tech/schemas/fdo-type/machine-annotation-service/0.3.0/machine-annotation-service-environment.json", + "$id": "https://schemas.dissco.tech/schemas/fdo-type/shared/0.3.0/environment-variable.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "$comment": "Machine Annotation Service Environment Version 0.3.0", - "title": "MachineAnnotationServiceEnvironment", + "title": "EnvironmentalVariable", "type": "object", - "description": "Environmental variables to supply to the MAS, non-sensitive", + "description": "Environmental variables to supply to the a Digital Object, non-sensitive", "properties": { - "name": { + "schema:name": { "type": "string", "description": "The name of a non-sensitive property or environmental variable", "examples": [ @@ -14,12 +14,11 @@ "spring.profiles.active" ] }, - "value": { + "schema:value": { "type": [ "string", "integer", - "boolean", - "null" + "boolean" ], "description": "Value to be stored in the \"name\" field. NOT for sensitive information.", "examples": [ @@ -30,7 +29,7 @@ }, "additionalProperties": false, "required": [ - "name", - "value" + "schema:name", + "schema:value" ] } \ No newline at end of file diff --git a/data-model/fdo-type/machine-annotation-service/0.3.0/schema/machine-annotation-service-secret.json b/data-model/fdo-type/shared-model/0.3.0/schema/secret-variable.json similarity index 56% rename from data-model/fdo-type/machine-annotation-service/0.3.0/schema/machine-annotation-service-secret.json rename to data-model/fdo-type/shared-model/0.3.0/schema/secret-variable.json index 67ab27d..1f662d5 100644 --- a/data-model/fdo-type/machine-annotation-service/0.3.0/schema/machine-annotation-service-secret.json +++ b/data-model/fdo-type/shared-model/0.3.0/schema/secret-variable.json @@ -1,12 +1,12 @@ { - "$id": "https://schemas.dissco.tech/schemas/fdo-type/machine-annotation-service/0.3.0/machine-annotation-service-secret.json", + "$id": "https://schemas.dissco.tech/schemas/fdo-type/shared/0.3.0/secret-variable.json", "$schema": "https://json-schema.org/draft/2020-12/schema", - "$comment": "Machine Annotation Service Environment Version 0.3.0", - "title": "MachineAnnotationServiceSecret", + "$comment": "Secret Variable Version 0.3.0", + "title": "SecretVariable", "type": "object", - "description": "Remote secrets to supply to the MAS", + "description": "Secret Variable that need to be supplied to an Digital Object", "properties": { - "secretName": { + "schema:name": { "type": "string", "description": "The name of an environmental variable stored remotely", "examples": [ @@ -14,17 +14,17 @@ "keycloak.secret" ] }, - "secretKeyRef": { + "ods:secretKeyRef": { "type": "string", "description": "The name of the key stored in the secret store. NOT the secret's value.", - "example": [ + "examples": [ "db-password" ] } }, "additionalProperties": false, "required": [ - "name", - "secretKeyRef" + "schema:name", + "ods:secretKeyRef" ] } \ No newline at end of file