473,606 Members | 3,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTTPS & PHP

Hi all,

In mind this is a daft question, but here goes.

My hosts allow secure https logins on specific directories. What I want
to do is have a login screen in flash, if the user enters the correct
username and password I would like to set the HTTPS username and
password using php/flash and then open the secure page.

In my mind at this point they'll be logged in and then can navigate the
secure page without seeing the browsers https login dialog. Am I
kidding myself, or is this possible?

Troot

They're config is the following:
PHP Version 4.3.11
4.9-STABLE FreeBSD
Zend Engine v1.3.0

Apache/1.3.33 (Unix) PHP/4.3.11 mod_ssl/2.8.22 OpenSSL/0.9.7c
FrontPage/5.0.2.2635 mod_throttle/3.1.2

Jul 17 '05 #1
9 2609
*** Troot wrote/escribió (18 May 2005 07:58:50 -0700):
My hosts allow secure https logins on specific directories. What I want
to do is have a login screen in flash, if the user enters the correct
username and password I would like to set the HTTPS username and
password using php/flash and then open the secure page.

In my mind at this point they'll be logged in and then can navigate the
secure page without seeing the browsers https login dialog. Am I
kidding myself, or is this possible?


I know nothing about Flash. What's your doubt about the PHP part?

In any case, there isn't _one_ authentication system out there but lots of
them. You'd need to know the spec of yours.

--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Jul 17 '05 #2
Keep in mind that you'll want your flash animation on a secure page,
not just a plain HTTP intro page. If you don't then you'll be sending
usernames and passwords as plain text, and that's a notable security
hole for a site you want to secure.

I've worked on systems that required server-dialog authentication, and
ones that simply had the site on https, that I've built my site
authentication on top of. From a user-friendliness and flexibility
perspective, I prefer the second technique.

I usually build sites that require fairly flexible/robust role-based
permissions anyway, so with the second technique I start with a clean
slate instead of having to interface with aonther system to track
usernames/passwords/etc. and then extend.

~D

Jul 17 '05 #3
dracolytch wrote:
Keep in mind that you'll want your flash animation on a secure page,
not just a plain HTTP intro page. If you don't then you'll be sending
usernames and passwords as plain text, and that's a notable security
hole for a site you want to secure.
Not true... as long as the flash is communicating with a PHP script that
is itself under SSL, then the communication between them is encrypted.
The same applies for normal HTML forms. If you fill in a form from
http://example.com that posts to https://example.com, then the posted
information that is sent in the request would be encrypted since the
connection itself would be.
I've worked on systems that required server-dialog authentication, and
ones that simply had the site on https, that I've built my site
authentication on top of. From a user-friendliness and flexibility
perspective, I prefer the second technique.
I also prefer to use my own authentication model, it just makes
debugging easier.
I usually build sites that require fairly flexible/robust role-based
permissions anyway, so with the second technique I start with a clean
slate instead of having to interface with aonther system to track
usernames/passwords/etc. and then extend.


Same here.

--
Justin Koivisto - ju****@koivi.co m
http://koivi.com
Jul 17 '05 #4
The flash bit doesn't really matter, I'll just use that to post/get
variables to php. I know theres a variable in php called $AUTH_USER_PW
(or something like that). What I'm wondering is if I can do something
like this:

<?php
$_SERVER['PHP_AUTH_USER']=$some_variable _passed_in;
$_SERVER['PHP_AUTH_PW']=$some_other_va riable_passed_i n;
?>

then redirect the user to the directory (which will be under https://)
and have the username and password already entered for them.

If I do need to give more info, what would I need to know?
All I know about the authentication system is the following:
They're config is the following:
PHP Version 4.3.11
4.9-STABLE FreeBSD
Zend Engine v1.3.0

Apache/1.3.33 (Unix) PHP/4.3.11 mod_ssl/2.8.22 OpenSSL/0.9.7c
FrontPage/5.0.2.2635 mod_throttle/3.1.2

Jul 17 '05 #5
Ack! You are correct. Here we have a secure server and a non-secure
server where the secure server does not accept normal http requests at
all, and I was thinking along those terms. I need to get out more. ;)

~D

Jul 17 '05 #6
Sorry, I'm a little bit confused now, does this mean that my options
are:

1. Take the whole thing into the secure directory, authenticating with
the browser dialog
2. Design and build my secure/authentication model with php, which I
can control the login method on

Does anybody know then how it is somebody can go into a secure site
(such as hotmail, airline tickets etc.) with just a normal login form
in html?

Jul 17 '05 #7
*** Troot wrote/escribió (18 May 2005 10:02:19 -0700):
The flash bit doesn't really matter, I'll just use that to post/get
variables to php. I know theres a variable in php called $AUTH_USER_PW
(or something like that). What I'm wondering is if I can do something
like this:

<?php
$_SERVER['PHP_AUTH_USER']=$some_variable _passed_in;
$_SERVER['PHP_AUTH_PW']=$some_other_va riable_passed_i n;
?>


Alright, apparently you're using HTTP authentication. This has nothing to
do with HTTPS/SSL, which is merely an encrypted channel for sensitive
information. This is how it works:

1) User asks for a document.
2) Server software checks if credentials are needed.
2.1) If not needed: page is served.
2.2) If needed: server software checks whether credentials were provided
in request headers.
2.2.1) If provided and username+passwo rd are valid: page is served
2.2.2) Else "auth required" message is returned to browser

Browsers handle HTTP auth internally: that means that if a browser gets the
"auth required" message it will *always* display a dialog for user enter
them. This is the key point.

Why? Because Apache itself will only create the PHP_AUTH_* variables if
browser sends credentials. And browser only sends credentials if entered in
its built-in dialog. You cannot use a custom HTML form (or Flash form).

Alternatives? You can use your own server software (that's it, a custom PHP
script rather than letting the task to Apache). The only issue is that this
system won't allow you to access anything that's not PHP: images,
stylesheets, PDFs... To make it worse, if the PHP script itself is
protected by Apache then it won't work: browser will always prompt user.

I guess 'maybe' you can share password files between your ISP's system and
yours, but you probably must write your own system to use them.
--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Jul 17 '05 #8
great, thanks Ivaro, I think that clears it up for me. Basically, my
choice are:

1. go all authenticated (php, images etc) which is secure
2. build my own system of authentication with php, which will leave
images etc open, but does provide 'some' protection

Jul 17 '05 #9
This is essentially correct. You need to evaluate the value/risk of
your non-PHP content when you're choosing a method.

Traditional commerce sites tend to go for method 2. For example, here's
the paypal logo, served over a secure connection:
https://www.paypal.com/en_US/i/logo/paypal_logo.gif

In this case, PayPal's valuable data is secured by their custom
authentication system.

Venues selling media such as pictures or audio, on the other hand,
traditionally use method 1, to prevent people from stealing their
media.

You ~can~ use PHP to do things like temporairly retrieve data from
non-servable directories, or pull data out of a database for display.
This can protect your media content fairly well. On the other hand, it
tends to come with additional processing overhead.

~D

Jul 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1771
by: kiran | last post by:
Hi, I hosted a PHP project on my web server(IIS) and I am accessing the ip addres through my office public address like this: (example) https://61.95.204.43:8887/phptest/test.php "https://61.95.204.43" is my company ip address and the port 8887 is any requests that are comes through the port(8887) will be redirected to my system, which is under the network ("https://61.95.204.43").
2
3276
by: Craig Keightley | last post by:
i have the following script on my checkout page to check if https is set in the address bar: if ($_SERVER != "on") { $url = $_SERVER; $query = $_SERVER; $path = $_SERVER; header("Location: https://$url$path?$query"); }
3
2588
by: Phillip | last post by:
Some people tipped me off on some possibilities to tackle my https problem. Those have definitely gotten me further in cornering the problem. Thank you. But: No matter what I do to open a webconnection with httpS I always get something in this Area: urllib2.URLError: <urlopen error unknown url type: https>
16
60592
by: Paul Sweeney | last post by:
Does anyone know of a working (python) https proxy which allows viewing of unencrypted data being sent from my browser to an https site? I've worked my way through most on the list at http://xhaus.com/alan/python/proxies.html, but while many claim to support https, if you actually point your browser at the proxies, they work fine for http, but not for https pages. TIA
1
1599
by: dryer | last post by:
I'm trying to pass some values back and forth between a main page (on https) and a child window (on http) and keep getting 'Access Denied' messages. I know this is a security issue with the browser, but is there anyway around it? Thanks.
3
3129
by: zn | last post by:
This is a beginner question. I need to create a page that is encrypted by SSL. The web server is already serving SSL encrypted web pages with "https" before the link. Do I need to do anything other than putting "https" at the start of the link to make the webserver to client communication encrypted? Thanks.
14
2490
by: Peter Chant | last post by:
I'm currently authenticating a site I have built using basic http authentication built into apache. This has zero overhead on php which is a bonus but it seems to not quite work how I'd like. Are the username and password in the login box that comes up encrypted? When I login https://mysite.local:portnum I get the login dialog. As I am using a self signed certificate I see the dialog stating warning me about it first before the login...
2
5026
by: Mark Rae | last post by:
Hi, Apologies if this isn't the appropriate forum to post this... I've recently acquired an SSL certificate on my live web site which I maintain and develop in C# / ASP.NET with VS.NET 2003. That means I can use https://www.markrae.co.uk just as well as http://www.markrae.co.uk. Therefore, I need to be able to simulate this on my development machine. I followed the MSKB article How To Set Up Client Certificates
4
6507
by: Jason P | last post by:
Basically we have a web method with a dynamic URL. The client is developed in C++ and I've been using the webReference.SetUrl( "http://test.example.com..." ) method successfully with various web method URLs. However, when we switched to using a secure connection, the call to webReference.SetUrl( "https://test.example.com..." ) no longer functions. The SetUrl() method is actually successful, but any following calls in to the web...
0
8036
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8461
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8317
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5470
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3948
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4010
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2454
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1572
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1313
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.