How to make radiusdesk desktop login page grab coova json status by querring the coova-chilli UAMUIPORT.
I want to have a login page over SSL. I've done everything in radiusdesk server but the login page fetches some CoovaChilli staff from my openWRT access point. So basicly I want to fetch not the UAMPORT but UAMUIPORT because I can serve ssl only through UAMUIPORT!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This we'll have to tweak inside the login page's JavaScript code. The login page looks at the query string and takes the value of uamport and then do the query, so in your implementation it will (provided the uamuiport is specified) use that to do the query.
I've never played around with that and sort of gave up to serve ssl throught the Coova portal. Have you found documentation to help you with this or did you discovered this yourself? If so would you mind sharing a bit more info since I'm sure more people will find this useful. (That's now if you would like to share it)
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here is the research on the issue I've done. It's mainly based on this discussion in coova-chilli GitHub page: https://github.com/coova/coova-chilli/issues/17
There is detailed rewrite to the coova's login pages -- see the code snipet on the page!
What I did is:
1. Changed the radiusdesk uamIp and uamPort settings to myhosht.mydomain and 4900 respectivly.
2. Recompiled the openWRT coova-chilli package to enable https support, cause it is not enabled in the original coova-chilli package in the openwrt repository.
3. On my domain's DNS server added an A record of myhost.mydomain to point to 10.1.0.1 (my coova-chilli IP on the openwrt device).
4. Connect my Laptop to my openWRT access point with coova captive portal and loaded the following url: https://myhost.mydomain:4990/json/status?dc=1438323932722&callback=Ext.data.JsonP.callback1 and I get an coova json reply with no problem, but when I go to the RADIUSdesk dynamic login page I begin to get errors for a network timeout.
5. The reason for the problems Is (I guess) is that I found out thet an SSL enabled coova-chilli on an openWRT firmware is memory hungry and It doesnt play well with APs with less then 64MB of ram. P.S. I'm using Ubiquiti Nanostation M2 with barrier-breaker and old coova-chilli 1.3.0-5, and a Chaos Calmer 15.05 RC3 with coova-chilli PKG_VERSION:=1.3.0+20141128, but I think that 1.3.0+20141128 has those memory problems not fixed. There is a newer source for the coova-chilli with fixed memory leaks, I'll try to compile a installable package and put it to my ubnt NanoStation M2 with latest trunk openwrt. I'll keep you informed.
6. And one more thing -- I can read code but my writing is very very ugly :), and I've done an awful fix to your radiusdesk in order to redirect the login form to coova-chillis UAMUIPORT and It's DNS name. I hope If we can overcome coova-chilli's openwrt SSL obstacles you can make a config option to choose from https or http login pages.
Regards,
Nikolay N.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, I'm complete moron. I had misstyped the port in the rd_login_pages/desktop/CoovaChilli/build/production/CoovaChilli/app.js file. I made it 4900 but it should be 4990. Now everything is fine! My SSL is working. I'll post a complete howto in the forum!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How to make radiusdesk desktop login page grab coova json status by querring the coova-chilli UAMUIPORT.
I want to have a login page over SSL. I've done everything in radiusdesk server but the login page fetches some CoovaChilli staff from my openWRT access point. So basicly I want to fetch not the UAMPORT but UAMUIPORT because I can serve ssl only through UAMUIPORT!
Hi Nikonaum,
This we'll have to tweak inside the login page's JavaScript code. The login page looks at the query string and takes the value of uamport and then do the query, so in your implementation it will (provided the uamuiport is specified) use that to do the query.
I've never played around with that and sort of gave up to serve ssl throught the Coova portal. Have you found documentation to help you with this or did you discovered this yourself? If so would you mind sharing a bit more info since I'm sure more people will find this useful. (That's now if you would like to share it)
Regards
Here is the research on the issue I've done. It's mainly based on this discussion in coova-chilli GitHub page:
https://github.com/coova/coova-chilli/issues/17
There is detailed rewrite to the coova's login pages -- see the code snipet on the page!
What I did is:
1. Changed the radiusdesk uamIp and uamPort settings to myhosht.mydomain and 4900 respectivly.
2. Recompiled the openWRT coova-chilli package to enable https support, cause it is not enabled in the original coova-chilli package in the openwrt repository.
3. On my domain's DNS server added an A record of myhost.mydomain to point to 10.1.0.1 (my coova-chilli IP on the openwrt device).
4. Connect my Laptop to my openWRT access point with coova captive portal and loaded the following url: https://myhost.mydomain:4990/json/status?dc=1438323932722&callback=Ext.data.JsonP.callback1 and I get an coova json reply with no problem, but when I go to the RADIUSdesk dynamic login page I begin to get errors for a network timeout.
5. The reason for the problems Is (I guess) is that I found out thet an SSL enabled coova-chilli on an openWRT firmware is memory hungry and It doesnt play well with APs with less then 64MB of ram. P.S. I'm using Ubiquiti Nanostation M2 with barrier-breaker and old coova-chilli 1.3.0-5, and a Chaos Calmer 15.05 RC3 with coova-chilli PKG_VERSION:=1.3.0+20141128, but I think that 1.3.0+20141128 has those memory problems not fixed. There is a newer source for the coova-chilli with fixed memory leaks, I'll try to compile a installable package and put it to my ubnt NanoStation M2 with latest trunk openwrt. I'll keep you informed.
6. And one more thing -- I can read code but my writing is very very ugly :), and I've done an awful fix to your radiusdesk in order to redirect the login form to coova-chillis UAMUIPORT and It's DNS name. I hope If we can overcome coova-chilli's openwrt SSL obstacles you can make a config option to choose from https or http login pages.
Regards,
Nikolay N.
Update: Ok, I think that coova-chilli on openwrt works ok, but the Dynamic Login Page's login script is the one to blame, maybe I've done some wrong configs cause this is the url from radoiusdesk login page (that is not working):
https://hotspot.swu.bg:4900/json/status?_dc=1439878568811&callback=Ext.data.JsonP.callback1
And this is the one that actualy works:
https://hotspot.swu.bg:4990/json/status?dc=1439878568811&callback=Ext.data.JsonP.callback1
The difference is this:
(not working) status?_dc
(working) ststus?dc
It's been tested on openWRT 15.05 with coova-chilli 1.3.1-svn
OK, I'm complete moron. I had misstyped the port in the rd_login_pages/desktop/CoovaChilli/build/production/CoovaChilli/app.js file. I made it 4900 but it should be 4990. Now everything is fine! My SSL is working. I'll post a complete howto in the forum!