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.
Buying anything on Amazon? Please use the Geekzone Amazon aff link.




2102 posts

Uber Geek
+1 received by user: 125

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:

Gigabyte AMD A8 Brix --> Samsung LA46A650D via HDMI, SiliconDust HDHomeRun Dual DVB-T Tuner, NextPVR, Plex Plugin 
Clients:
Popcorn Hour A-100, 1xATV2, 1xATV3, Roku3
Windows 7 Ultimate Host (Plex Server)
3x2TB, 1x3TB, 1x4TB + 1x1.5TB using DriveBender, VMWare Workstation 10 with 1xW7, 2xW2k3 1xUbuntu 11.10 Desktop, 1xWHS2011, Plex, Crashplan, NextPVR channel for Plex

UnblockUS - Unblock your freedom

Create new topic
1765 posts

Uber Geek
+1 received by user: 131

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.



2102 posts

Uber Geek
+1 received by user: 125

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:

Gigabyte AMD A8 Brix --> Samsung LA46A650D via HDMI, SiliconDust HDHomeRun Dual DVB-T Tuner, NextPVR, Plex Plugin 
Clients:
Popcorn Hour A-100, 1xATV2, 1xATV3, Roku3
Windows 7 Ultimate Host (Plex Server)
3x2TB, 1x3TB, 1x4TB + 1x1.5TB using DriveBender, VMWare Workstation 10 with 1xW7, 2xW2k3 1xUbuntu 11.10 Desktop, 1xWHS2011, Plex, Crashplan, NextPVR channel for Plex

UnblockUS - Unblock your freedom

1765 posts

Uber Geek
+1 received by user: 131

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.



2102 posts

Uber Geek
+1 received by user: 125

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:

Gigabyte AMD A8 Brix --> Samsung LA46A650D via HDMI, SiliconDust HDHomeRun Dual DVB-T Tuner, NextPVR, Plex Plugin 
Clients:
Popcorn Hour A-100, 1xATV2, 1xATV3, Roku3
Windows 7 Ultimate Host (Plex Server)
3x2TB, 1x3TB, 1x4TB + 1x1.5TB using DriveBender, VMWare Workstation 10 with 1xW7, 2xW2k3 1xUbuntu 11.10 Desktop, 1xWHS2011, Plex, Crashplan, NextPVR channel for Plex

UnblockUS - Unblock your freedom

1765 posts

Uber Geek
+1 received by user: 131

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.



2102 posts

Uber Geek
+1 received by user: 125

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:

Gigabyte AMD A8 Brix --> Samsung LA46A650D via HDMI, SiliconDust HDHomeRun Dual DVB-T Tuner, NextPVR, Plex Plugin 
Clients:
Popcorn Hour A-100, 1xATV2, 1xATV3, Roku3
Windows 7 Ultimate Host (Plex Server)
3x2TB, 1x3TB, 1x4TB + 1x1.5TB using DriveBender, VMWare Workstation 10 with 1xW7, 2xW2k3 1xUbuntu 11.10 Desktop, 1xWHS2011, Plex, Crashplan, NextPVR channel for 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 tech item prices are listed in our price comparison site:





Trending now »

Hot discussions in our forums right now:

My un-consented UFB install
Created by thurthur, last reply by mdooher on 28-Nov-2014 18:57 (79 replies)
Pages... 4 5 6


Gigatown winner town and plans
Created by freitasm, last reply by Demeter on 28-Nov-2014 08:59 (76 replies)
Pages... 4 5 6


Seen any good Black Friday / Cyber Monday deals?
Created by Jaxson, last reply by ckc on 28-Nov-2014 15:08 (24 replies)
Pages... 2


Gull Employment Dispute.
Created by networkn, last reply by richms on 28-Nov-2014 17:57 (153 replies)
Pages... 9 10 11


This is the end ...
Created by joker97, last reply by benokobi on 29-Nov-2014 00:31 (56 replies)
Pages... 2 3 4


Do Chorus Still Fit ADSL to Rural Cabinets?
Created by TLD, last reply by TLD on 28-Nov-2014 21:56 (17 replies)
Pages... 2


What the hell MyRepublic!?
Created by gished, last reply by pohutukawa on 28-Nov-2014 17:45 (16 replies)
Pages... 2


The Warehouse pulling R18 games and DVD's
Created by semigeek, last reply by Geektastic on 27-Nov-2014 18:32 (64 replies)
Pages... 3 4 5



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.