diff --git a/.gitignore b/.gitignore index 5ee9554ea9eb8587a8ab2c93109b0ba6425b2f35..ee9fa85c6c7093809650546ef7417c1efd9a9035 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ *.iml .idea/ +spec/zustelldienst-bundled.yml + # Dependencies node_modules/ diff --git a/metadata-schema/.gitkeep b/metadata-schema/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/metadata-schema/README.md b/metadata-schema/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a69a944b489c15ecb95ae784480ef67227aac828 --- /dev/null +++ b/metadata-schema/README.md @@ -0,0 +1,28 @@ +# Dokumentation für das Metadatenschema + +## Feld `contactInformation.e-mail.pgpPublicKey` + +Der Inhalt des Feldes ist ein durch `gpg --export --armor "$KEY_ID"` erzeugter ASCII-String +in dem Zeilenumbrüche durch die Escape-Sequenz (`\n`) ersetzt wurden. + +Die Kodierung erfolgt wie folgt: + +``` +$ KEY_ID='EEADEDE070FA9658F0BE084AC20D38DB3EA14B59' +$ gpg --export --armor "$KEY_ID" | python3 -c 'import sys; print(sys.stdin.read().replace("\n", "\\n"))' +-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBEBEADSlS<snip>9jlG\n-----END PGP PUBLIC KEY BLOCK-----\n +``` + +Die Dekodierung ist obiger Schritt in Gegenrichtung: + +``` +$ KEY_ASCII='-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBEBEADSlS<snip>9jlG\n-----END PGP PUBLIC KEY BLOCK-----\n' +$ echo "$KEY_ASCII" | python3 -c 'import sys; print(sys.stdin.read().replace("\\n", "\n"))' +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBEBEADSlS<snip>9jlG +-----END PGP PUBLIC KEY BLOCK----- + +``` + +Möchte man den eben ausgegeneben Schlüssel auch direkt importieren kann man hinter dem Dekodierungssnippet noch ein `| pgp --import` setzen. diff --git a/metadata-schema/antragsmetadaten.schema.json b/metadata-schema/antragsmetadaten.schema.json index 608c380d4d86c3a508de11f3f97c90d41ec119f2..5127b33941d2c14dd94685dc96b5529839f4b730 100644 --- a/metadata-schema/antragsmetadaten.schema.json +++ b/metadata-schema/antragsmetadaten.schema.json @@ -83,6 +83,89 @@ "description": "Antragsdatum" } } + }, + "replyChannel": { + "type": "object", + "minProperties": 1, + "properties": { + "eMail": { + "type": "object", + "properties": { + "address": { + "type": "string", + "format": "email" + }, + "pgpPublicKey": { + "type": "string", + "description": "Hilfe zur Erstellung gibt es in der Dokumentation unter TODO.", + "pattern": "^-----BEGIN PGP PUBLIC KEY BLOCK-----\\n\\n" + } + }, + "required": [ + "address" + ], + "additionalProperties": false + }, + "deMail": { + "type": "object", + "description": "Akkreditierte Anbieter siehe https://www.bsi.bund.de/DE/Themen/Oeffentliche-Verwaltung/Moderner-Staat/De-Mail/Akkreditierte-DMDA/akkreditierte-dmda_node.html", + "properties": { + "address": { + "type": "string", + "format": "email" + } + }, + "required": [ + "address" + ], + "additionalProperties": false + }, + "fink": { + "type": "object", + "description": "Postfachadresse in einem interoperablen Servicekonto (FINK.PFISK)", + "properties": { + "finkPostfachRef": { + "type": "string", + "description": "FINK Postfachadresse", + "example": "hh/by/12345", + "maxLength": 150, + "pattern": "^[-._a-z0-9~\/]*$" + }, + "host": { + "type": "string", + "description": "URL des Servicekontos, in dem das Ziel-Postfach liegt", + "format": "uri", + "example": "https://servicekonto1.example.com/" + } + }, + "required": [ + "finkPostfachRef" + ], + "additionalProperties": false + }, + "elster": { + "type": "object", + "description": "Siehe https://www.elster.de/elsterweb/infoseite/elstertransfer_hilfe_schnittstellen", + "properties": { + "accountId": { + "type": "string", + "pattern": "^\\d{10}$" + }, + "lieferTicket": { + "type": "string" + }, + "geschaeftszeichen": { + "type": "string", + "maxLength": 10 + } + }, + "required": [ + "accountId" + ], + "additionalProperties": false + } + }, + "additionalProperties": false } }, "required": [ diff --git a/metadata-schema/contact-information.example.json b/metadata-schema/contact-information.example.json new file mode 100644 index 0000000000000000000000000000000000000000..5698503bf7a6e73e7bc81b27e429f3b0db72149e --- /dev/null +++ b/metadata-schema/contact-information.example.json @@ -0,0 +1,19 @@ +{ + "replyChannel": { + "eMail": { + "address": "hello@fitko.de", + "pgpPublicKey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\n" + }, + "deMail": { + "address": "hello@de-mail.de" + }, + "fink": { + "finkPostfachRef": "hh/by/12" + }, + "elster": { + "accountId": "0123456789", + "lieferTicket": "Ticket-123", + "geschaeftszeichen": "XY-123" + } + } +}