2021-08-01 14:27:44 -07:00
|
|
|
/*
|
2021-12-01 12:46:28 +05:30
|
|
|
* Copyright 2021 Collate
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
2021-08-01 14:27:44 -07:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2022-09-14 23:14:02 -07:00
|
|
|
package org.openmetadata.service;
|
2021-08-01 14:27:44 -07:00
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
import io.dropwizard.Configuration;
|
|
|
|
import io.dropwizard.db.DataSourceFactory;
|
2021-12-16 07:13:50 -08:00
|
|
|
import io.dropwizard.health.conf.HealthConfiguration;
|
2021-08-01 14:27:44 -07:00
|
|
|
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration;
|
|
|
|
import javax.validation.Valid;
|
|
|
|
import javax.validation.constraints.NotNull;
|
2022-02-06 10:18:37 -08:00
|
|
|
import lombok.Getter;
|
|
|
|
import lombok.Setter;
|
2023-02-23 22:57:57 +05:30
|
|
|
import org.openmetadata.api.configuration.ApplicationConfiguration;
|
2022-09-14 23:14:02 -07:00
|
|
|
import org.openmetadata.schema.api.configuration.events.EventHandlerConfiguration;
|
2023-02-07 16:30:42 +01:00
|
|
|
import org.openmetadata.schema.api.configuration.pipelineServiceClient.PipelineServiceClientConfiguration;
|
2022-09-14 23:14:02 -07:00
|
|
|
import org.openmetadata.schema.api.fernet.FernetConfiguration;
|
|
|
|
import org.openmetadata.schema.api.security.AuthenticationConfiguration;
|
|
|
|
import org.openmetadata.schema.api.security.AuthorizerConfiguration;
|
|
|
|
import org.openmetadata.schema.api.security.jwt.JWTTokenConfiguration;
|
2022-09-19 11:38:45 +05:30
|
|
|
import org.openmetadata.schema.email.SmtpSettings;
|
2023-01-09 21:42:01 -08:00
|
|
|
import org.openmetadata.schema.service.configuration.elasticsearch.ElasticSearchConfiguration;
|
2022-09-14 23:14:02 -07:00
|
|
|
import org.openmetadata.service.migration.MigrationConfiguration;
|
2022-11-28 17:45:18 +01:00
|
|
|
import org.openmetadata.service.monitoring.EventMonitorConfiguration;
|
2022-09-14 23:14:02 -07:00
|
|
|
import org.openmetadata.service.secrets.SecretsManagerConfiguration;
|
2021-08-01 14:27:44 -07:00
|
|
|
|
2022-07-22 00:42:44 +05:30
|
|
|
@Getter
|
|
|
|
@Setter
|
2022-09-17 11:35:45 -07:00
|
|
|
public class OpenMetadataApplicationConfig extends Configuration {
|
2022-07-22 00:42:44 +05:30
|
|
|
@JsonProperty("database")
|
2022-02-06 10:18:37 -08:00
|
|
|
@NotNull
|
|
|
|
@Valid
|
2021-12-16 07:13:50 -08:00
|
|
|
private DataSourceFactory dataSourceFactory;
|
|
|
|
|
2022-07-22 00:42:44 +05:30
|
|
|
@JsonProperty("swagger")
|
2021-12-16 07:13:50 -08:00
|
|
|
private SwaggerBundleConfiguration swaggerBundleConfig;
|
|
|
|
|
2022-07-22 00:42:44 +05:30
|
|
|
@JsonProperty("authorizerConfiguration")
|
2021-12-16 07:13:50 -08:00
|
|
|
private AuthorizerConfiguration authorizerConfiguration;
|
|
|
|
|
2022-07-22 00:42:44 +05:30
|
|
|
@JsonProperty("authenticationConfiguration")
|
2021-12-16 07:13:50 -08:00
|
|
|
private AuthenticationConfiguration authenticationConfiguration;
|
|
|
|
|
2022-07-22 00:42:44 +05:30
|
|
|
@JsonProperty("jwtTokenConfiguration")
|
2022-05-05 03:02:33 -07:00
|
|
|
private JWTTokenConfiguration jwtTokenConfiguration;
|
|
|
|
|
2022-07-22 00:42:44 +05:30
|
|
|
@JsonProperty("elasticsearch")
|
2021-12-16 07:13:50 -08:00
|
|
|
private ElasticSearchConfiguration elasticSearchConfiguration;
|
|
|
|
|
2022-07-22 00:42:44 +05:30
|
|
|
@JsonProperty("eventHandlerConfiguration")
|
2021-12-16 07:13:50 -08:00
|
|
|
private EventHandlerConfiguration eventHandlerConfiguration;
|
|
|
|
|
2023-02-07 16:30:42 +01:00
|
|
|
@JsonProperty("pipelineServiceClientConfiguration")
|
|
|
|
private PipelineServiceClientConfiguration pipelineServiceClientConfiguration;
|
2021-12-16 07:13:50 -08:00
|
|
|
|
2022-07-22 00:42:44 +05:30
|
|
|
@JsonProperty("migrationConfiguration")
|
2022-02-06 10:18:37 -08:00
|
|
|
@NotNull
|
2022-02-01 08:31:34 +01:00
|
|
|
private MigrationConfiguration migrationConfiguration;
|
|
|
|
|
2022-07-22 00:42:44 +05:30
|
|
|
@JsonProperty("fernetConfiguration")
|
2022-02-08 09:50:39 +01:00
|
|
|
private FernetConfiguration fernetConfiguration;
|
|
|
|
|
2022-07-22 00:42:44 +05:30
|
|
|
@JsonProperty("health")
|
2022-02-06 10:18:37 -08:00
|
|
|
@NotNull
|
|
|
|
@Valid
|
2021-12-16 07:13:50 -08:00
|
|
|
private HealthConfiguration healthConfiguration = new HealthConfiguration();
|
|
|
|
|
2023-02-23 22:57:57 +05:30
|
|
|
@JsonProperty("applicationConfig")
|
|
|
|
private ApplicationConfiguration applicationConfiguration = new ApplicationConfiguration();
|
2022-07-14 07:01:27 -07:00
|
|
|
|
2022-07-22 00:42:44 +05:30
|
|
|
@JsonProperty("secretsManagerConfiguration")
|
2022-07-13 20:49:27 +02:00
|
|
|
private SecretsManagerConfiguration secretsManagerConfiguration;
|
|
|
|
|
2022-11-28 17:45:18 +01:00
|
|
|
@JsonProperty("eventMonitoringConfiguration")
|
|
|
|
private EventMonitorConfiguration eventMonitorConfiguration;
|
|
|
|
|
2022-08-09 09:00:43 +02:00
|
|
|
@JsonProperty("clusterName")
|
|
|
|
private String clusterName;
|
|
|
|
|
2022-09-19 11:38:45 +05:30
|
|
|
@JsonProperty("email")
|
|
|
|
private SmtpSettings smtpSettings;
|
|
|
|
|
2021-12-16 07:13:50 -08:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "catalogConfig{"
|
|
|
|
+ ", dataSourceFactory="
|
|
|
|
+ dataSourceFactory
|
|
|
|
+ ", swaggerBundleConfig="
|
|
|
|
+ swaggerBundleConfig
|
|
|
|
+ ", authorizerConfiguration="
|
|
|
|
+ authorizerConfiguration
|
|
|
|
+ '}';
|
|
|
|
}
|
2021-08-01 14:27:44 -07:00
|
|
|
}
|