Windows (Jetty): http redirecting to https?

Need help? Post your questions here.

Moderator: moderators

Windows (Jetty): http redirecting to https?

Postby jol » Fri May 25, 2012 5:01 am

Hello,
I was experimenting with IIS and ARR in order to reverse proxy Subsonic, as I am planning to integrate Subsonic into my standard webpage (and also hope to integrate authentication somehow). During that exercise I figured out that when https is enabled and I connect via http I get redirected to https, which in turn fails as the certificate is not accepted. I have not seen this documented anywhere, and cannot tell whether it is Jetty standard or Subsonic. Ideally I would like to control this behaviour instead of figuring out the hard way - and that´s also the primary motivation to create this issue report - avoid someone else has to figure out the hard way...
I am using https externally for all users (http is not exposed through my firewall), but it does not make sense for the local ARR connection.

Problem Description: https redirects to http
Troubleshooting Steps:
Playback Application and version: Subsonic 4.6
Subsonic Version: 4.6 (build 2583) – December 6, 2011
Server Version: jetty-6.1.x, java 1.6.0_27, Windows Server 2008 R2 (86.5 MB / 96.7 MB) -
Hardware Platform: Windows Homeserver 2011
Java Memory Limit: 100MB
Problem Filename: no specific file, tried several
Output from ffmpeg -i: irrelevant
Last ten log file lines: irrelevant

If someone knows how to turn off the redirect - appreciated. Otherwise my next step towards a solution will be to use ARR for the external connection as well and have Jetty support http only.
Thanks, jol
Subsonic 4.7 running on Acer H340 with LDAP authentication / Windows Home Server 2011 - Android client (3.5)
jol
 
Posts: 52
Joined: Sat Jan 21, 2012 7:40 pm

Re: Windows (Jetty): http redirecting to https?

Postby bushman4 » Fri May 25, 2012 2:47 pm

This is by design... once you enable https, Subsonic will redirect all requests using http to the https address with a 302 response.

Glenn
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Re: Windows (Jetty): http redirecting to https?

Postby willieb » Thu Aug 09, 2012 2:55 pm

I want all users to use http but when I login as an admin I will use https. So is there a way NOT to be automatically re-directed to SSL? Thanks.
willieb
 
Posts: 54
Joined: Fri Jul 27, 2012 3:03 pm

Re: Windows (Jetty): http redirecting to https?

Postby bushman4 » Thu Aug 09, 2012 3:00 pm

No.

Glenn
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Re: Windows (Jetty): http redirecting to https?

Postby bushman4 » Thu Aug 09, 2012 3:02 pm

I have to ask...

Why? If HTTPs is available, why leave non-admin connections on HTTP? I have seen less than a 2-4% difference in resource usage with SSL turned on.

Glenn
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Re: Windows (Jetty): http redirecting to https?

Postby willieb » Thu Aug 09, 2012 3:12 pm

Because I'm tired of people asking me about the security warning and I don't want to spend the time or effort in setting up a valid cert.
willieb
 
Posts: 54
Joined: Fri Jul 27, 2012 3:03 pm

Re: Windows (Jetty): http redirecting to https?

Postby bushman4 » Thu Aug 09, 2012 3:13 pm

Gotcha.

Thanks,

Glenn
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Re: Windows (Jetty): http redirecting to https?

Postby jol » Thu Aug 09, 2012 6:45 pm

willieb wrote:I want all users to use http but when I login as an admin I will use https. So is there a way NOT to be automatically re-directed to SSL? Thanks.
In fact there is, but its not trivial to set up. My Subsonic is configured with http only, but the port is open in my local network only. Access from the internet is using https port going to IIS, which uses Application Request Routing to rewrite the URL and to proxy to Subsonic. I.e. if you terminate SSL on a web server acting as reverse proxy, Subsonic does not know and thus will not redirect.
However I cannot recomment to use this on the internet as anyone can then sniff credentials and listen to or even download your music.
Best regards, jol
Subsonic 4.7 running on Acer H340 with LDAP authentication / Windows Home Server 2011 - Android client (3.5)
jol
 
Posts: 52
Joined: Sat Jan 21, 2012 7:40 pm

Re: Windows (Jetty): http redirecting to https?

Postby dr3van » Thu Aug 09, 2012 7:00 pm

willieb wrote:Because I'm tired of people asking me about the security warning and I don't want to spend the time or effort in setting up a valid cert.



I had the same problem about not wanting to have people be bothered by that warning. I fixed it by using a vallid cert. It can be obtained for free and I have also created a tutorial on how to do this

http://forum.subsonic.org/forum/viewtopic.php?f=6&t=9977
Subsonic Server: https://dr3van.com

build
Ubuntu Server 12.10 64 bit LAMP
Subsonic 4.7 custom
dr3van
 
Posts: 48
Joined: Wed Feb 22, 2012 8:43 pm

Re: Windows (Jetty): http redirecting to https?

Postby bushman4 » Fri Aug 10, 2012 12:10 pm

Unfortunately that method won't work with a dynamic IP using the subsonic redirect service... you'd have to get a new cert ever time your IP address changed...

Glenn
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Re: Windows (Jetty): http redirecting to https?

Postby willieb » Fri Aug 10, 2012 12:53 pm

dr3van wrote:
willieb wrote:Because I'm tired of people asking me about the security warning and I don't want to spend the time or effort in setting up a valid cert.



I had the same problem about not wanting to have people be bothered by that warning. I fixed it by using a vallid cert. It can be obtained for free and I have also created a tutorial on how to do this

http://forum.subsonic.org/forum/viewtopic.php?f=6&t=9977


Thanks for the tutorial link and the time you took to create it. I've actually tried following that tutorial with no luck so far. I'm a Telco Network Manager and have experience with installing certs for servers, etc, but in the limited time I had available thus far I couldn't get it to work with those instructions. For one, my subsonic server is on Windows XP Pro so several of the commands don't apply to me. I am also using 2 host names for 2 instances (www & www2), which leaves me out of the free one, unless I want to change both instances to the same host on different ports.

Anyway I look at it, it sucks lol. But on a positive note it's a great problem to have because if subsonic didn't exist I wouldn't have a free streaming server (I donated) to begin with. :-)

With all that said for now they can just deal with the warnings or not listen lol.
willieb
 
Posts: 54
Joined: Fri Jul 27, 2012 3:03 pm

Re: Windows (Jetty): http redirecting to https?

Postby j3tblk » Sat Aug 11, 2012 1:00 am

I solved all the problems listed here by using a MS Forefront TMG server.
My IP is dynamic, I have a domain name and the TMG server allows me to control 80 & 443 redirects.

My cert is on my TMG server too so I just installed the subsonic.org cert on the local machine and added a localhost entry.
j3tblk
 
Posts: 117
Joined: Thu Jun 03, 2010 3:51 pm

Re: Windows (Jetty): http redirecting to https?

Postby StNickZA » Sat Oct 18, 2014 6:12 am

Sorry to dig up an old thread, but thought I'd give another "valid" reason why someone may want HTTP and HTTPS working at the same time.

I've just upgraded to Android L, and there are some issues with their implementation of openSSL meaning that Dsub no longer works. Rather than asking all ten of my users to change the URL in their clients, I hoped I could just turn on http and use that until the openSSL issue is resolved.
StNickZA
 
Posts: 6
Joined: Fri Jan 17, 2014 7:19 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 23 guests