Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acl support #10

Closed
mCloud opened this issue Dec 30, 2014 · 9 comments
Closed

acl support #10

mCloud opened this issue Dec 30, 2014 · 9 comments

Comments

@mCloud
Copy link

mCloud commented Dec 30, 2014

acl support like mosquitto

@maggu2810
Copy link
Contributor

Are there any plans to support this?

@andsel
Copy link
Collaborator

andsel commented Mar 7, 2015

Yes, it's on the stack of todos. Before I've to introduce the concept of plugins.

@andsel
Copy link
Collaborator

andsel commented May 26, 2015

Implemented ACL with same synthax used in Mosquitto.

@andsel andsel closed this as completed May 26, 2015
@WilliamKinaan
Copy link

Hey Adnsel, I am having a problem with the access control list in Moquttee, It seems that it is working so strange, I have posted a question on stack overflow, here it is http://stackoverflow.com/questions/31511811/moquette-users-have-privilege-different-than-what-is-written-in-the-access-contr
could you check please

@andsel
Copy link
Collaborator

andsel commented Jul 20, 2015

Hi William,
I've seen it, I'll check it on the first free slot during night development.

Andrea

On Mon, Jul 20, 2015 at 10:28 AM, William Kinaan notifications@github.com
wrote:

Hey Adnsel, I am having a problem with the access control list in
Moquttee, It seems that it is working so strange, I have posted a question
on stack overflow, here it is
http://stackoverflow.com/questions/31511811/moquette-users-have-privilege-different-than-what-is-written-in-the-access-contr
could you check please


Reply to this email directly or view it on GitHub
https://github.com/andsel/moquette/issues/10#issuecomment-122812085.

@andsel
Copy link
Collaborator

andsel commented Jul 23, 2015

Answered, probably you refer or touch the bad file, If you can't fix please refer to mailining list or github issues, posting your moquette.conf, acl.conf and password.conf

Andrea

@WilliamKinaan
Copy link

Hi Andsel,
I highly doubt that there is a bug in the authorization part of my version, because look at the code for receiving a subscribe event

@MQTTMessage(message = SubscribeMessage.class)
void processSubscribe(ServerChannel session, SubscribeMessage msg) {
String clientID = (String) session
.getAttribute(NettyChannel.ATTR_KEY_CLIENTID);
boolean cleanSession = (Boolean) session
.getAttribute(NettyChannel.ATTR_KEY_CLEANSESSION);
LOG.debug("SUBSCRIBE client <{}> packetID {}", clientID,
msg.getMessageID());

    // ack the client
    SubAckMessage ackMessage = new SubAckMessage();
    ackMessage.setMessageID(msg.getMessageID());

    for (SubscribeMessage.Couple req : msg.subscriptions()) {
        AbstractMessage.QOSType qos = AbstractMessage.QOSType.values()[req
                .getQos()];
        Subscription newSubscription = new Subscription(clientID,
                req.getTopicFilter(), qos, cleanSession);
        boolean valid = subscribeSingleTopic(newSubscription,
                req.getTopicFilter());
        ackMessage.addType(valid ? qos : AbstractMessage.QOSType.FAILURE);
    }

There is no call for the can.read function.

That is the problem, I am even developing a plugin for authorization, and the authorization on publishing is working perfectly, but the authorization on subscription is not working.

May you check please?

Many thanks,

@WilliamKinaan
Copy link

Hi man,

So sorry, it is working perfectly :)

And my plugin for authorization is working now

Appreciate it

@andsel
Copy link
Collaborator

andsel commented Jul 25, 2015

Ok, great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants