Skip to content

Commit

Permalink
updated warning log
Browse files Browse the repository at this point in the history
  • Loading branch information
LBrandl committed Jan 30, 2020
1 parent 81d39bc commit 1a9bd56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 6 additions & 5 deletions src/main/java/com/hivemq/extensions/allowall/AllowAllMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1a9bd56

Please sign in to comment.