Web server basic authentication

Related to the development libraries, released by Curt Binder
Smotz
Posts: 412
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Re: Web server basic authentication

Post by Smotz »

following
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

Thanks Roberto
pandimus
Posts: 213
Joined: Mon Apr 01, 2013 7:58 pm

Re: Web server basic authentication

Post by pandimus »

This wouldn't happen to be the reason I've been getting authentication errors is it?
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

Authentication errors where???

Have you added the web authentication to your code?
pandimus
Posts: 213
Joined: Mon Apr 01, 2013 7:58 pm

Re: Web server basic authentication

Post by pandimus »

I get it constantly on the Android app, I haven't added any code.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

Then no.
The Android app has the authentication in it already.

Try changing your timeout time and # of retries.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Web server basic authentication

Post by rimai »

I added controller authentication username and password fields to your user profile page.
Please go there and enter the same username and password you coded in your controller.
The portal should recognize it and apply the authentication automatically.
Please let me know how it goes.
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

Where are the authentication username and password fields?
I don't see them.
I looked under the portal settings and nothing new is there.

Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Web server basic authentication

Post by rimai »

On your forum user profile page.
It's a more secure place to have them stored.
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

Works great. Thanks.
I don't really use the U-App, but it would need to be added to that when you have a chance.
The Andiod App works great.

I'll try to get Russ at Reftronic to implement something on this page.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Web server basic authentication

Post by rimai »

Actually he mentioned that he doesn't want to store auth passwords in his end.
We do have an issue open for read only anonymous access:
https://github.com/reefangel/Libraries/issues/197
Should be coming on the next release.
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

OK.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

OK.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Web server basic authentication

Post by rimai »

Can you try the latest dev branch?
I included the anonymous access for command /sa
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

Just tried it and the Portal is giving me an Unreachable Address and Reeftronics is "Due to communication error, real-time status information is unavailable".

The dev code I got from here https://github.com/reefangel/Libraries/tree/dev.

https://github.com/reefangel/Libraries/archive/dev.zip
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

Wait. Something else is going on. I switched back to the released code and the Portal is still showing Unreachable Address, but the Andriod App is working fine.

I need to look into this a bit more.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

Using the released code the portal works fine if I comment out the authentication in my code and remove it from my profile.

If I add it back in it connects and reads ready.

If I switch to the dev code with my authentication info in the profile I get Unreachable Address on the portal.
ReefingHavoc
Posts: 54
Joined: Tue Jul 23, 2013 5:56 pm

Re: Web server basic authentication

Post by ReefingHavoc »

Trying to follow along as had to update my IP address and the IOS App is working fine after the address change but when I updated the Portal IP address I get "unreachable address". If I click on the IP address above the status a new tab opens up with "Reef Angel Controller Web Server". Not sure what is going on...
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Web server basic authentication

Post by rimai »

I think it is fixed this time.
Can you try the updated dev branch?
If this works, we probably need to contact reeftronics to tell them the anonymous page is /sa and not /r99 anymore
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

I'll try it tomorrow.
I'm at a New Years Eve block party.

Happy New Years. :)
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Web server basic authentication

Post by lnevo »

Block Party...damn floridian..its 27 degrees in NY!! Happy New Year's everyone!!!
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

Yeah, my neighbors are Greek and cooking a goat on a spit.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Web server basic authentication

Post by lnevo »

Nice!!!
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

Yeah, my wife and son said the goat was excellent. I was not feeling adventurous and didn't try it.

I loaded the new dev code and it is connection to the portal fine now and staying connected, before I believe it would connect after the initial loading of the code and then a bit later it would not and give me an unavailable address message.

What do I need to have Russ at reeftronics do to see if it works there?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Web server basic authentication

Post by rimai »

I'm pretty sure he is pulling data from /r99.
We need to tell them to change it to /sa.
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

Ok. I'll ask him to try, but before I do that I want to make sure that the code is working properly and we won't be changing things on him.

I just noticed that since putting the new dev code in that the Android app is giving me errors...

Error 13 Device Authentication Error.
check your username and password settings.
pandimus
Posts: 213
Joined: Mon Apr 01, 2013 7:58 pm

Re: Web server basic authentication

Post by pandimus »

Sacohen wrote:Ok. I'll ask him to try, but before I do that I want to make sure that the code is working properly and we won't be changing things on him.

I just noticed that since putting the new dev code in that the Android app is giving me errors...

Error 13 Device Authentication Error.
check your username and password settings.
I've been getting that error constantly for the last two months.. But yet I hit refresh and my app still uodates
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

Russ has enabled the /sa in the Reeftronics website. So if you enable the web authentication on your code it will still send information to Reeftronics.
Done! Well, that was surprisingly easy.

Apparently that /sa URI has been available all along. I was anticipating needing to modify my code to test if /r99 resulted in an authentication failure, then try /sa if needed. But I found that /sa works on all RAs on Reeftronics, so the necessary code change was really quite simple.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Web server basic authentication

Post by lnevo »

So does it query both or is there an option, or you have to resend your info to Russ? There's not much for Settings on the site..
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Web server basic authentication

Post by Sacohen »

Not sure. It sounds like it is querying the sa.
Maybe a better question for Russ to answer.
Post Reply