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

Subscription exposure #69

Open
imaginator opened this issue Jun 26, 2014 · 10 comments
Open

Subscription exposure #69

imaginator opened this issue Jun 26, 2014 · 10 comments

Comments

@imaginator
Copy link
Member

To make media sharing work, it's necessary to expose subscriptions to private channels.

This is not ideal (e.g. exposing followers of the private channel [email protected]).

But the media server needs to know if you follow something before being able to issue a download token. Also for remote media servers.

Would the following work as a potential solution:

  • [email protected] wants media item azab-romeo-hot-hot-hot-cdcd from [email protected]
  • her bc-app requests a token from media.montague.lit
  • media.montague.lit generates a token and sends a copy of the token to [email protected] and buddycloud.montague.lit
  • buddycloud.montague.lit discards this token if [email protected] isn't a follower of romeo.montague.lit
  • juliet tries to download from api.capulet.lit/media-proxy/[email protected]/media/azab-romeo-hot-hot-hot-cdcd by presenting the token.
  • media.capulet.lit now checks that there is a matching token on buddycloud.capulet.lit
  • if the token is still wasn't discarded by the buddycloud-server, the download proceeds.

I'm sure I've missed something?

@abmargb
Copy link
Collaborator

abmargb commented Jun 26, 2014

Why would buddycloud.montague.lit trust media.montague.lit in a way that it'd provide private subscription data to the latter?

The way I see it working:

@imaginator
Copy link
Member Author

Why would buddycloud.montague.lit trust media.montague.lit in a way that it'd provide private subscription data to the latter?

I'd have expected that the buddycloud-server would trust a media server on it's own domain.

But that said, I like your idea of [email protected] generating the token.

@lloydwatkin @martin-hewitt - any thoughts?

@abmargb
Copy link
Collaborator

abmargb commented Jun 26, 2014

I'd have expected that the buddycloud-server would trust a media server on it's own domain.

That'd would work for a local media server, but in this case we could've configured the buddycloud-server with an admin jid that could access private subscriptions. This discussion was motivated by remote media servers trying to access those.

@lloydwatkin
Copy link
Member

@abmargb's method sounds like a good way to do it, but it also sounds like a lot of added complexity, and I'm also thinking race conditions.

Off the top of my head I can't think of anything better right now. I suggest a sponsored 'buddycloud on the beach' in Brazil to mull this over :)

@lloydwatkin
Copy link
Member

Have been thinking about this a little, a similar to @abmargb's suggestion with a little modification of path:

  1. User makes HTTP request to media server
  2. Media server contacts relevant channel server
  3. Channel server contacts user's channel server (may be the same machine)
  4. Channel server sends the HTTP request approval denial

At stage 2 the channel server can decide to return a deny before it even gets to the user. No exposure of the subscription information, and no leakage of where the deny came from.

@imaginator
Copy link
Member Author

I love it when @lloydwatkin starts thinking!

@abmargb
Copy link
Collaborator

abmargb commented Jun 30, 2014

I was thinking a little more on the origin of this discussion and I ended with a question: does the media belong to the user who uploaded it or to the channel where it was uploaded to?

@imaginator
Copy link
Member Author

It belongs to the channel.

E.G. if you leave the channel/you leave the organisation, your contribution doesn't disappear.

@abmargb
Copy link
Collaborator

abmargb commented Jul 1, 2014

Making it a little more clear: this feature makes sense when we have multiple buddycloud enabled domains being served by a single media server, right?

@lloydwatkin
Copy link
Member

It makes sense when I don't want the server to leak potentially sensitive subscription details.

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

3 participants