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

[feature request] JWT valid only for a specific room #78

Closed
vincentfretin opened this issue Feb 12, 2021 · 6 comments
Closed

[feature request] JWT valid only for a specific room #78

vincentfretin opened this issue Feb 12, 2021 · 6 comments

Comments

@vincentfretin
Copy link
Contributor

Related to the JWT (see #77).
Currently the JWT content can contains { join_hub: true, kick_users: true } because the security model of Hubs was giving access to all rooms in the Hubs Cloud instance. For my use case, I may need more security, only giving access to one or more rooms so I think it would make sense to add an additional optional room_ids parameter like this
{ kick_users: true, room_ids: ["123", "456"] }
(make it plural to support main room with breakout rooms right away)
room_ids and join_hub should be mutually exclusive, only one of this parameter should be in the JWT.
Thoughts?

@mqp
Copy link
Contributor

mqp commented Feb 12, 2021

That sounds like a totally reasonable thing to have.

@mqp
Copy link
Contributor

mqp commented Feb 15, 2021

I think I would prefer to implement it slightly differently. I would consider join_hub and kick_users "what you can do" fields, and room_ids the "where you can do it" field, where the lack of room_ids implies "everywhere". So the token you want would have both join_hub and room_ids specified. That seems like a simpler way to think about it.

@mqp mqp mentioned this issue Feb 16, 2021
@vincentfretin
Copy link
Contributor Author

That can work too. This is why I asked for opinion, thanks. ;-)
I'll probably work on this next month.

@mqp
Copy link
Contributor

mqp commented Feb 16, 2021

Oops, I did it!

@vincentfretin
Copy link
Contributor Author

:D Thank you. I'll create more issues like this if you can't help yourself of implementing it. ;-)

@mqp
Copy link
Contributor

mqp commented Feb 16, 2021

I'm having fun working on this a little bit so go for it.

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

2 participants