How to create an Authentication plugin (interceptop) for ActiveMQ (for MQTT) that uses a JWT (JWS) to...

Multi tool use
I basically need a controlled MQTT broker.
I need to create authentication and authorization system for MQTT broker made with Embedded ActiveMQ. It will check forI want to use Java (Spring Boot).
I want to disable automatic topic creation. I will manually create then from Java code.
I want to authorize a user to connect to a topic, whether it is to publish or subscribe. Everything in run-time.
I have read about plugins from activemq site. But don't get the full extent, how to create a plugin to authorize for individual topics. I need to be able to modify my whitelist in run time.
java spring spring-boot activemq mqtt
add a comment |
I basically need a controlled MQTT broker.
I need to create authentication and authorization system for MQTT broker made with Embedded ActiveMQ. It will check forI want to use Java (Spring Boot).
I want to disable automatic topic creation. I will manually create then from Java code.
I want to authorize a user to connect to a topic, whether it is to publish or subscribe. Everything in run-time.
I have read about plugins from activemq site. But don't get the full extent, how to create a plugin to authorize for individual topics. I need to be able to modify my whitelist in run time.
java spring spring-boot activemq mqtt
1
Your title mentions JWT (JWS) but the question doesn't mention anything about it. What is the role of JWT (JWS) here? Also, why do you need to create a custom plugin for authorization rather than just using the built-in authorization functionality to grantread
andwrite
permissions on the necessary topics?
– Justin Bertram
Dec 27 at 22:38
The topics have to be created in a controlled manner by the server application. No preloaded topic. And I need to assign some topics to some users. All programatically. I was thinking about giving a user a JWS instead of using MQTT standard Username/Password field and use DB. As I do not want to access DB for each Publush/Subscribe. I was thinking about putting that JWS in Username field and use a custom plugin. The request to create topic and sharing of JWS is done using another channel based on simple HTTPS request.
– S. Das
2 days ago
I can also do with any other broker (preferablly embeddable). But it needs to be free. HiveMQ has similar type of authorization, what I am thinking about ( hivemq.com/blog/mqtt-security-fundamentals-authorization ). But it is not free for production.
– S. Das
2 days ago
Are you asking about the ActiveMQ 5.x broker or the newer ActiveMQ Artemis broker?
– Justin Bertram
2 days ago
I am asking for ActiveMQ broker. But I have no problem switching to ActiveMQ Artemis or any other free to use broker.
– S. Das
yesterday
add a comment |
I basically need a controlled MQTT broker.
I need to create authentication and authorization system for MQTT broker made with Embedded ActiveMQ. It will check forI want to use Java (Spring Boot).
I want to disable automatic topic creation. I will manually create then from Java code.
I want to authorize a user to connect to a topic, whether it is to publish or subscribe. Everything in run-time.
I have read about plugins from activemq site. But don't get the full extent, how to create a plugin to authorize for individual topics. I need to be able to modify my whitelist in run time.
java spring spring-boot activemq mqtt
I basically need a controlled MQTT broker.
I need to create authentication and authorization system for MQTT broker made with Embedded ActiveMQ. It will check forI want to use Java (Spring Boot).
I want to disable automatic topic creation. I will manually create then from Java code.
I want to authorize a user to connect to a topic, whether it is to publish or subscribe. Everything in run-time.
I have read about plugins from activemq site. But don't get the full extent, how to create a plugin to authorize for individual topics. I need to be able to modify my whitelist in run time.
java spring spring-boot activemq mqtt
java spring spring-boot activemq mqtt
edited Dec 27 at 16:07


K.Dᴀᴠɪs
6,965112139
6,965112139
asked Dec 27 at 13:28
S. Das
43
43
1
Your title mentions JWT (JWS) but the question doesn't mention anything about it. What is the role of JWT (JWS) here? Also, why do you need to create a custom plugin for authorization rather than just using the built-in authorization functionality to grantread
andwrite
permissions on the necessary topics?
– Justin Bertram
Dec 27 at 22:38
The topics have to be created in a controlled manner by the server application. No preloaded topic. And I need to assign some topics to some users. All programatically. I was thinking about giving a user a JWS instead of using MQTT standard Username/Password field and use DB. As I do not want to access DB for each Publush/Subscribe. I was thinking about putting that JWS in Username field and use a custom plugin. The request to create topic and sharing of JWS is done using another channel based on simple HTTPS request.
– S. Das
2 days ago
I can also do with any other broker (preferablly embeddable). But it needs to be free. HiveMQ has similar type of authorization, what I am thinking about ( hivemq.com/blog/mqtt-security-fundamentals-authorization ). But it is not free for production.
– S. Das
2 days ago
Are you asking about the ActiveMQ 5.x broker or the newer ActiveMQ Artemis broker?
– Justin Bertram
2 days ago
I am asking for ActiveMQ broker. But I have no problem switching to ActiveMQ Artemis or any other free to use broker.
– S. Das
yesterday
add a comment |
1
Your title mentions JWT (JWS) but the question doesn't mention anything about it. What is the role of JWT (JWS) here? Also, why do you need to create a custom plugin for authorization rather than just using the built-in authorization functionality to grantread
andwrite
permissions on the necessary topics?
– Justin Bertram
Dec 27 at 22:38
The topics have to be created in a controlled manner by the server application. No preloaded topic. And I need to assign some topics to some users. All programatically. I was thinking about giving a user a JWS instead of using MQTT standard Username/Password field and use DB. As I do not want to access DB for each Publush/Subscribe. I was thinking about putting that JWS in Username field and use a custom plugin. The request to create topic and sharing of JWS is done using another channel based on simple HTTPS request.
– S. Das
2 days ago
I can also do with any other broker (preferablly embeddable). But it needs to be free. HiveMQ has similar type of authorization, what I am thinking about ( hivemq.com/blog/mqtt-security-fundamentals-authorization ). But it is not free for production.
– S. Das
2 days ago
Are you asking about the ActiveMQ 5.x broker or the newer ActiveMQ Artemis broker?
– Justin Bertram
2 days ago
I am asking for ActiveMQ broker. But I have no problem switching to ActiveMQ Artemis or any other free to use broker.
– S. Das
yesterday
1
1
Your title mentions JWT (JWS) but the question doesn't mention anything about it. What is the role of JWT (JWS) here? Also, why do you need to create a custom plugin for authorization rather than just using the built-in authorization functionality to grant
read
and write
permissions on the necessary topics?– Justin Bertram
Dec 27 at 22:38
Your title mentions JWT (JWS) but the question doesn't mention anything about it. What is the role of JWT (JWS) here? Also, why do you need to create a custom plugin for authorization rather than just using the built-in authorization functionality to grant
read
and write
permissions on the necessary topics?– Justin Bertram
Dec 27 at 22:38
The topics have to be created in a controlled manner by the server application. No preloaded topic. And I need to assign some topics to some users. All programatically. I was thinking about giving a user a JWS instead of using MQTT standard Username/Password field and use DB. As I do not want to access DB for each Publush/Subscribe. I was thinking about putting that JWS in Username field and use a custom plugin. The request to create topic and sharing of JWS is done using another channel based on simple HTTPS request.
– S. Das
2 days ago
The topics have to be created in a controlled manner by the server application. No preloaded topic. And I need to assign some topics to some users. All programatically. I was thinking about giving a user a JWS instead of using MQTT standard Username/Password field and use DB. As I do not want to access DB for each Publush/Subscribe. I was thinking about putting that JWS in Username field and use a custom plugin. The request to create topic and sharing of JWS is done using another channel based on simple HTTPS request.
– S. Das
2 days ago
I can also do with any other broker (preferablly embeddable). But it needs to be free. HiveMQ has similar type of authorization, what I am thinking about ( hivemq.com/blog/mqtt-security-fundamentals-authorization ). But it is not free for production.
– S. Das
2 days ago
I can also do with any other broker (preferablly embeddable). But it needs to be free. HiveMQ has similar type of authorization, what I am thinking about ( hivemq.com/blog/mqtt-security-fundamentals-authorization ). But it is not free for production.
– S. Das
2 days ago
Are you asking about the ActiveMQ 5.x broker or the newer ActiveMQ Artemis broker?
– Justin Bertram
2 days ago
Are you asking about the ActiveMQ 5.x broker or the newer ActiveMQ Artemis broker?
– Justin Bertram
2 days ago
I am asking for ActiveMQ broker. But I have no problem switching to ActiveMQ Artemis or any other free to use broker.
– S. Das
yesterday
I am asking for ActiveMQ broker. But I have no problem switching to ActiveMQ Artemis or any other free to use broker.
– S. Das
yesterday
add a comment |
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53945892%2fhow-to-create-an-authentication-plugin-interceptop-for-activemq-for-mqtt-tha%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53945892%2fhow-to-create-an-authentication-plugin-interceptop-for-activemq-for-mqtt-tha%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
DmXHntd1txAMyXY7JOVOXiffU,bM
1
Your title mentions JWT (JWS) but the question doesn't mention anything about it. What is the role of JWT (JWS) here? Also, why do you need to create a custom plugin for authorization rather than just using the built-in authorization functionality to grant
read
andwrite
permissions on the necessary topics?– Justin Bertram
Dec 27 at 22:38
The topics have to be created in a controlled manner by the server application. No preloaded topic. And I need to assign some topics to some users. All programatically. I was thinking about giving a user a JWS instead of using MQTT standard Username/Password field and use DB. As I do not want to access DB for each Publush/Subscribe. I was thinking about putting that JWS in Username field and use a custom plugin. The request to create topic and sharing of JWS is done using another channel based on simple HTTPS request.
– S. Das
2 days ago
I can also do with any other broker (preferablly embeddable). But it needs to be free. HiveMQ has similar type of authorization, what I am thinking about ( hivemq.com/blog/mqtt-security-fundamentals-authorization ). But it is not free for production.
– S. Das
2 days ago
Are you asking about the ActiveMQ 5.x broker or the newer ActiveMQ Artemis broker?
– Justin Bertram
2 days ago
I am asking for ActiveMQ broker. But I have no problem switching to ActiveMQ Artemis or any other free to use broker.
– S. Das
yesterday