From 1a9bd5627665b3f90938e53148f73eafa2617201 Mon Sep 17 00:00:00 2001 From: Lukas Brandl Date: Thu, 30 Jan 2020 12:58:59 +0100 Subject: [PATCH] updated warning log --- README.adoc | 4 ++-- .../com/hivemq/extensions/allowall/AllowAllMain.java | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.adoc b/README.adoc index c42ed83..b22d610 100644 --- a/README.adoc +++ b/README.adoc @@ -17,8 +17,8 @@ This Extension allows all MQTT clients to connect to HiveMQ. Using this extension is not secure. -For production usage add an authentication extension and remove the hivemq-allow-all extension. -Authentication extensions can be found in the marketplace (https://www.hivemq.com/extensions/). +For production usage, add an appropriate security extension and remove the hivemq-allow-all extension. +You can download security extensions from the HiveMQ Marketplace (https://www.hivemq.com/extensions/). === Installation diff --git a/src/main/java/com/hivemq/extensions/allowall/AllowAllMain.java b/src/main/java/com/hivemq/extensions/allowall/AllowAllMain.java index cb457ba..11d70f7 100644 --- a/src/main/java/com/hivemq/extensions/allowall/AllowAllMain.java +++ b/src/main/java/com/hivemq/extensions/allowall/AllowAllMain.java @@ -39,11 +39,12 @@ public class AllowAllMain implements ExtensionMain { public void extensionStart(final @NotNull ExtensionStartInput extensionStartInput, final @NotNull ExtensionStartOutput extensionStartOutput) { try { - log.warn("\n#####################################################################################################" + - "\n# This is an insecure deployment. Every MQTT client is fully authorized. #" + - "\n# For production usage add an authentication extension and remove the hivemq-allow-all extension. #" + - "\n# Authentication extensions can be found in the marketplace (https://www.hivemq.com/extensions/). #" + - "\n#####################################################################################################"); + log.warn("\n################################################################################################################" + + "\n# This HiveMQ deployment is not secure! You are lacking Authentication and Authorization. #" + + "\n# Right now any MQTT client can connect to the broker with a full set of permissions. #" + + "\n# For production usage, add an appropriate security extension and remove the hivemq-allow-all extension. #" + + "\n# You can download security extensions from the HiveMQ Marketplace (https://www.hivemq.com/extensions/). #" + + "\n################################################################################################################"); Services.securityRegistry().setAuthenticatorProvider(authenticatorProviderInput -> ALLOW_ALL_AUTHENTICATOR); } catch (final Exception e) {