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

cookies.txt not working with SSO setup #18209

Closed
vanhecke opened this issue Nov 16, 2018 · 4 comments
Closed

cookies.txt not working with SSO setup #18209

vanhecke opened this issue Nov 16, 2018 · 4 comments
Labels

Comments

@vanhecke
Copy link

@vanhecke vanhecke commented Nov 16, 2018

  • I've verified and I assure that I'm running youtube-dl 2018.11.07

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

I have trouble downloading videos from a Kaltura-based video platform.
This platform is hosted in enterprise environment behind Single Sign-On.
The Single Sign-On is done by Office 365 / Azure combined with 2FA from Symantec.

My instinct was to used a cookies.txt file.
But for some reason youtube-dl is being redirected to the SSO page. But with curl I do not get redirected.

Curl

~ curl --verbose --cookie cookies.txt https://videoplatform.company.com/media/1_3ai9v2ry
*   Trying 38.74.193.98...
* TCP_NODELAY set
* Connected to videoplatform.company.com (38.74.193.98) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / DHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: <snip>
*  start date: <snip>
*  expire date: <snip>
*  subjectAltName: host "videoplatform.company.com" matched cert's "videoplatform.company.com"
*  issuer:  <snip>
*  SSL certificate verify ok.
> GET /media/1_3ai9v2ry HTTP/1.1
> Host: videoplatform.company.com
> User-Agent: curl/7.52.1
> Accept: */*
> Cookie: <snip>
>
< HTTP/1.1 200 OK
< Date: Fri, 16 Nov 2018 14:02:41 GMT
< Server: Apache
< X-Me: ny-kms90
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
< kms-unique-id: 5beece0163e9e
< X-Xss-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
<
< HTML WITH VIDEO >

youtube-dl

~ youtube-dl --verbose --cookies cookies.txt https://videoplatform.company.com/media/1_3ai9v2ry
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'--cookies', u'cookies.txt', u'https://videoplatform.company.com/media/1_3ai9v2ry']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.11.07
[debug] Python version 2.7.13 (CPython) - Linux-4.4.0-17134-Microsoft-x86_64-with-debian-9.6
[debug] exe versions: ffmpeg 3.2.12-1, ffprobe 3.2.12-1, rtmpdump 2.4
[debug] Proxy map: {}
[generic] 1_3ai9v2ry: Requesting header
[redirect] Following redirect to https://federation-sts.company.com/adfs/ls/?SAMLRequest=<snip>
[generic] ?SAMLRequest=<snip>: Requesting header
^C
ERROR: Interrupted by user
@remitamine
Copy link
Collaborator

@remitamine remitamine commented Nov 16, 2018

not enough details to reproduce.
you can download this video using: youtube-dl kaltura:931221:1_3ai9v2ry

@vanhecke
Copy link
Author

@vanhecke vanhecke commented Nov 16, 2018

What details do you need?

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Nov 16, 2018

What details do you need?

any information that makes it possible for us(developers) to reproduce the problem locally, this will allow to identify the cause of the problem and fix it's actually a problem in youtube-dl.

@vanhecke
Copy link
Author

@vanhecke vanhecke commented Nov 19, 2018

What details do you need?

any information that makes it possible for us(developers) to reproduce the problem locally, this will allow to identify the cause of the problem and fix it's actually a problem in youtube-dl.

Ok, that's really hard for me to provide.
How did you figure out the partner id?

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.