Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




1841 posts

Uber Geek
+1 received by user: 97

Trusted

Topic # 65971 10-Aug-2010 08:03 Send private message

Rather that asking technical ways of doing things as per : http://www.geekzone.co.nz/forums.asp?forumid=46&topicid=65937

How about I tell you what I'm after and take suggestions instead.

I have a number of sites on a number of machines at home.  A log of them a packages, a couple of them are ASP.Net apps I've written.  Mostly they're unsecured as I access them behind a tunnel.

But I'd like to open them up to the internet and potentially allow access to some other people. So what I'd like is the following;



  • Secure Landing page that lists or could provide links to the subdomains - this I'd like to be authenticated.

  • Listed sites shown are only the sites that the authenticated user has access to


So what am I after?  Is this something a content management system (Joomla, mambo, drupal) could do?  Or are they a bit over kill for what I'm after? (I've never looked at one so don't know the capabilities).

Or am I after a portal application? like jetspeed or pluto?

Or do I just write my own landing page with all the links, and figure out how to secure them by hand???




Previously known as psycik

NextPVR Based HTPC:

2 x HVR3000 - DVB-S - Freeview, HVR3000 - DVB-T Freeview|HD, Nova-T 500 - Dual Freeview|HD, Digital Coax --> Yamaha RX-v540, 8600GT --> Samsung LA46A650D via HDMI
Clients:
Popcorn Hour A-100, 1xATV2, 1xATV3, Roku3
Windows 7 Ultimate Host
3x2TB, 1x3TB + 1x1.5TB using DriveBender, VMWare Workstation 10 with 1xW7, 2xW2k3 1xUbuntu 11.10 Desktop, 1xWHS2011, Plex

UnblockUS - Unblock your freedom

Create new topic
1506 posts

Uber Geek
+1 received by user: 70

Trusted

  Reply # 365769 10-Aug-2010 09:20 Send private message

if they are basically all independent sites and you just want an index/landing page to take you to those. i think a CMS would be over kill.

i would just write up my own membership provider (or use a standard one from microsoft) and authenticate that way.

there maybe a problem authenticating on the subdomains (im not 100% sure if asp.net will just care the authentication details over, it should if using windows authentication), if it doesnt you could always add a hash (regenerated at login, that is stored in a db that expires) that says they are preauthenticated so they dont have to authenticate again.


for the roles the users can access, i would just use an enum eg,
1 = has access to site a
2 = site b
4 = site c
8 = site d

so userrole = 6 = site b and c but not access to site a or d.
that makes it easy to manage and check
if(userrole & UserRoles.SiteA) != SiteA) response.redirect("landingpage"); // they dont have access to here.
and easy to extend because you just add a new site to the enum.






1841 posts

Uber Geek
+1 received by user: 97

Trusted

  Reply # 365774 10-Aug-2010 09:43 Send private message

Hmm that would assume that the landing page was Microsoft, which it's currently not.  It's actually running on a linux apache server.

Also only two of the pages are custom written ASP.net, the rest are installed programs - gbpvr and sabnzbd and webmin.  So I don't really have any control over the authentication of the sub sites.




Previously known as psycik

NextPVR Based HTPC:

2 x HVR3000 - DVB-S - Freeview, HVR3000 - DVB-T Freeview|HD, Nova-T 500 - Dual Freeview|HD, Digital Coax --> Yamaha RX-v540, 8600GT --> Samsung LA46A650D via HDMI
Clients:
Popcorn Hour A-100, 1xATV2, 1xATV3, Roku3
Windows 7 Ultimate Host
3x2TB, 1x3TB + 1x1.5TB using DriveBender, VMWare Workstation 10 with 1xW7, 2xW2k3 1xUbuntu 11.10 Desktop, 1xWHS2011, Plex

UnblockUS - Unblock your freedom

1506 posts

Uber Geek
+1 received by user: 70

Trusted

  Reply # 365776 10-Aug-2010 09:49 Send private message

you could still basically do the same in php. and easily add a tokenlogin.aspx page to gbpvr which passes a preauthentication token. not sure about sabnzbd (never used it), but if you have access to db you could be able to do the same. just change the token to something like
encrypt(seed:username:password) so when reach the tokenlogin.aspx page decode it and do the manual login.






1841 posts

Uber Geek
+1 received by user: 97

Trusted

  Reply # 365795 10-Aug-2010 10:44 Send private message

Sounds hard :)

I don't want to change the programs I use.




Previously known as psycik

NextPVR Based HTPC:

2 x HVR3000 - DVB-S - Freeview, HVR3000 - DVB-T Freeview|HD, Nova-T 500 - Dual Freeview|HD, Digital Coax --> Yamaha RX-v540, 8600GT --> Samsung LA46A650D via HDMI
Clients:
Popcorn Hour A-100, 1xATV2, 1xATV3, Roku3
Windows 7 Ultimate Host
3x2TB, 1x3TB + 1x1.5TB using DriveBender, VMWare Workstation 10 with 1xW7, 2xW2k3 1xUbuntu 11.10 Desktop, 1xWHS2011, Plex

UnblockUS - Unblock your freedom

1506 posts

Uber Geek
+1 received by user: 70

Trusted

  Reply # 365804 10-Aug-2010 11:39 Send private message

not really hard, you're basically just writing a wrapper to auto login to the other websites.

otherwise your portal would be a basic index, but when you go to gbpvr EWA you would have to login again.

and you wouldnt be changing the webapps, just adding a new page, so you can still update them etc.

so basically

1. login to portal
2. click on a link to say gbpvr ewa/tokenlogin.aspx?token=DFGERGR@!QRFxf23!QWFDG@$#W
3. tokenlogin.aspx decodes the token and does the login using the username / password.

for asp.net websites you could do a Server.Transfer so the asp.net handles all the login stuff automatically, for PHP you do a post request with the username/password to login to the site, and then do a redirect to its main page. there maybe an issue with the auth cookies not being saved since your token page is doing the auth request. but you could work around that.

it may sound complicated, but theres not a heck of a lot to it really.

the problem is authentication between different servers and OSs. ive got no experience with this, so there maybe a better soluion, only ever done AD/forms auth on windows and forms auth on PHP. so not sure if you could do some kind of AD auth between the 2 types of servers.






1841 posts

Uber Geek
+1 received by user: 97

Trusted

  Reply # 365815 10-Aug-2010 12:15 Send private message

I was thinking if the location/directory in apache was password protected, the the resulting site wouldn't need to be (ie i could turn authentication off).  Another friend recommended website baker.




Previously known as psycik

NextPVR Based HTPC:

2 x HVR3000 - DVB-S - Freeview, HVR3000 - DVB-T Freeview|HD, Nova-T 500 - Dual Freeview|HD, Digital Coax --> Yamaha RX-v540, 8600GT --> Samsung LA46A650D via HDMI
Clients:
Popcorn Hour A-100, 1xATV2, 1xATV3, Roku3
Windows 7 Ultimate Host
3x2TB, 1x3TB + 1x1.5TB using DriveBender, VMWare Workstation 10 with 1xW7, 2xW2k3 1xUbuntu 11.10 Desktop, 1xWHS2011, Plex

UnblockUS - Unblock your freedom

Create new topic








Twitter »
Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when new jobs are posted to our jobs board:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:




News »

Trending now »
Hot discussions in our forums right now:

Forms of government for New Zealand
Created by charsleysa, last reply by Geektastic on 20-Apr-2014 15:40 (118 replies)
Pages... 6 7 8


MH370 - Call for Search & Rescue Help
Created by DS248, last reply by Sideface on 17-Apr-2014 17:28 (735 replies)
Pages... 47 48 49


why does the tax payer have to pay for the prince and princess' 6 star holiday?
Created by joker97, last reply by Geektastic on 17-Apr-2014 15:49 (67 replies)
Pages... 3 4 5


galaxy s4 now on 4.4.2
Created by nzrock, last reply by jeffnz on 20-Apr-2014 14:10 (59 replies)
Pages... 2 3 4


Whats the best wife friendly media centre?
Created by amorpeth, last reply by jonolynn on 19-Apr-2014 20:20 (14 replies)

Snap suffering Trans-Tasman congestion 18/04?
Created by Lias, last reply by NonprayingMantis on 19-Apr-2014 00:05 (26 replies)
Pages... 2


Help ! Home business connection and VDSL dead. yikes.
Created by Scotsman, last reply by Scotsman on 17-Apr-2014 21:10 (26 replies)
Pages... 2


Naked Broadband, who's made the switch.
Created by Presso, last reply by PhantomNVD on 20-Apr-2014 17:40 (25 replies)
Pages... 2



Geekzone Live »
Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.

Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.