-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix sscpac/chat-locker#4. Integrate MAC restrictions (backend) into chat-locker #12
Conversation
chat-locker - Create canAccessResource Meteor method that checks if user(s) can access a resource based on a set of permissions - add MAC checks when creating a direct message or private group. - add permissions argument to createDirectMessage and createPrivateGroup Meteor methods. permissions apply to the Room being created. - add beforeSaveMessage hook that appends accessPermissions and legacySecurityLabel from parent room to newly created message. Only applies to direct message and private group message because other room types are not MAC restricted (i.e. are public)
Would it make sense to combine the new "canAccessResource" method with Rocket's existing "canAccessRoom" method? They seem similar, but maybe they are different enough to warrant separation? |
I think the main issue with that is that it will make it hard to merge their code with our (upstream merges) if we are overriding their specific methods. What do you think? |
Good idea. I thought about adding our code to it at first, but decided not to because:
In regards to #3 and #4 above, is that enough? Should we double check with every message that's sent? |
I think it is enough to get them access to the room, but we would also do the checks for each messages to check their accesses right? |
we only check access when associating a user to a room. we currently DO NOT check with each message. The only check is that the user belongs to the room (done by RocketChat's canAccessRoom). We're like the bouncer. We check their access at the door. Once they're in, no access checks are done. If you want to add more layers of security, we can check for access when publishing Chat subscriptions. That's what is used to build the side nav with the room list. If you really want then we can check each message as well, but I'm not sure about the overhead. |
I would merge it Reid, I looked it over but not in great detail. I would like do some testing with code in issue 3 |
Fix #4. Integrate MAC restrictions (backend) into chat-locker
a resource based on a set of permissions
Meteor methods. permissions apply to the Room being created.
legacySecurityLabel from parent room to newly created message. Only
applies to direct message and private group message because other room
types are not MAC restricted (i.e. are public)