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.




1533 posts

Uber Geek

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 knows 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
Windows 7 Ultimate Host
4x2TB + 1x1.5TB using DriveBender, VMWare Server 2 with 1xW7, 2xW2k3 1xUbuntu 11.10 Desktop, 1xWHS2011, Plex


Create new topic
1186 posts

Uber Geek

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.






1533 posts

Uber Geek

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 knows 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
Windows 7 Ultimate Host
4x2TB + 1x1.5TB using DriveBender, VMWare Server 2 with 1xW7, 2xW2k3 1xUbuntu 11.10 Desktop, 1xWHS2011, Plex


1186 posts

Uber Geek

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.






1533 posts

Uber Geek

Trusted

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

Sounds hard :)

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




Previously knows 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
Windows 7 Ultimate Host
4x2TB + 1x1.5TB using DriveBender, VMWare Server 2 with 1xW7, 2xW2k3 1xUbuntu 11.10 Desktop, 1xWHS2011, Plex


1186 posts

Uber Geek

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.






1533 posts

Uber Geek

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 knows 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
Windows 7 Ultimate Host
4x2TB + 1x1.5TB using DriveBender, VMWare Server 2 with 1xW7, 2xW2k3 1xUbuntu 11.10 Desktop, 1xWHS2011, Plex


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:

Xbox One
Created by DjShadow, last reply by merve0o0 on 22-May-2013 18:27 (37 replies)
Pages... 2 3


Cannabis is illegal yet we have really strong 'legal highs' ?
Created by qwerty7, last reply by jonb on 23-May-2013 10:59 (61 replies)
Pages... 3 4 5


Fecked up religious people strike again :-(
Created by Mark, last reply by TinyTim on 23-May-2013 10:55 (17 replies)
Pages... 2


Changeover issue: dial up
Created by Zigg, last reply by robjg63 on 21-May-2013 22:02 (17 replies)
Pages... 2


A new project coming to Geekzone
Created by freitasm, last reply by freitasm on 23-May-2013 10:34 (252 replies)
Pages... 15 16 17


HTC One (2013) owners' discussion
Created by Dingbatt, last reply by andrew027 on 23-May-2013 10:23 (1537 replies)
Pages... 101 102 103


"igov" online passport renewals
Created by Linuxluver, last reply by profrink on 22-May-2013 22:22 (29 replies)
Pages... 2


Orcon, Is this for real or a scam??
Created by old3eyes, last reply by DarthKermit on 22-May-2013 19:12 (29 replies)
Pages... 2



Geekzone Jobs »
Most recent NZ jobs in technology:

Senior and Lead Test Analyst
Posted 23-May-2013 09:28

SAP Business Objects Lead
Posted 23-May-2013 09:28

Senior Project Manager
Posted 23-May-2013 09:28

PHP Developer
Posted 23-May-2013 09:28

Intermediate Project Manager
Posted 22-May-2013 22:27

Project Manager - Data Centre
Posted 22-May-2013 22:27

Senior Embedded Software Engineer
Posted 22-May-2013 22:27


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.