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.




2045 posts

Uber Geek
+1 received by user: 118

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
1707 posts

Uber Geek
+1 received by user: 109

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.



2045 posts

Uber Geek
+1 received by user: 118

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

1707 posts

Uber Geek
+1 received by user: 109

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.



2045 posts

Uber Geek
+1 received by user: 118

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

1707 posts

Uber Geek
+1 received by user: 109

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.



2045 posts

Uber Geek
+1 received by user: 118

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:




News »

Trending now »
Hot discussions in our forums right now:

Moment of Truth?
Created by BarTender, last reply by joker97 on 20-Sep-2014 11:54 (405 replies)
Pages... 25 26 27


Festival of Democracy
Created by gzt, last reply by sdav on 21-Sep-2014 08:38 (116 replies)
Pages... 6 7 8


Mr. Key to extradite Kim Dotcom?
Created by TimA, last reply by SaltyNZ on 18-Sep-2014 09:20 (126 replies)
Pages... 7 8 9


New On Account mobile plans - Red+
Created by NikT, last reply by kawaii on 20-Sep-2014 20:55 (45 replies)
Pages... 2 3


IOS8 - Network Load
Created by FireEngine, last reply by raytaylor on 20-Sep-2014 16:55 (45 replies)
Pages... 2 3


Computer Lounge's Zen Radical
Created by JayADee, last reply by JayADee on 19-Sep-2014 14:51 (15 replies)

Maybe some politicians should go back to school?
Created by jarledb, last reply by DarthKermit on 18-Sep-2014 18:27 (31 replies)
Pages... 2 3


FS: Server time
Created by deathslocus, last reply by CamH on 17-Sep-2014 21:31 (30 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.