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

Download file security #9

Open
Maxou44 opened this issue Feb 27, 2019 · 1 comment
Open

Download file security #9

Maxou44 opened this issue Feb 27, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@Maxou44
Copy link
Member

Maxou44 commented Feb 27, 2019

Since the 2.0, the load balancer serves media files itseft, but Plex tokens aren't checked, it could be nice to check token if provided and use a generated unique token when the laod balancer generate download links

@Maxou44 Maxou44 added the enhancement New feature or request label Mar 21, 2020
@afdah
Copy link

afdah commented Jun 23, 2021

@Maxou44 , what do you think about the below proposal?

Current process flow by loadbalancer for download urls
if CUSTOM_DOWNLOAD_FORWARD,

  1. redirect 307 to transcoder
    else loadbalancer
  2. process the download

Current process flow by transcoder for download urls

  1. process the download

Propose process flow by loadbalancer for download urls
if CUSTOM_DOWNLOAD_FORWARD,

  1. redirect 307 to transcoder. token is not check here. token will be check at transcoder end
    else loadbalancer
  2. check if token is valid
  3. if valid, process the download

Propose process flow by transcoder for download urls

  1. check if token is valid
  2. if valid, process the download

Now the checking of token can only be done by making a http request to plex media server
With the original download request, we need to re-create either a HEAD request or GET request with byte range of 1024 bytes to plex media server and check the response. We do not want to forward the original download request to PMS.
A 401 response means invalid token.

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

No branches or pull requests

2 participants