Skip to content

Commit

Permalink
Merge branch 'dev' into user/ariana/LNK-3007-Testing/IntegrationTest
Browse files Browse the repository at this point in the history
  • Loading branch information
arianamihailescu authored Dec 30, 2024
2 parents a775079 + 96d6fce commit ab85af5
Show file tree
Hide file tree
Showing 21 changed files with 486 additions and 319 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ public class MongoConnection
{
public string ConnectionString { get; set; } = string.Empty;
public string DatabaseName { get; set; } = string.Empty;
public string CollectionName { get; set; } = string.Empty;
}
}
1 change: 0 additions & 1 deletion DotNet/Submission/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "linkReportDb"
},
"DatabaseProvider": "SqlServer",
"SubmissionServiceConfig": {
"ReportServiceUrl": "",
"CensusUrl": "",
Expand Down
2 changes: 1 addition & 1 deletion Java/measureeval/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ secret-management:
key-vault-uri: ''

authentication:
anonymous: true
anonymous: false
authority: 'https://localhost:7004'
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ This page and its references include documentation for Link's services and the f
* [Report](service_specs/report.md)
* [Submission](service_specs/submission.md)
* [Tenant](service_specs/tenant.md)
* [Validation](service_specs/validation.md)

### Service Swagger Specifications

Expand Down
151 changes: 151 additions & 0 deletions docs/config/csharp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
[← Back Home](../README.md)

# Common Configurations for CSharp Services

## Swagger

| Property | Description | Required | Default Value | Secret? |
|----------------|----------------------------|----------|---------------|---------|
| EnableSwagger | Enable Swagger spec and UI | No | false | No |

## Azure App Config Environment Variables

The following should be specified as environment variables when launching the service:

| Name | Description | Required | Default Value | Secret? |
|------------------------------------------|-----------------------------------------------|----------------------|----------------|----------|
| ExternalConfigurationSource | Specifies the configuration source to use | Yes | None | No |
| ConnectionStrings__AzureAppConfiguration | Connection string for Azure App Configuration | Yes (if using Azure) | None | Yes |

## Kafka

| Name | Description | Required | Secret? |
|--------------------------------------|---------------------------|-----------|----------|
| KafkaConnection__BootstrapServers__0 | Kafka broker address | Yes | No |
| KafkaConnection__GroupId | Consumer group identifier | Yes | No |
| KafkaConnection__ClientId | Unique client identifier | Yes | No |

### SASL Plain Text Authentication

Include the following configuration properties to connecto to Kafka that requires SASL_PLAINTEXT authentication:

| Name | Value | Secret? |
|--------------------------------------|------------|---------|
| KafkaConnection__SaslProtocolEnabled | true | No |
| KafkaConnection__SaslUsername | <username> | No |
| KafkaConnection__SaslPassword | <password> | Yes |

### Kafka Consumer Settings

| Name | Description | Secret? |
|-----------------------------------------|-----------------------------------------------------------------------|---------|
| ConsumerSettings__ConsumerRetryDuration | A list of strings representing retry duration intervals for consumers | No |
| ConsumerSettings__DisableRetryConsumer | A boolean flag to enable/disable the retry mechanism for consumers | No |
| ConsumerSettings__DisableConsumer | A boolean flag to completely enable/disable the consumer | No |

## CORS

| Property | Description | Required | Default | Secret? |
|-----------------------|------------------------------------|------------|---------------------------------------------|---------|
| CORS__AllowAllOrigins | Allow all origins | No | false | No |
| CORS__AllowedOrigins | Array of allowed origins | No | [] | No |
| CORS__AllowAllMethods | Allow all HTTP methods | No | true | No |
| CORS__AllowedMethods | Array of allowed HTTP methods | No | ["GET", "POST", "PUT", "DELETE", "OPTIONS"] | No |
| CORS__AllowAllHeaders | Allow all headers | No | true | No |
| CORS__MaxAge | Preflight cache duration (seconds) | No | 600 | No |

## Token Service Settings

TODO: Describe what the purpose of the token endpoint is

| Property | Type | Description | Default Value | Secret? |
|-------------------------------------------------|---------|-----------------------------------------------------------|-----------------------|---------|
| LinkTokenService__EnableTokenGenerationEndpoint | bool | Controls whether the token generation endpoint is enabled | false | No |
| LinkTokenService__Authority | string | The authority URL used for token validation/generation | Required (no default) | No |
| LinkTokenService__LinkAdminEmail | string? | Email address for Link administration | null | No |
| LinkTokenService__TokenLifespan | int | The lifespan of generated tokens in minutes | 10 | No |
| LinkTokenService__SigningKey | string? | The key used for signing tokens | null | Yes |
| LinkTokenService__LogToken | bool | Controls whether token logging is enabled | false | No |

## Service Authentication

| Property | Description | Required | Default Value | Secret? |
|----------------------------------------------------|----------------------------------------------|----------|---------------|---------|
| Authentication__EnableAnonymousAccess | Enable anonymous access to the service | No | false | No |
| Authentication__Schemas__LinkBearer__Authority | Authority URL for Link Bearer authentication | Yes | None | No |
| Authentication__Schemas__LinkBearer__ValidateToken | Validate the token on each request | No | true | No |
| DataProtection__Enabled | Enable data protection for sensitive data | No | false | No |

## Redis

| Name | Description | Required | Secret? |
|--------------------------|--------------------------|--------------------------|----------|
| ConnectionStrings__Redis | Redis connection string | Yes (if caching enabled) | Yes |
| Cache__Enabled | Toggle for Redis caching | No | No |

## Service Registry

The Service Registry section contains URLs and configurations for all microservices in the Link Cloud ecosystem. Configuration key: `ServiceRegistry`

Not all services use every URL. The configuration is provided for completeness and future-proofing. If using Azure App Configuration, all service URLs should be specified, and each service will use only the URLs it needs.

### Service URLs

| Property | Description |
|--------------------------------------------|-------------------------------------------|
| ServiceRegistry__AccountServiceUrl | Base URL for the Account service |
| ServiceRegistry__AuditServiceUrl | Base URL for the Audit service |
| ServiceRegistry__CensusServiceUrl | Base URL for the Census service |
| ServiceRegistry__DataAcquisitionServiceUrl | Base URL for the Data Acquisition service |
| ServiceRegistry__MeasureServiceUrl | Base URL for the Measure service |
| ServiceRegistry__NormalizationServiceUrl | Base URL for the Normalization service |
| ServiceRegistry__NotificationServiceUrl | Base URL for the Notification service |
| ServiceRegistry__QueryDispatchServiceUrl | Base URL for the Query Dispatch service |
| ServiceRegistry__ReportServiceUrl | Base URL for the Report service |
| ServiceRegistry__SubmissionServiceUrl | Base URL for the Submission service |

### Tenant Service Configuration

| Property | Description | Required | Default |
|------------------------------------------|---------------------------------------------|------------|-------------|
| TenantService__TenantServiceUrl | Base URL for the Tenant service | Yes | None |
| TenantService__CheckIfTenantExists | Whether to validate tenant existence | No | true |
| TenantService__GetTenantRelativeEndpoint | Relative endpoint path for tenant retrieval | No | "facility/" |

### SQL Server Database

| Name | Description | Required | Default Value | Secret? |
|---------------------------------------|-------------------------------------------|----------|---------------|---------|
| DatabaseProvider | Database provider to use | No | SqlServer | No |
| ConnectionStrings__DatabaseConnection | MSSQL connection string | Yes | None | Yes |
| AutoMigrate | Automatically migrate the database schema | No | false | No |

### Mongo Database

| Name | Description | Required | Default Value | Secret? |
|---------------------------|---------------------------|----------|---------------|---------|
| MongoDB__ConnectionString | MongoDB connection string | Yes | None | Yes |
| MongoDB__DatabaseName | MongoDB database name | Yes | None | No |

### Example Configuration
```json
{
"ServiceRegistry": {
"AccountServiceUrl": "https://localhost:7001",
"AuditServiceUrl": "https://localhost:7334",
"CensusServiceUrl": "https://localhost:7234",
"DataAcquisitionServiceUrl": "https://localhost:7194",
"MeasureServiceUrl": "https://localhost:7135",
"NormalizationServiceUrl": "https://localhost:7038",
"NotificationServiceUrl": "https://localhost:7434",
"QueryDispatchServiceUrl": "https://localhost:7534",
"ReportServiceUrl": "https://localhost:7110",
"SubmissionServiceUrl": "https://localhost:7046",
"TenantService": {
"TenantServiceUrl": "https://localhost:7332",
"CheckIfTenantExists": true,
"GetTenantRelativeEndpoint": "facility/"
}
}
}
```
70 changes: 70 additions & 0 deletions docs/config/java.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[← Back Home](../README.md)

# Common Configurations for Java Services

Any of the properties for serivce configuration can be provided either via environment variables, through a custom `application.yml` file, or via properties set in java using `-D<propertyName>=<value>` passed as an argument to the JVM during startup.

## Azure App Config

| Property Name | Description | Type/Value |
|---------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
| spring.cloud.azure.appconfiguration.enabled | Enable Azure App Configuration | true or false |
| spring.cloud.azure.appconfiguration.stores[0].connection-string<br/>OR<br/>AZURE_APP_CONFIG_CONNECTION_STRING | Connection string to Azure App Config instance. The `AZURE_APP_CONFIG_CONNECTION_STRING` variable is setup in the default bootstrap-dev.yml configuration that's used by Azure App Config libraries. | \<string> |
| spring.cloud.azure.appconfiguration.stores[0].selects[0].label-filter | Label to use for configuration | ",Validation" |
| spring.cloud.azure.appconfiguration.stores[0].selects[0].key-filter | Key to use for configuration | "/" |

## Telemetry

| Property Name | Description | Type/Value |
|----------------------------|---------------------------------------------------------------|--------------------------|
| telemetry.exporterEndpoint | Endpoint that can be connected to by scrapers for metric data | "http://localhost:55690" |
| loki.enabled | Enable Loki for logging | true or false |
| loki.url | URL for Loki | "http://localhost:3100" |
| loki.app | Application name for Loki | "link-dev" |

## Swagger

| Property Name | Description | Type/Value |
|------------------------------|------------------------------------------|------------------------------------------------------------------------------|
| springdoc | Configuration for Swagger and Swagger UI | See [Springdoc documentation](https://springdoc.org/#properties) for details |
| springdoc.api-docs.enabled | Enable Swagger specification generation | true or false (default) |
| springdoc.swagger-ui.enabled | Enable Swagger UI | true or false (default) |

## Mongo DB

| Property Name | Description | Type/Value | Secret? |
|------------------------------|--------------------------------------|---------------|---------|
| spring.data.mongodb.host | Host address for the Mongo database | "localhost" | No |
| spring.data.mongodb.port | Port for the Mongo database | 27017 | No |
| spring.data.mongodb.database | Database name for the Mongo database | "measureeval" | No |
| spring.data.mongodb.username | Username for the Mongo database | \<string> | No |
| spring.data.mongodb.password | Password for the Mongo database | \<string> | Yes |

## SQL Server

| Property Name | Description | Type/Value | Secret? |
|--------------------------------|--------------------------------------|----------------------------------------------------|---------|
| spring.datasource.url | URL for the SQL Server database | \<string> prefixed with "jdbc:sqlserver://" | No |
| spring.datasource.username | Username for the SQL Server database | \<string> | No |
| spring.datasource.password | Password for the SQL Server database | \<string> | Yes |
| spring.jpa.hibernate.ddl-auto | DDL auto setting for JPA/Hibernate | "none" (default) or "update" | No |
| spring.jpa.properties.show_sql | Show SQL statements in logs | true (default) or false | No |
| spring.jpa.properties.dialect | SQL dialect for the database | "org.hibernate.dialect.SQLServerDialect" (default) | No |

## Kafka

| Property Name | Description | Type/Value | Secret? |
|-------------------------------------|-------------------------------------------------------------------|------------------|---------|
| spring.kafka.bootstrap-servers | Kafka bootstrap servers | "localhost:9092" | No |
| spring.kafka.consumer.group-id | Kafka consumer group ID | "measureeval" | No |
| spring.kafka.producer.client-id | Kafka producer client ID | "measureeval" | No |
| spring.kafka.retry.maxAttempts | Maximum number of times consumption of an event should be retried | 3 | No |
| spring.kafka.retry.retry-backoff-ms | Time in milliseconds to wait before retrying a failed event | 3000 | No |

## Service Authentication

| Property Name | Description | Type/Value | Secret? |
|---------------------------------|----------------------------------------------------------------------------------------------------------------------------|-------------------------|---------|
| secret-management.key-vault-uri | URI for the Azure Key Vault | \<string> | Yes |
| authentication.anonymous | Whether the service should allow anonmyous users access to the services. This should onyl be enabled for DEV environments. | true or false (default) | No |
| authentication.authority | Authority for the service to authenticate against. | "http://localhost:7004" | No |
2 changes: 1 addition & 1 deletion docs/functionality/measure_eval.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ This approach ensures consistent, reliable evaluation of healthcare quality meas

### Testing

The measure engine may be tested against arbitrary data using the $evaluate operation that is custom-built for this purpose in the measure evaluation service.
The measure engine may be tested against arbitrary data using the $evaluate operation (which is custom-built for this purpose in the measure evaluation service) or using the `measureeval-cli.jar` that can be built separately from the service; see [measureeval/README.md](../../Java/measureeval/README.md) for more information.
Loading

0 comments on commit ab85af5

Please sign in to comment.