diff --git a/README.md b/README.md index b2b1f9a..fee85b2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![tests](https://github.com/ghga-de/access-request-service/actions/workflows/tests.yaml/badge.svg)](https://github.com/ghga-de/access-request-service/actions/workflows/unit_and_int_tests.yaml) +[![tests](https://github.com/ghga-de/access-request-service/actions/workflows/tests.yaml/badge.svg)](https://github.com/ghga-de/access-request-service/actions/workflows/tests.yaml) [![Coverage Status](https://coveralls.io/repos/github/ghga-de/access-request-service/badge.svg?branch=main)](https://coveralls.io/github/ghga-de/access-request-service?branch=main) # Access Request Service @@ -103,6 +103,16 @@ The service requires the following configuration parameters: ``` +- **`kafka_security_protocol`** *(string)*: Protocol used to communicate with brokers. Valid values are: PLAINTEXT, SSL. Must be one of: `["PLAINTEXT", "SSL"]`. Default: `"PLAINTEXT"`. + +- **`kafka_ssl_cafile`** *(string)*: Certificate Authority file path containing certificates used to sign broker certificates. If a CA not specified, the default system CA will be used if found by OpenSSL. Default: `""`. + +- **`kafka_ssl_certfile`** *(string)*: Optional filename of client certificate, as well as any CA certificates needed to establish the certificate's authenticity. Default: `""`. + +- **`kafka_ssl_keyfile`** *(string)*: Optional filename containing the client private key. Default: `""`. + +- **`kafka_ssl_password`** *(string)*: Optional password to be used for the client private key. Default: `""`. + - **`db_connection_str`** *(string, format: password)*: MongoDB connection string. Might include credentials. For more information see: https://naiveskill.com/mongodb-connection-string/. @@ -129,7 +139,7 @@ The service requires the following configuration parameters: - **Items** *(string)* -- **`auth_check_claims`** *(object)*: A dict of all GHGA internal claims that shall be verified. Default: `{"email": null, "exp": null, "iat": null, "name": null}`. +- **`auth_check_claims`** *(object)*: A dict of all GHGA internal claims that shall be verified. Default: `{"name": null, "email": null, "iat": null, "exp": null}`. - **`auth_map_claims`** *(object)*: A mapping of claims to attributes in the GHGA auth context. Can contain additional properties. Default: `{}`. diff --git a/config_schema.json b/config_schema.json index 7fa8565..e6c7b8c 100644 --- a/config_schema.json +++ b/config_schema.json @@ -74,6 +74,40 @@ "title": "Kafka Servers", "type": "array" }, + "kafka_security_protocol": { + "default": "PLAINTEXT", + "description": "Protocol used to communicate with brokers. Valid values are: PLAINTEXT, SSL.", + "enum": [ + "PLAINTEXT", + "SSL" + ], + "title": "Kafka Security Protocol", + "type": "string" + }, + "kafka_ssl_cafile": { + "default": "", + "description": "Certificate Authority file path containing certificates used to sign broker certificates. If a CA not specified, the default system CA will be used if found by OpenSSL.", + "title": "Kafka Ssl Cafile", + "type": "string" + }, + "kafka_ssl_certfile": { + "default": "", + "description": "Optional filename of client certificate, as well as any CA certificates needed to establish the certificate's authenticity.", + "title": "Kafka Ssl Certfile", + "type": "string" + }, + "kafka_ssl_keyfile": { + "default": "", + "description": "Optional filename containing the client private key.", + "title": "Kafka Ssl Keyfile", + "type": "string" + }, + "kafka_ssl_password": { + "default": "", + "description": "Optional password to be used for the client private key.", + "title": "Kafka Ssl Password", + "type": "string" + }, "db_connection_str": { "description": "MongoDB connection string. Might include credentials. For more information see: https://naiveskill.com/mongodb-connection-string/", "examples": [ @@ -110,10 +144,10 @@ }, "auth_check_claims": { "default": { + "name": null, "email": null, - "exp": null, "iat": null, - "name": null + "exp": null }, "description": "A dict of all GHGA internal claims that shall be verified.", "title": "Auth Check Claims", diff --git a/example_config.yaml b/example_config.yaml index 3d3a38f..5570322 100644 --- a/example_config.yaml +++ b/example_config.yaml @@ -22,8 +22,13 @@ db_name: dev-db docs_url: /docs download_access_url: http://127.0.0.1:8080/download-access host: 127.0.0.1 +kafka_security_protocol: PLAINTEXT kafka_servers: - kafka:9092 +kafka_ssl_cafile: '' +kafka_ssl_certfile: '' +kafka_ssl_keyfile: '' +kafka_ssl_password: '' log_level: info notification_event_topic: notifications notification_event_type: notification