mirror of
				https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
				synced 2025-11-04 04:27:59 +00:00 
			
		
		
		
	Second Drop of Opensync GW for Cloud, Handling OVSDB and some MQTT messages
This commit is contained in:
		@@ -1,11 +1,11 @@
 | 
			
		||||
package com.telecominfraproject.wlan.opensync.integration;
 | 
			
		||||
package com.telecominfraproject.wlan.opensync.experiment;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.SpringApplication;
 | 
			
		||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 | 
			
		||||
import org.springframework.context.ConfigurableApplicationContext;
 | 
			
		||||
import org.springframework.context.annotation.ComponentScan;
 | 
			
		||||
 | 
			
		||||
@ComponentScan(basePackages = { "com.telecominfraproject.wlan" })
 | 
			
		||||
@ComponentScan(basePackages={"com.telecominfraproject.wlan", "ai.connectus"})
 | 
			
		||||
@EnableAutoConfiguration
 | 
			
		||||
public class OpenSyncGatewayCloudProcess {
 | 
			
		||||
 | 
			
		||||
@@ -10,4 +10,3 @@ keystoreType=pkcs12
 | 
			
		||||
keystoreProvider=SunJSSE
 | 
			
		||||
 | 
			
		||||
sslProtocol=TLS
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@ app.name=OpenSyncManager
 | 
			
		||||
#	 System property -Dspring.profiles.active=production
 | 
			
		||||
#	 or specified on the command line using the switch --spring.profiles.active=dev,hsqldb
 | 
			
		||||
#
 | 
			
		||||
# This does not work: spring.profiles.active=${telecominfraproject.core.server.security},${telecominfraproject.core.server.auth},Extra_${app.name}
 | 
			
		||||
# This does not work: spring.profiles.active=${tip.wlan.core.server.security},${tip.wlan.core.server.auth},Extra_${app.name}
 | 
			
		||||
# Substitution of ${} in application.properties works in general, but not for spring.profiles.active and not for spring.profiles.include properties  
 | 
			
		||||
#
 | 
			
		||||
# *** Do not set spring.profiles.active property in this file, or be prepared for the World of Weird.
 | 
			
		||||
@@ -74,12 +74,13 @@ app.name=OpenSyncManager
 | 
			
		||||
#spring.profiles.include=use_ssl,http_digest_auth,customer-credential-datastore-inmemory
 | 
			
		||||
#spring.profiles.include=no_ssl,no_auth
 | 
			
		||||
#spring.profiles.include=use_ssl,client_certificate_auth
 | 
			
		||||
#spring.profiles.include=use_ssl_with_client_cert_and_basic_auth,client_certificate_and_basic_auth
 | 
			
		||||
spring.profiles.include=use_ssl,http_basic_auth,rest-template-single-user-per-service-digest-auth,use_single_ds,opensync_cloud_config
 | 
			
		||||
spring.profiles.include=use_ssl,use_webtoken_auth,use_single_ds,RestTemplateConfiguration_X509_client_cert_auth,opensync_cloud_config
 | 
			
		||||
#use_ssl_with_client_cert_and_basic_auth,client_certificate_and_basic_auth,rest-template-single-user-per-service-digest-auth,use_single_ds,opensync_cloud_config
 | 
			
		||||
 | 
			
		||||
#used by *-remote client classes when they authenticate their requests
 | 
			
		||||
tip.wlan.httpClientConfig=classpath:httpClientConfig.json
 | 
			
		||||
 | 
			
		||||
tip.wlan.introspectTokenApi.host=localhost:9096
 | 
			
		||||
tip.wlan.introspectTokenApi.clientToken=token_placeholder
 | 
			
		||||
#this user/password is used together with http_digest_auth and http_basic_auth spring profiles
 | 
			
		||||
tip.wlan.serviceUser=user
 | 
			
		||||
tip.wlan.servicePassword=password
 | 
			
		||||
@@ -88,14 +89,11 @@ spring.main.show-banner=false
 | 
			
		||||
server.port=9096
 | 
			
		||||
 | 
			
		||||
#this port is used by secondary server connector, it is protected by digest authentication, while primary server.port is protected by client certificate auth 
 | 
			
		||||
#tip.wlan.secondaryPort=7071
 | 
			
		||||
tip.wlan.secondaryPort=7071
 | 
			
		||||
 | 
			
		||||
#this server only supports REST requests, CSRF would get in the way
 | 
			
		||||
tip.wlan.csrf-enabled=false
 | 
			
		||||
 | 
			
		||||
tip.wlan.emailVerificationTokenExpiryMs=600
 | 
			
		||||
tip.wlan.passwordResetTokenExpiryMs=3600
 | 
			
		||||
 | 
			
		||||
#properties that configure remote interfaces to communicate with cloud
 | 
			
		||||
tip.wlan.cloudEventDispatcherBaseUrl=https://localhost:9031
 | 
			
		||||
tip.wlan.customerServiceBaseUrl=https://localhost:9091
 | 
			
		||||
@@ -103,6 +101,7 @@ tip.wlan.locationServiceBaseUrl=https://localhost:9091
 | 
			
		||||
tip.wlan.equipmentServiceBaseUrl=https://localhost:9091
 | 
			
		||||
tip.wlan.profileServiceBaseUrl=https://localhost:9091
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#server.session-timeout= # session timeout in seconds
 | 
			
		||||
#server.tomcat.max-threads = 0 # number of threads in protocol handler
 | 
			
		||||
 | 
			
		||||
@@ -117,3 +116,7 @@ spring.jackson.serialization.INDENT_OUTPUT=TRUE
 | 
			
		||||
#http.mappers.json-sort-keys=false 
 | 
			
		||||
 | 
			
		||||
#spring.jmx.enabled=true # Expose MBeans from Spring
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,24 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 | 
			
		||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
 | 
			
		||||
    <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
 | 
			
		||||
        <listEntry value="/opensync-gateway-cloud-process/src/main/java/com/telecominfraproject/wlan/opensync/experiment/OpenSyncGatewayCloudProcess.java"/>
 | 
			
		||||
    </listAttribute>
 | 
			
		||||
    <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
 | 
			
		||||
        <listEntry value="1"/>
 | 
			
		||||
    </listAttribute>
 | 
			
		||||
    <booleanAttribute key="org.eclipse.jdt.launching.ATTR_EXCLUDE_TEST_CODE" value="true"/>
 | 
			
		||||
    <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
 | 
			
		||||
    <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
 | 
			
		||||
    <listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
 | 
			
		||||
        <listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-13" path="5" type="4"/>
"/>
 | 
			
		||||
        <listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry path="5" projectName="opensync-gateway-cloud-process" type="1"/>
"/>
 | 
			
		||||
        <listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry containerPath="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" path="5" type="4"/>
"/>
 | 
			
		||||
    </listAttribute>
 | 
			
		||||
    <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
 | 
			
		||||
    <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
 | 
			
		||||
    <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.telecominfraproject.wlan.opensync.experiment.OpenSyncGatewayCloudProcess"/>
 | 
			
		||||
    <listAttribute key="org.eclipse.jdt.launching.MODULEPATH"/>
 | 
			
		||||
    <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="opensync-gateway-cloud-process"/>
 | 
			
		||||
    <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
 | 
			
		||||
    <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="--add-opens java.base/java.lang=ALL-UNNAMED

-Dssl.props=file://${project_loc:opensync-gateway-cloud-process}/src/main/resources/app/certs/ssl.properties
-Dtip.wlan.httpClientConfig=file://${project_loc:opensync-gateway-cloud-process}/src/main/resources/app/certs/httpClientConfig.json

-Djavax.net.ssl.keyStore=${connectus_certs}/client_keystore.jks
-Djavax.net.ssl.keyStorePassword=mypassword
-Djavax.net.ssl.trustStore=${connectus_certs}/truststore.jks
-Djavax.net.ssl.trustStorePassword=mypassword

-Dconnectus.ovsdb.managerAddr=${local_server_address}
-Dconnectus.ovsdb.listenPort=6640
-Dconnectus.ovsdb.redirector.listenPort=6643
-Dconnectus.ovsdb.timeoutSec=30
-Dconnectus.ovsdb.trustStore=${connectus_certs}/truststore.jks
-Dconnectus.ovsdb.keyStore=${connectus_certs}/server.pkcs12

-Dconnectus.ovsdb.configFileName=${project_loc:opensync-ext-cloud}/src/main/resources/config_2_ssids.json

-Dconnectus.mqttBroker.address=${local_server_address}
-Dconnectus.mqttBroker.listenPort=1883
-Dtip.wlan.introspectTokenApi.host=localhost:9096
-Dtip.wlan.introspectTokenApi.clientToken=token_placeholder
-Dtip.wlan.serviceUser=user
-Dtip.wlan.servicePassword=password

-Dspring.main.show-banner=false
-Dserver.port=9096

-Dtip.wlan.secondaryPort=7071

-Dtip.wlan.csrf-enabled=false
-Dspring.profiles.include=use_ssl,use_webtoken_auth,use_single_ds,RestTemplateConfiguration_X509_client_cert_auth,opensync_cloud_config,mqtt_receiver,ovsdb_redirector,ovsdb_manager
-Dtip.wlan.cloudEventDispatcherBaseUrl=https://localhost:9031
-Dtip.wlan.customerServiceBaseUrl=https://localhost:9091
-Dtip.wlan.locationServiceBaseUrl=https://localhost:9091
-Dtip.wlan.equipmentServiceBaseUrl=https://localhost:9091
-Dtip.wlan.profileServiceBaseUrl=https://localhost:9091"/>
 | 
			
		||||
</launchConfiguration>
 | 
			
		||||
@@ -1,27 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 | 
			
		||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
 | 
			
		||||
    <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
 | 
			
		||||
        <listEntry value="/opensync-gateway-cloud-process/src/main/java/com/telecominfraproject/wlan/opensync/integration/OpenSyncGatewayCloudProcess.java"/>
 | 
			
		||||
    </listAttribute>
 | 
			
		||||
    <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
 | 
			
		||||
        <listEntry value="1"/>
 | 
			
		||||
    </listAttribute>
 | 
			
		||||
    <booleanAttribute key="org.eclipse.jdt.launching.ATTR_EXCLUDE_TEST_CODE" value="true"/>
 | 
			
		||||
    <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
 | 
			
		||||
    <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
 | 
			
		||||
    <listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
 | 
			
		||||
        <listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry path="5" projectName="cloud-event-dispatcher-remote" type="1"/>
"/>
 | 
			
		||||
        <listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry path="5" projectName="opensync-ext-cloud" type="1"/>
"/>
 | 
			
		||||
        <listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry path="5" projectName="opensync-gateway-cloud-process" type="1"/>
"/>
 | 
			
		||||
        <listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry containerPath="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" path="5" type="4"/>
"/>
 | 
			
		||||
    </listAttribute>
 | 
			
		||||
    <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
 | 
			
		||||
    <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
 | 
			
		||||
    <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.telecominfraproject.wlan.opensync.integration.OpenSyncGatewayCloudProcess"/>
 | 
			
		||||
    <listAttribute key="org.eclipse.jdt.launching.MODULEPATH">
 | 
			
		||||
        <listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11" path="4" type="4"/>
"/>
 | 
			
		||||
    </listAttribute>
 | 
			
		||||
    <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="opensync-gateway-cloud-process"/>
 | 
			
		||||
    <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
 | 
			
		||||
    <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dssl.props=file://${project_loc:opensync-gateway-cloud-process}/src/main/resources/app/certs/ssl.properties

-Dspring.main.show-banner=false
-Dtip.wlan.httpClientConfig=file://${project_loc:opensync-gateway-cloud-process}/src/main/resources/app/certs/httpClientConfig.json
-Djavax.net.ssl.keyStore=${wlan_cloud_certs}/client_keystore.jks
-Djavax.net.ssl.keyStorePassword=mypassword
-Djavax.net.ssl.trustStore=${wlan_cloud_certs}/truststore.jks
-Djavax.net.ssl.trustStorePassword=mypassword

-Dconnectus.ovsdb.managerAddr=${local_server_address}
-Dconnectus.ovsdb.listenPort=6640
-Dconnectus.ovsdb.redirector.listenPort=6643
-Dconnectus.ovsdb.timeoutSec=30
-Dconnectus.ovsdb.trustStore=${wlan_cloud_certs}/truststore.jks
-Dconnectus.ovsdb.keyStore=${wlan_cloud_certs}/server.pkcs12

-Dconnectus.mqttBroker.address=${local_server_address}
-Dconnectus.mqttBroker.listenPort=1883

-Dspring.profiles.include=ovsdb_redirector,ovsdb_manager,mqtt_receiver
-Dtip.wlan.customerServiceBaseUrl=https://localhost:9091
-Dtip.wlan.locationServiceBaseUrl=https://localhost:9091
-Dtip.wlan.equipmentServiceBaseUrl=https://localhost:9091
-Dtip.wlan.profileServiceBaseUrl=https://localhost:9091
-Dtip.wlan.cloudEventDispatcherBaseUrl=https://localhost:9031"/>
 | 
			
		||||
</launchConfiguration>
 | 
			
		||||
		Reference in New Issue
	
	Block a user