From dec761b8828cd4f9d2642b084edeea12f180714a Mon Sep 17 00:00:00 2001 From: solley Date: Fri, 18 Mar 2022 17:47:47 +0800 Subject: [PATCH] add(ssl): add ssl cert config --- .flattened-pom.xml | 4 +-- .idea/compiler.xml | 4 +-- distribution/.flattened-pom.xml | 8 ++--- distribution/conf/application.properties | 3 +- distribution/conf/cert/mmq.cer | 22 ++++++++++++++ distribution/conf/cert/mmq.key | 28 ++++++++++++++++++ .../conf/cert}/mmq.pfx | Bin mmq-api/.flattened-pom.xml | 4 +-- mmq-auth/.flattened-pom.xml | 8 ++--- mmq-broker/.flattened-pom.xml | 10 +++---- .../monkey/mmq/config/BrokerProperties.java | 22 ++++++-------- .../monkey/mmq/protocol/SSLBrokerServer.java | 12 ++++++-- .../src/main/resources/application.properties | 1 + mmq-broker/src/main/resources/cert/mmq.cer | 22 ++++++++++++++ mmq-broker/src/main/resources/cert/mmq.key | 28 ++++++++++++++++++ mmq-broker/src/main/resources/cert/mmq.pfx | Bin 0 -> 2533 bytes mmq-config/.flattened-pom.xml | 8 ++--- mmq-core/.flattened-pom.xml | 4 +-- mmq-core/src/main/resources/banner.txt | 6 ++-- mmq-device/.flattened-pom.xml | 4 +-- mmq-rule-engine/.flattened-pom.xml | 4 +-- mmq-web/.flattened-pom.xml | 8 ++--- .../src/main/resources/application.properties | 5 ++-- pom.xml | 2 +- 24 files changed, 161 insertions(+), 56 deletions(-) create mode 100644 distribution/conf/cert/mmq.cer create mode 100644 distribution/conf/cert/mmq.key rename {mmq-broker/src/main/resources/keystore => distribution/conf/cert}/mmq.pfx (100%) create mode 100644 mmq-broker/src/main/resources/cert/mmq.cer create mode 100644 mmq-broker/src/main/resources/cert/mmq.key create mode 100644 mmq-broker/src/main/resources/cert/mmq.pfx diff --git a/.flattened-pom.xml b/.flattened-pom.xml index a18a567..255e190 100644 --- a/.flattened-pom.xml +++ b/.flattened-pom.xml @@ -19,7 +19,7 @@ 4.0.0 org.monkey.mmq mmq - 1.1.0 + 1.1.1 pom Monkey mmq ${project.version} Top mmq project pom.xml file @@ -114,7 +114,7 @@ 2.20 3.0 2.1.6.RELEASE - 1.1.0 + 1.1.1 diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 093f78f..c5fc5f6 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -6,13 +6,13 @@ - + - + diff --git a/distribution/.flattened-pom.xml b/distribution/.flattened-pom.xml index 3e72a94..7c70804 100644 --- a/distribution/.flattened-pom.xml +++ b/distribution/.flattened-pom.xml @@ -5,11 +5,11 @@ org.monkey.mmq mmq - 1.1.0 + 1.1.1 org.monkey.mmq distribution - 1.1.0 + 1.1.1 pom distribution ${project.version} @@ -23,7 +23,7 @@ org.monkey.mmq mmq-broker - 1.1.0 + 1.1.1 compile @@ -81,7 +81,7 @@ org.monkey.mmq mmq-web - 1.1.0 + 1.1.1 compile diff --git a/distribution/conf/application.properties b/distribution/conf/application.properties index 2a0dc4c..3dcb9ab 100644 --- a/distribution/conf/application.properties +++ b/distribution/conf/application.properties @@ -24,7 +24,8 @@ server.port=8888 mmq.broker.websocketPort=2883 mmq.broker.port=3883 mmq.broker.ssl.password=mmq@123 -mmq.broker.ssl.port=3663 +mmq.broker.ssl.certPath=cert/mmq.pfx +mmq.broker.ssl.port=1663 mmq.broker.ssl.websocketPort=2663 mmq.broker.default.user=admin mmq.broker.default.password=admin@mmq diff --git a/distribution/conf/cert/mmq.cer b/distribution/conf/cert/mmq.cer new file mode 100644 index 0000000..d5f0dda --- /dev/null +++ b/distribution/conf/cert/mmq.cer @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDozCCAougAwIBAgIUUJo/Ll3YJtLB6UDKoZ9H3k1BAQYwDQYJKoZIhvcNAQEL +BQAwYTELMAkGA1UEBhMCQ04xEDAOBgNVBAgMB1FpbmdkYW8xEDAOBgNVBAcMB1Fp +bmdkYW8xDzANBgNVBAoMBk1vbmtleTEPMA0GA1UECwwGTW9ua2V5MQwwCgYDVQQD +DANtb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----END CERTIFICATE----- diff --git a/distribution/conf/cert/mmq.key b/distribution/conf/cert/mmq.key new file mode 100644 index 0000000..9de8ac5 --- /dev/null +++ b/distribution/conf/cert/mmq.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDbOc4SaMJW0JRz +IFSHPIVFVwqArvDJhzovtAzBm96Cr0HYy0v3gyObmTQISiugms9BTM2L1js5kBF0 +uegTFvMAdVlo+iH2/Dfh4+vcDgFPO4/PatotQV/rmiIuE/1RixlOFdvqnlJvl9u7 +htrSi6NLIjR7L8TNhRlKYm+EDfjnuliQdnjul6xI0Zjk4Ud/GLoUru9oUTv3s3zZ +4pUEGBZ1TX8qAJoMbmXAsoPMQ3dDbda+DqEcKH4Varap0z9FpZx6KWDoZqIcREn/ +vAylGywduxXIKxVCbJ5Fhh44dNOXTaNHV51pej+ZTonvG4Re8LIlAXMsOwdxQgDl +z7FQyI+/AgMBAAECggEBAJX/CiGMbhQKaNgQseVKIoGcGYKMsBGjpctH7UZ3SJqw +IWSdTOAQaUeoXnKhlRIxekdarnTUYvdyvI7aOJD/LcsNf9yU8LJWRkIXuaR6LKky +vqYTnS5DwcapUmOmp7eobesAh9US+KKEDANWNNjEVDkvMStsNsLMI87CZTy8dqbN +lGWXkhoE2qmO622kWNZmUpWLt0trNt3eCgVni6yyepgdsg762g+yKMSqkrjI2nh8 +fPrFpoe8Az62EqIpvOz41t7TzlLyu+/l60lDZlgT+Uxx/hQ+R2UHHzx3Ri+Kgk+D +zsrOvSO10ZJ2qtHRsUOZhgay8VqQ4OZkDdSciARtB8kCgYEA7ecpXmAE1wXEHe6H +Y/DzcxbLuHpbFaK6xCsGzyrHPVBUUZR0dfrsvoqm+u44sFleSw1iyaSxA8TNltcL +4cYHojOVhjEu5JQlmh5YU5orjOklzkrjonFJJHRUDvjG5j//bE0bBL2iN2fkL/7j +4sfHXn6dg8qtaV4RwxH84JHJbxMCgYEA6+buQVFuBdlxcLp8uQwKeS5MdkbJMHKq +OPOh3wBqklNqN2rCLsCrrMdIGBmVle255sD9Z8FZq8BQwJJw9UUT5jFwUf8bHC26 +qFOIV82i0kscApXaxGXOJwVhEHLeW6Dn88osv5H7aNE425x2Y/QrQLqW1jZua6an +XBw2WuH8tiUCgYEAsVE9TUFF+joq/aA+u2fpHFveRca0wwCCMhpbveeFjxajchaz +Ywg+kppncNpD2HUTyd7VRbQB1+xEy+vGyGXAZM4L4XQhHm+pQyDg9pcPZLyV2BeL +aRUEzi4CRRJ5tT34E/G4dKUfFirSMk/J7Mq4t56pqoRTEhjyJjHvCDbBK48CgYBa +/g2CtmUo7nG6WMSJICLeEUS/DpjGDkSoiRk0ClYRMQm0bIKQRBM0Jv4hBaVUWokt +f91+6u6quBit3w6hHM8LKKC5kBwl52GrUeUycQhP81bPjHwA63/0Pzfsf1JTp6Iw +wBg4oJeIG8PBuf1UmrcgVZie8gnvji3Z8qvorGis3QKBgHlw4CyOATXWHA/HPa8S +LEa8jgbXcLBZIjUEASYYVJGDcwsJtgL6FuTt0t0CvNrbv+0s7PkVX899ROtdmiQ0 +KZVNjx3MR1bflhnTix40JSntdDpNmD0tmdXe3k9POdIddwa+HURwcTQnSsqE+u6W +haHxZbOfq2BOo6ASJYYFVl6y +-----END PRIVATE KEY----- diff --git a/mmq-broker/src/main/resources/keystore/mmq.pfx b/distribution/conf/cert/mmq.pfx similarity index 100% rename from mmq-broker/src/main/resources/keystore/mmq.pfx rename to distribution/conf/cert/mmq.pfx diff --git a/mmq-api/.flattened-pom.xml b/mmq-api/.flattened-pom.xml index df3f724..593aa51 100644 --- a/mmq-api/.flattened-pom.xml +++ b/mmq-api/.flattened-pom.xml @@ -5,11 +5,11 @@ org.monkey.mmq mmq - 1.1.0 + 1.1.1 org.monkey.mmq mmq-api - 1.1.0 + 1.1.1 Apache License, Version 2.0 diff --git a/mmq-auth/.flattened-pom.xml b/mmq-auth/.flattened-pom.xml index 49ae91e..f805ab4 100644 --- a/mmq-auth/.flattened-pom.xml +++ b/mmq-auth/.flattened-pom.xml @@ -20,11 +20,11 @@ org.monkey.mmq mmq - 1.1.0 + 1.1.1 org.monkey.mmq mmq-auth - 1.1.0 + 1.1.1 Apache License, Version 2.0 @@ -36,13 +36,13 @@ org.monkey.mmq mmq-core - 1.1.0 + 1.1.1 compile org.monkey.mmq mmq-config - 1.1.0 + 1.1.1 compile diff --git a/mmq-broker/.flattened-pom.xml b/mmq-broker/.flattened-pom.xml index 9fe387a..da7cc51 100644 --- a/mmq-broker/.flattened-pom.xml +++ b/mmq-broker/.flattened-pom.xml @@ -20,11 +20,11 @@ org.monkey.mmq mmq - 1.1.0 + 1.1.1 org.monkey.mmq mmq-broker - 1.1.0 + 1.1.1 Apache License, Version 2.0 @@ -64,19 +64,19 @@ org.monkey.mmq mmq-core - 1.1.0 + 1.1.1 compile org.monkey.mmq mmq-auth - 1.1.0 + 1.1.1 compile org.monkey.mmq mmq-config - 1.1.0 + 1.1.1 compile diff --git a/mmq-broker/src/main/java/org/monkey/mmq/config/BrokerProperties.java b/mmq-broker/src/main/java/org/monkey/mmq/config/BrokerProperties.java index 65e277a..647c575 100644 --- a/mmq-broker/src/main/java/org/monkey/mmq/config/BrokerProperties.java +++ b/mmq-broker/src/main/java/org/monkey/mmq/config/BrokerProperties.java @@ -41,20 +41,16 @@ public class BrokerProperties { private static final String MMQ_BROKER_WEBSOCKET_SSL_PROPERTY = "mmq.broker.ssl.websocketPort"; private static final String DEFAULT_MMQ_BROKER_SSL_WEBSOCKET = "2663"; - /** - * WebSocket Path值, 默认值 /mqtt - */ - private String websocketPath = "/mqtt"; + private static final String MMQ_BROKER_SSL_PASSWORD = "mmq.broker.ssl.password"; + private static final String DEFAULT_MMQ_BROKER_SSL_PASSWORD = "mmq"; - /** - * SSL密钥文件密码 - */ - private String sslPassword = "mmq"; + private static final String MMQ_BROKER_SSL_CERT_PATH = "mmq.broker.ssl.certPath"; + private static final String DEFAULT_MMQ_BROKER_SSL_CERT_PATH = "cert/mmq.pfx"; /** - * SSL是否启用 + * WebSocket Path值, 默认值 /mqtt */ - private boolean sslEnabled = false; + private String websocketPath = "/mqtt"; /** * 心跳时间(秒), 默认60秒, 该值可被客户端连接时相应配置覆盖 @@ -97,11 +93,11 @@ public String getWebsocketPath() { } public String getSslPassword() { - return sslPassword; + return EnvUtil.getProperty(MMQ_BROKER_SSL_PASSWORD, DEFAULT_MMQ_BROKER_SSL_PASSWORD); } - public boolean getSslEnabled() { - return sslEnabled; + public String getSslCertPath() { + return EnvUtil.getProperty(MMQ_BROKER_SSL_CERT_PATH, DEFAULT_MMQ_BROKER_SSL_CERT_PATH); } public int getKeepAlive() { diff --git a/mmq-broker/src/main/java/org/monkey/mmq/protocol/SSLBrokerServer.java b/mmq-broker/src/main/java/org/monkey/mmq/protocol/SSLBrokerServer.java index 5f6bbba..9ee4392 100644 --- a/mmq-broker/src/main/java/org/monkey/mmq/protocol/SSLBrokerServer.java +++ b/mmq-broker/src/main/java/org/monkey/mmq/protocol/SSLBrokerServer.java @@ -89,7 +89,7 @@ public void start() throws Exception { bossGroup = brokerProperties.isUseEpoll() ? new EpollEventLoopGroup() : new NioEventLoopGroup(); workerGroup = brokerProperties.isUseEpoll() ? new EpollEventLoopGroup() : new NioEventLoopGroup(); KeyStore keyStore = KeyStore.getInstance("PKCS12"); - InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("keystore/mmq.pfx"); + InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(brokerProperties.getSslCertPath()); keyStore.load(inputStream, brokerProperties.getSslPassword().toCharArray()); KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); kmf.init(keyStore, brokerProperties.getSslPassword().toCharArray()); @@ -101,7 +101,7 @@ public void start() throws Exception { @PreDestroy public void stop() { - LoggerUtils.printIfInfoEnabled(Loggers.BROKER_PROTOCOL,"Shutdown {} MQTT Broker ...", "[" +id + "]"); + LoggerUtils.printIfInfoEnabled(Loggers.BROKER_PROTOCOL,"Shutdown {} MQTT SSL Broker ...", "[" +id + "]"); bossGroup.shutdownGracefully(); bossGroup = null; workerGroup.shutdownGracefully(); @@ -110,7 +110,7 @@ public void stop() { channel = null; websocketChannel.closeFuture().syncUninterruptibly(); websocketChannel = null; - LoggerUtils.printIfInfoEnabled(Loggers.BROKER_PROTOCOL,"MQTT Broker {} shutdown finish.", "[" + id + "]"); + LoggerUtils.printIfInfoEnabled(Loggers.BROKER_PROTOCOL,"MQTT SSL Broker {} shutdown finish.", "[" + id + "]"); } private void mqttServer() throws Exception { @@ -133,6 +133,9 @@ protected void initChannel(SocketChannel socketChannel) throws Exception { sslEngine.setNeedClientAuth(false); // 不需要验证客户端 sslEngine.setEnabledCipherSuites(new String[]{ "TLS_RSA_WITH_AES_256_CBC_SHA256", + "SSL_RSA_WITH_RC4_128_MD5", + "SSL_RSA_WITH_RC4_128_SHA", + "TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" }); @@ -171,6 +174,9 @@ protected void initChannel(SocketChannel socketChannel) throws Exception { sslEngine.setNeedClientAuth(false); // 不需要验证客户端 sslEngine.setEnabledCipherSuites(new String[]{ "TLS_RSA_WITH_AES_256_CBC_SHA256", + "SSL_RSA_WITH_RC4_128_MD5", + "SSL_RSA_WITH_RC4_128_SHA", + "TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" }); diff --git a/mmq-broker/src/main/resources/application.properties b/mmq-broker/src/main/resources/application.properties index a5ccfb3..20d2315 100644 --- a/mmq-broker/src/main/resources/application.properties +++ b/mmq-broker/src/main/resources/application.properties @@ -24,6 +24,7 @@ server.port=8888 mmq.broker.websocketPort=2883 mmq.broker.port=3883 mmq.broker.ssl.password=mmq +mmq.broker.ssl.certPath=cert/mmq.pfx mmq.broker.ssl.port=3663 mmq.broker.ssl.websocketPort=2663 mmq.broker.default.user=admin diff --git a/mmq-broker/src/main/resources/cert/mmq.cer b/mmq-broker/src/main/resources/cert/mmq.cer new file mode 100644 index 0000000..d5f0dda --- /dev/null +++ b/mmq-broker/src/main/resources/cert/mmq.cer @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDozCCAougAwIBAgIUUJo/Ll3YJtLB6UDKoZ9H3k1BAQYwDQYJKoZIhvcNAQEL +BQAwYTELMAkGA1UEBhMCQ04xEDAOBgNVBAgMB1FpbmdkYW8xEDAOBgNVBAcMB1Fp +bmdkYW8xDzANBgNVBAoMBk1vbmtleTEPMA0GA1UECwwGTW9ua2V5MQwwCgYDVQQD +DANtbXEwHhcNMjExMjE0MTUyODQyWhcNMjIxMjE0MTUyODQyWjBhMQswCQYDVQQG +EwJDTjEQMA4GA1UECAwHUWluZ2RhbzEQMA4GA1UEBwwHUWluZ2RhbzEPMA0GA1UE +CgwGTW9ua2V5MQ8wDQYDVQQLDAZNb25rZXkxDDAKBgNVBAMMA21tcTCCASIwDQYJ +KoZIhvcNAQEBBQADggEPADCCAQoCggEBANs5zhJowlbQlHMgVIc8hUVXCoCu8MmH +Oi+0DMGb3oKvQdjLS/eDI5uZNAhKK6Caz0FMzYvWOzmQEXS56BMW8wB1WWj6Ifb8 +N+Hj69wOAU87j89q2i1BX+uaIi4T/VGLGU4V2+qeUm+X27uG2tKLo0siNHsvxM2F +GUpib4QN+Oe6WJB2eO6XrEjRmOThR38YuhSu72hRO/ezfNnilQQYFnVNfyoAmgxu +ZcCyg8xDd0Nt1r4OoRwofhVqtqnTP0WlnHopYOhmohxESf+8DKUbLB27FcgrFUJs +nkWGHjh005dNo0dXnWl6P5lOie8bhF7wsiUBcyw7B3FCAOXPsVDIj78CAwEAAaNT +MFEwHQYDVR0OBBYEFNfgQ7dJ0JGkvvMF4Roi5Qq870hgMB8GA1UdIwQYMBaAFNfg +Q7dJ0JGkvvMF4Roi5Qq870hgMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEL +BQADggEBACnWx9DpFhyVXgWhm4/ttXNryo5wUD1AREiuP929V25pva6NfEvmlBoe +J3/KrExIK3c6dIdSaf+fVjHtXf32kROvVOV2BsRcMScJuhRS2e50rkeWjfwlqEU4 +ERsNmObjpIMBg9Zn4v0TaByzJ+sS7tDVhPPcAnw+PuF5wJJX2dXOuQJKeFlVIxf5 +75yNggRTot07L3a4S+DDsSEkv0sX4OyDRl7EySNDy6+aq9QgUZNBj57X8PMdZXOq +xc5dOVsoS+55nxqhQ9vF4YC2UKnxi0kNBAjTKipAQvqst8DilBIrS/LX8Dimqo0a +obZtPSgMsMTpQLt+5pRhymh3UKoZ/CI= +-----END CERTIFICATE----- diff --git a/mmq-broker/src/main/resources/cert/mmq.key b/mmq-broker/src/main/resources/cert/mmq.key new file mode 100644 index 0000000..9de8ac5 --- /dev/null +++ b/mmq-broker/src/main/resources/cert/mmq.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDbOc4SaMJW0JRz +IFSHPIVFVwqArvDJhzovtAzBm96Cr0HYy0v3gyObmTQISiugms9BTM2L1js5kBF0 +uegTFvMAdVlo+iH2/Dfh4+vcDgFPO4/PatotQV/rmiIuE/1RixlOFdvqnlJvl9u7 +htrSi6NLIjR7L8TNhRlKYm+EDfjnuliQdnjul6xI0Zjk4Ud/GLoUru9oUTv3s3zZ +4pUEGBZ1TX8qAJoMbmXAsoPMQ3dDbda+DqEcKH4Varap0z9FpZx6KWDoZqIcREn/ +vAylGywduxXIKxVCbJ5Fhh44dNOXTaNHV51pej+ZTonvG4Re8LIlAXMsOwdxQgDl +z7FQyI+/AgMBAAECggEBAJX/CiGMbhQKaNgQseVKIoGcGYKMsBGjpctH7UZ3SJqw +IWSdTOAQaUeoXnKhlRIxekdarnTUYvdyvI7aOJD/LcsNf9yU8LJ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NmD0tmdXe3k9POdIddwa+HURwcTQnSsqE+u6W +haHxZbOfq2BOo6ASJYYFVl6y +-----END PRIVATE KEY----- diff --git a/mmq-broker/src/main/resources/cert/mmq.pfx b/mmq-broker/src/main/resources/cert/mmq.pfx new file mode 100644 index 0000000000000000000000000000000000000000..83ccbd68edf822193bd294d870fc8fb4236c9eaf GIT binary patch literal 2533 zcmY+^cQhM}8U}EQ2(f4FJ!&Ubi`c7FnxcqVwMT<$sYrcVF+OS(snJxe_N%SxGg7r` z#i(7YrKnA-Qbm#)SI@cke)s7RNx{UNc$|(1On*Jp2|NB044%v{`Uea01RUXG5vIns|*c&*EH_n|UWfrOJfU_q$ zBv`Kr+{q59067WGp^4*5Ln(E-^YgTo9H@fZizqb zawEk)kFTslm8D&M9=!2Xw=h||p#-XD!wIr~4`Kxw&G;|T&DE9(@+4E&-tvOkb zhcsSG1@4$1ml?P-Zbp8~(SHRkFReLF$zn~cN)X02C(J8VB(9qT96S@E>jM~*7$bi1 zgqbRd7u8sSDi^SQnL`w&T2h~nV(JY-jr{yu&}cJ)nVDi4qK7%KdbO;z8`YzNMRqOr z_O0`@jDIX_qJQ+`=fJ+5xA-wE2jkw6Xks$obz&F0sA*F32O@gZ{lj*^BMT^)NR z1A7vVeiUgCN|Nm~3N5ILN(Tfa_EvykxZJ4v?srN(g+Eb+&|Hhm&5eF4Gv;6`DgLzp zo>-G^TW?pH(c7yQw>#O>U?3=882WB(4MEgvZ4~14c@^}qS)58@t<$>9=afAnqKWIe zHPm5k8ba;Hz5}7tFjwB}wP^Y{|Y4YlP$yXV|ch0YP%5ncof|C?t z+fwT)LFB2@Mq`W;hGa1|i8KPk;no(mA0UHN`&~#kf1YI~ErA|6{bJRtzzr?TzufNJ z)mdEO&+s^;Sr0DKQ_FSYf1?KY%UCJW+oaq)?}+G`VJ&MzQ5Y~obdCX_%lBw_X~{19 z3%|Nis)|Dlnh`D@+|oqtsEclEk=vdu+YG)2u-Ud+sWTL;yM9F`WpFOs>4s-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54@(d6@~55KLw#26+@@7PfvwOw)(caA=6_b z^Ft@n8p-F=|Heo5+Zp#a#5vDi#~IUrLcIxw1JimY-T`V2>-e;>Q*7n1uqvHH6XgQa z&GAEylf^l`AHCC~uJ5_S7*xoh<)q~FO@;WWg$q&~mVT18ouO4#y}bgGL!U1L>E8(3 zNRXQjZ6u3>&?3rHKn+4mGS%_@dIv1~{-cNB3S#|yk(0a%Pw*mhEgsG`647O;66TyD zk#%ylTL+S3hXsAnIhBp-52p}v@s4Gyj3Z0--dzM-7X<6$Xx zMRFJsFX^XFMVlObQuA!x9GfvgII!RY_oN-NT>C3%o8^iu@8)kk)2MoE56@icr(Yh? zFKgzeTvl@a{ucB3j*rzv@O1StSa>rOMmHM|?G0kqeUDq$U-2HkBGjL7JGI0dQ?1JN z{zs?xPP!1$4a%l^%IdNlKc8;VPR91a5cOiOJ*t@h^5|~a34PPIWlq+=KHG3{P^rhN zE6HU)Y!WaBS!_Y7$-<=nt0RO@?Hq`g%8C6J*;a3b6B*4OdF3H?JN}3trUsLQLBI@3 s?DRk(209S$%42qd2Q47eH64p@EPUBkFi3F#F#%NzFu7vFp1+m+7b(%PlmGw# literal 0 HcmV?d00001 diff --git a/mmq-config/.flattened-pom.xml b/mmq-config/.flattened-pom.xml index b97f329..79bba9a 100644 --- a/mmq-config/.flattened-pom.xml +++ b/mmq-config/.flattened-pom.xml @@ -5,11 +5,11 @@ org.monkey.mmq mmq - 1.1.0 + 1.1.1 org.monkey.mmq mmq-config - 1.1.0 + 1.1.1 Apache License, Version 2.0 @@ -21,7 +21,7 @@ org.monkey.mmq mmq-core - 1.1.0 + 1.1.1 compile @@ -75,7 +75,7 @@ org.monkey.mmq mmq-rule-engine - 1.1.0 + 1.1.1 compile diff --git a/mmq-core/.flattened-pom.xml b/mmq-core/.flattened-pom.xml index d03060d..632d528 100644 --- a/mmq-core/.flattened-pom.xml +++ b/mmq-core/.flattened-pom.xml @@ -20,11 +20,11 @@ org.monkey.mmq mmq - 1.1.0 + 1.1.1 org.monkey.mmq mmq-core - 1.1.0 + 1.1.1 Apache License, Version 2.0 diff --git a/mmq-core/src/main/resources/banner.txt b/mmq-core/src/main/resources/banner.txt index 8f5ad64..f8d1d24 100644 --- a/mmq-core/src/main/resources/banner.txt +++ b/mmq-core/src/main/resources/banner.txt @@ -8,9 +8,9 @@ | | / | | ||| | ,', | |,. ; |: | Console: http://${mmq.local.ip}:${server.port}/dashboard/monitor ' | : | : |,| | / | |--' ' . \ | MQTT Port: ${mmq.broker.port} ; . | ; |--' | : | | , \ `. | MQTT WebsocketPort: ${mmq.broker.websocketPort} -| : | | , | : | |/ `--'""| | User Home: ${mmq.home} -| : ' |/ | | |`-' | | | -; | |`-' | ;/ | | : +| : | | , | : | |/ `--'""| | MQTT SSL Port: ${mmq.broker.ssl.port} +| : ' |/ | | |`-' | | | MQTT SSL WebsocketPort: ${mmq.broker.ssl.websocketPort} +; | |`-' | ;/ | | : User Home: ${mmq.home} | ;/ '---' `---'.| '---' `---` \ No newline at end of file diff --git a/mmq-device/.flattened-pom.xml b/mmq-device/.flattened-pom.xml index 7e6b5ef..d298dd6 100644 --- a/mmq-device/.flattened-pom.xml +++ b/mmq-device/.flattened-pom.xml @@ -5,11 +5,11 @@ org.monkey.mmq mmq - 1.1.0 + 1.1.1 org.monkey.mmq mmq-device - 1.1.0 + 1.1.1 Apache License, Version 2.0 diff --git a/mmq-rule-engine/.flattened-pom.xml b/mmq-rule-engine/.flattened-pom.xml index 40dc12f..d3ecb7c 100644 --- a/mmq-rule-engine/.flattened-pom.xml +++ b/mmq-rule-engine/.flattened-pom.xml @@ -20,11 +20,11 @@ org.monkey.mmq mmq - 1.1.0 + 1.1.1 org.monkey.mmq mmq-rule-engine - 1.1.0 + 1.1.1 Apache License, Version 2.0 diff --git a/mmq-web/.flattened-pom.xml b/mmq-web/.flattened-pom.xml index 3568fbd..54eb1e0 100644 --- a/mmq-web/.flattened-pom.xml +++ b/mmq-web/.flattened-pom.xml @@ -5,11 +5,11 @@ org.monkey.mmq mmq - 1.1.0 + 1.1.1 org.monkey.mmq mmq-web - 1.1.0 + 1.1.1 Apache License, Version 2.0 @@ -24,13 +24,13 @@ org.monkey.mmq mmq-broker - 1.1.0 + 1.1.1 compile org.monkey.mmq mmq-auth - 1.1.0 + 1.1.1 compile diff --git a/mmq-web/src/main/resources/application.properties b/mmq-web/src/main/resources/application.properties index c2beafd..a8b4479 100644 --- a/mmq-web/src/main/resources/application.properties +++ b/mmq-web/src/main/resources/application.properties @@ -24,8 +24,9 @@ server.port=8888 mmq.broker.websocketPort=2883 mmq.broker.port=1883 mmq.broker.ssl.password=mmq -mmq.broker.ssl.port=3663 -mmq.broker.ssl.websocketPort=2663 +mmq.broker.ssl.certPath=cert/mmq.pfx +mmq.broker.ssl.port=17733 +mmq.broker.ssl.websocketPort=26633 mmq.broker.default.user=admin mmq.broker.default.password=admin@mmq mmq.broker.default.anonymous=true diff --git a/pom.xml b/pom.xml index 9718d9c..fc1f548 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ - 1.1.0 + 1.1.1 UTF-8 UTF-8