Weird basic authentication behavior on safari

I'm a PHP developer, and testing web app compatibility among browsers. I found that safari behaves differently from other major browsers(IE,firefox,chrome) when it comes to basic authentication.
for example, i have a http://asdf.com/a.php, that is protected using basic authentication. when i access this page, i can print out the logged in user's username.
if the user click on http://asdf.com/b.php, a page with no authentication method, i can no longer display his/her username. in PHP language, the AUTH_USER server variable(which indicates that someone has authenticated in) will no longer be available. b.php has also to be protected using basic authentication in order for safari to retain the server variable.
this is so weird. all other browsers retain this server variable, but safari seems to just behave differently as if someone hasn't logged in.
does anyone know how to solve this problem?

I have a similar issue with Safari on iPhone, iPod Touch MacOS X and Windows.
It does not ask for the proxy password. Neither with PAC autoconfig nor with direct proxy configuration and even if username and password added in settings.

Similar Messages

  • Weird client-authentication behavior

    I'm trying to enforce client-authentication. Tbe client-certificate I'm using is one that is signed by my own CA created using OpenSSL. Naturally, the CA cert is in my servers truststore.
    Anyway, I test client-authentication with Tomcat (clientAuth="true"), and it seems to work fine. Using the "s_client" command in Linux, I can see the client certificate being passed:
    Acceptable client certificate CA names
    /O=Smart Communcations, Inc./L=Makati/ST=Manila/C=PH
    But when I try the same thing using Oracle (OC4J standalone), and passing the same client certificate, I see the following details using "s_client":
    Acceptable client certificate CA names
    /C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
    /O=Smart Communcations, Inc./L=Makati/ST=Manila/C=PH
    /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/[email protected]
    /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting/OU=Certification Services Division/CN=Thawte Personal Basic CA/[email protected]
    /C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority
    /C=US/O=VeriSign, Inc./OU=Class 4 Public Primary Certification Authority
    /C=IE/O=Baltimore/OU=CyberTrust/CN=Baltimore CyberTrust Code Signing Root
    /C=US/O=VeriSign, Inc./OU=Class 1 Public Primary Certification Authority
    /C=IE/O=Baltimore/OU=CyberTrust/CN=Baltimore CyberTrust Root
    /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting/OU=Certification Services Division/CN=Thawte Personal Premium CA/[email protected]
    /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting/OU=Certification Services Division/CN=Thawte Personal Freemail CA/[email protected]
    /C=US/O=GTE Corporation/OU=GTE CyberTrust Solutions, Inc./CN=GTE CyberTrust Root 5
    /C=US/O=GTE Corporation/OU=GTE CyberTrust Solutions, Inc./CN=GTE CyberTrust Global Root
    /C=US/O=GTE Corporation/CN=GTE CyberTrust Root
    /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority
    /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Server CA/[email protected]
    Which seems very wrong since it should not have those other CA's as part of the certificate chain. Anyone know whats going on here?
    Thanks!
    Liam

    resolved.

  • Safari 6.0.1 cannot load video or audio that requires basic authentication

    When I browse to a URL for a .mp3 requiring basic authentication (username and password), the player does not load it.  An unprotected .mp3 on the same site loads and plays fine.  When inspecting the page containing the player, I see an HTML5 <video> element with the correct source URL and MIME type.  When I do the Bad Thing (TM) of putting the username and password into the URL, as in http://username:password@site... , the src URL in the <video> element contains the username and password, but the audio file still fails to load.
    This is occurring on the latest update of Safari and Mountain Lion on a Macbook Pro.
    Is there some workaround for this problem, besides using Chrome, which works fine on these audio URLs?

    I've seen reports of this problem going all the way back to Safari version 5.0.5 and it's still present in 6.0.4. How is this not fixed by now? Does anyone have a workaround that doesn't require putting the video in an unprotected directory?
    -Terry

  • Problem with Basic Authentication in Web Server 7.0u8

    I am using a web application which has inbuilt form based authentication. After entering correct username and password, i get logged in, but then immediatly i see a basic authentication dialog popup. I am seeing this behavior in Sun Web server 7.0u8 as well as Sun Web server 7.0u3.
    Any idea what could be the reason behind this? Other app servers like Weblogic , JBoss, Websphere do not show this behavior.

    This is the content of the default.acl file. This is the only .acl file that is there in https-<instance_name> directory.
    # Copyright 2006 Sun Microsystems, Inc. All rights reserved.
    # Use is subject to license terms.
    version 3.0;
    acl "default";
    authenticate (user, group) {
    prompt = "Sun Java System Web Server";
    allow (read, execute, info) user = "anyone";
    allow (list, write, delete) user = "all";
    acl "es-internal";
    allow (read, execute, info) user = "anyone";
    deny (list, write, delete) user = "anyone";

  • How to access SOAP web service with authentication, HTTP basic Authentication

    Dear All
    i use Flash Builder 4.5, flex 4..1, i am developing a flex client to soap webservices hosted over Glassfish 2 Java server, the web services is protected by HTTP Basic Authentication, everythime i run my code , the prombt for username and password show up, i need to pass user name and password through action script, i followed the flollowing (but was for http web service, not soap) but really did not work.
    http://stackoverflow.com/questions/490806/http-basic-authentication-wi th-httpservice-objects-in-adobe-flex-air
    http://forums.adobe.com/message/4262868
    private function authAndSend(service:HTTPService):void
            var encoder:Base64Encoder = new Base64Encoder();
            encoder.insertNewLines = false; // see below for why you need to do this
            encoder.encode("someusername:somepassword");
            service.headers = {Authorization:"Basic " +encoder.toString()};                                               
            service.send();
    Also i noticed in debug mode, always that WARNNING raised up
    Warning: Ignoring 'secure' attribute in policy file from http://fpdownload.adobe.com/pub/swz/crossdomain.xml.  The 'secure' attribute is only permitted in HTTPS and socket policy files.  See http://www.adobe.com/go/strict_policy_files for details.
    any idea ?

    Hello,
    I don't know if this could help.
    Another way to connect to a web service by SOAP and WSDL is to click on the Data/Services panel, then click on "Connect to Data/Services" and then select the "Web Service" (WSDL) icon. This could help as well.

  • Help needed for using BASIC authentication through JDBCRealm

    Help needed.
    Hello,
    I am doing a degree project, so far it works fine in my local machine, I need to try it on my virtual hosting (as it is a live server).
    My project requires JDBCRealm, that is BASIC authentication loading access data from mysql database. Normally this setup can be done in Server.xml file, because my Tomcat hosting is a virtual one, I only have permission to access the web.xml file.
    My question is: is it possible to get it done in an alternative way? In web.xml? Some properties file maybe?
    Thank you very much.

    You can set this up for your context using META-INF/context.xml instead of working with server.xml.
    Make a directory called META-INF under your webapp ( it'll be at the same level as WEB-INF ). Under this, add a context.xml with all your context specific configuration including the realm. A sample is below
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/myApp" reloadable="true">
        <Realm
            className="org.apache.catalina.realm.JDBCRealm"            
            driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"         
            connectionURL="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=myDB;SelectMethod=Cursor;"
            connectionName="username" connectionPassword="password"
            digest="MD5" userTable="users" userNameCol="userid" userCredCol="userpassword"
            userRoleTable="user_roles" roleNameCol="rolename"
        />
    </Context>Hope this helps.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    ----------------------------------------------------------------

  • Forms based authentication + Basic authentication = no way to use the basic auth!!!!

    Hi,
    I setup a test sharepoint site, claims mode, with both the forms and basic authentication  enabled.
    I expect to see the page asking me which authentication method I want to use, but I never see this page!!!
    I have to select the windows authentication (NTLM or Kerberos) to see this page!
    why using only the Basic authentication did not prompt the user?
    and how to be authenticated using the basic authentication rather than the forms auth when both are enable for the same site?
    >I do NOT want to extend my site to have 2 zones... my question is ONLY with 1 zone configured.

    What is the business purpose for using Basic Auth over NTLM/Kerberos?
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Web Service Call with Basic Authentication does not work

    If I try to use Basic Authentication in my Web Service Client with the automatically created methods
    setUsername(inUserName)
    setPassword(inPassword)
    setAddress(inAddress)
    the application does not make a call. Did I forget something?
    Is it possible to use "Test Method" with Basic Authentication?
    Thank you.

    Thank you for your answer.
    But: I already read this article. And it doesn't help me.
    I use the following code:
                getMyServiceClient1().setUsername(inUserName);
                getMyServiceClient1().setPassword(inPassword);With this code I always get a java.lang.NullPointerException.
    The methods setUsername and setPassword are definded as follows:
    public void setUsername(String inUserName) {
            myStub._setProperty(Stub.USERNAME_PROPERTY, inUserName);
      public void setPassword(String inPassword) {
            myStub._setProperty(Stub.PASSWORD_PROPERTY, inPassword);
      }But if I look at the methods which are generated automatically by Sun Java Studio Creator I cannot find _setProperty.
    I also found this thread in your forum:
    http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=54773

  • How to set up and test the Basic Authentication for HTTP protocol

    Hi,
    I tried configuring the password based Basic Authentication for sending xml document using ebMS - HTTP protocol. I set username and password while configuring the transport server for both trading partners. I want to know, is that sufficient for basic authenticaton. When I open the URI http://localhost:7778/b2b/transportServlet, it is not asking any authentication (username/password). Please note that I have not used SSL certificate. Anyone please help me out to configure Basic authentication.

    Hi Ramesh,
    Thanks for ur response. Could you please tell me where to set the Additional Transport header : authtype-basic#realm=myRealm(in which property file). In enqueue code, I could see the following attributes
    queue
    msgID
    replyToMsgID
    from
    to
    eventName
    doctypeName
    doctypeRevision
    msgType
    payload
    attachment
    subscriber
    Is it possible to set username/password in the enqueue attributes?
    Do i need to add username/password and Transport header in the input XML and defined that elements in xsd?

  • How do I protect my JNLP, my JARs etc. (with Basic Authentication)???

    hi all,
    i know that there is a FAQ ( [see here|http://lopica.sourceforge.net/faq.html#obfuscate] ) answering a related question with "You can use an obfuscator...". ok, but is there really no other solution?
    this is the simplified folder structure of my application on the server:
    [application]
      [etc]
        xyz.xml
      [jars]
        myapp.jar
      launch.jnlp
    website.jsp
    initial start and basic authentication:*
    my first idea was to secure everything underneath "application" with basic authentication via my web.xml (yes, i'm aware of the security concerns). this means everybody can access my website (here: website.jsp) which contains a start button that links to "launch.jnlp". as soon as the user clicks on it, the browser opens its standard authentication dialog since launch.jsp is in a protected area. after entering the correct credentials the jnlp-file is downloaded and java web start takes over control. first of all it seems as it tries to access the same jnlp-file again (??? --> probably in order to check for changes in the jnlp file --> this is certainly not the case for the initial startup) and then wants to download the relevant jar (myapp.jar). because both resources are protected jws opens its own basic authentication dialog where i have to enter the same credentials the second time. as far as i know, there is no solution to pass the credentials between the browser and the jvm.
    second start and basic authentication:*
    if the user starts my application for the 2nd, 3rd, ... time via desktop-link (set in jnlp-file) there is no need for accessing my website with a browser. therefore only the authentication dialog of jws gets displayed. so far, so good!
    and now the actual problem:*
    during runtime my application (signed with verisign certificate and having all permissions) uses commons-vfs and commons-httpclient to access resources on the same server (e.g. etc/xyz.xml). since they're underneath the protected "application" directory as well, my application needs the same credentials the user already entered in the authentication dialog of jws. now i could retrieve these credentials by calling Authenticator.requestPasswordAuthentication() within my application and passing them to vfs and httpclient. however, doing so opens up jws' authentication dialog again. grrr!!! is there a way to prevent this?
    related thougts:*
    i know i could disable jws' default Authenticatior and set my own Authenticator which might be able to return already entered credentials without opening the dialog a second time. however, it seems that even with <property name="javaws.cfg.jauthenticator" value="none" /> jws still opens its own dialog when acessing the JNLP file and the relevant JARs during the startup/download phase. of course, who else if not jws could handle that phase? my application might not even be downloaded at this point. so i guess setting my own Authenticator would not be a solution either (at least not if i want to secure my jnlp and my jars, too). quite the contrary, it would have to open another dialog... :-(
    my current solution:*
    for the moment i use jws' default Authenticatior which allows me to easily protect all my stuff on the server side (jnlp, jar, etc). i can live with the two login dialogs at the initial startup. and instead of querying the credentials from jws' default Authenticatior at runtime, i set two system properties for username and password in the (protected) jnlp-file, query them at runtime and hand it to vfs and httpclient. this prevents the 2nd (or 3rd) dialog but is definitely not a great solution. most of all i'm not happy with the fact that this somehow "destroys" the container-based security advantage of easily configuring authorized users via a separate mechanism e.g. tomcat-users.xml. now there has to be one master-password that has to be set in the jnlp-file! grrr!
    a possible alternative:*
    i'm not sure but would it be better to secure everything with form-based authentication on the website, and dynamically generate username and password into the jnlp-file? but what happens when the admin changes the password on the server and the user starts its application via desktop-link??? in case of basic authentication i think jws would popup the login dialog again. however, if i use the old username and password generated into the jnlp it won't work. i think the user then has to access the website again. this is not good at all! :-(
    the only real solution:*
    should i write a small application which can be downloaded by everybody and on startup queries the user's credentials, validates them with the help of our server, and uses the javax.jnlp-api to download the secured JARs of my real application? this seems so much overkill! does anybody have experiences with this approach? how difficult is it to implement the whole download/update stuff with javax.jnlp?
    WHAT HAVE I MISSED???
    AM I COMPLETELY WRONG???
    WHAT IS THE EASIEST WAY???
    AND WHAT IS THE BEST WAY???
    thank you so much,
    stephan

    Not sure, whether I understood correctly, what you wanna do - but up to now I can't see any problem.
    if you have a structure like this:
    /ctxroot/
           launch.jnlp
           /app/
               *.jar
               *.whateveryou may use in your web.xml:
         <servlet>
              <servlet-name>JnlpDownloadServlet</servlet-name>
              <servlet-class>jnlp.sample.servlet.JnlpDownloadServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>JnlpDownloadServlet</servlet-name>
              <url-pattern>*.jnlp</url-pattern>
              <url-pattern>/app/*</url-pattern>
         </servlet-mapping>
         <security-constraint>
              <web-resource-collection>
                   <web-resource-name>Application</web-resource-name>
                   <url-pattern>/app/*</url-pattern>
                   <http-method>GET</http-method>
                   <http-method>POST</http-method>
              </web-resource-collection>
              <auth-constraint>
                   <role-name>bla</role-name>
                   <role-name>fahsel</role-name>
              </auth-constraint>
              <user-data-constraint>
                   <transport-guarantee>CONFIDENTIAL</transport-guarantee>
              </user-data-constraint>
         </security-constraint>
         <security-constraint>
              <web-resource-collection>
                   <web-resource-name>Subscription</web-resource-name>
                   <url-pattern>*.jnlp</url-pattern>
              </web-resource-collection>
              <user-data-constraint>
                   <transport-guarantee>CONFIDENTIAL</transport-guarantee>
              </user-data-constraint>
         </security-constraint>
         <login-config>
              <auth-method>BASIC</auth-method>
              <realm-name>whatever-realm</realm-name>
         </login-config>
         <security-role><role-name>bla</role-name></security-role>
         <security-role><role-name>fahsel</role-name></security-role>
    ...Than you may use the Service stuff like:
         BasicService bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
         URL codeBase = bs.getCodeBase();
         URL pu = new URL(codeBase.toString() + "whatever.bla");
         HttpURLConnection res = (HttpURLConnection) pu.openConnection();
         res.setInstanceFollowRedirects(true);
         res.setRequestMethod("GET");
         res.setConnectTimeout(10 * 60 * 1000);
         res.connect();
         String enc = res.getContentType();
    ...Where is the problem? If you wanna intercept certain "calls" to an app resource, just use a filter, which decides, whether to answer the request directly by itself or to pass it to the JnlpDownloadServlet ...

  • Get current password in a basic authentication JSP

    Hello.
    I've written some JSP pages and I've protected them with BASIC authentication.
    I'd like to get the password that the user used to log in, because I need to execute a EJB method running on other server and this EJB method is also protected.
    Thanks in advance for your help
    Kind regards.

    I've just resolved it!
    Password comes in the request instance as "authorization" header coded in Base64.
    Only had to retrieve the header and decode it.

  • Invoking an external web service through a JCD with Basic Authentication

    Group,
    I am trying to invoke an external web service (written in ASP.Net) from a jcd (5.1.2). The web service is guarded by Basic Authentication. I have entered the crudentials into the External Web service environment component and deployed the project. I receive the following error from the .invoke() method:
    request requires HTTP authentication: Unauthorized
    I have tried the same request through SoapUI using the same crudentials and get back the response correctly. Has anyone tried invoking an external web service with basic authentication through a jcd in 5.1.2 before?
    One other item of note. I have another jcd calling a different external web service deployed on the same domain. I hope that this isn't interfering with the execution of this service as it doesn't require any crudentials to execute.

    Hey Chris.
    I am just starting to write a jcd that calls an external web service but cannot find any sample code nor instructions on how to do it in the supplied documentation. Could you send me a code sample from your one?
    Cheers
    Matt

  • How to call a web service from BPEL that requires HTTP basic authentication

    Hi All,
    I need to calling some Web Services from BPEL (SOA 10.1.3.1 production running on XP machine). The services require HTTP basic authentication.
    I have tried adding httpUsername and httpPassword properties to the ParnterLink, and I see in BPEL Console that they are deployed by checking the descriptor page. But I still get a SOAP fault, HTTP 401: Unathenticated.
    I have also tried using basicHeaders (from memory) = credentials, httpBasicUsername, and httpBasicPassword. Same result.
    I have done a packet trace using Ethereal, and the headers do not seem to contain the userid and password at all.
    Can anyone help?
    Thanks,
    Mark Nelson

    Thanks Bas,
    I have resolved the issue. The provider of the Web Service had not configured if for Basic Authentication. For some reason it worked when they tested, or maybe the did not test. The only thing I had to change was to use:
    <property name="basicHeaders">credentials</property>
    <property name="basicUsername">WMDATA</property>
    <property name="basicPassword">WMDATA</property>
    Instead of:
    <property name="httpUsername">WMDATA</property>
    <property name="httpPassword">WMDATA</property>
    I don’t know why this is, maybe because it is an Axis Web Service.
    Sorry for wasting your time.
    Regards Pete

  • Securing Web Applications by HTTP Basic Authentication

    We are working on providing security for web applications in Webdynpro.We downloaded the material from net regarding this.In that it was mentioned to open the webdynpro project's web.xml file in the Netweaver Developer Studio.In the material,we are asked to click the General  TAb and check "Login Configuration".But there is no such checkbox in our general tab screen.Also many tabs are missing like Context,Resources,mapping,Environment,EJB's,Web objects.How to enable/display these tabs?Is there any means of setting properties in the server to get these tabs?
    regards,
    J.Iswaryal
    K.Brinda

    Hi J.Iswaryal,
    I guess two things based on your post.
    1. You have created one wer service and you want to make secure this web service using HTTP basic authentication.
    2. You have such wweb service and you want to consume this web service lets say in webdynpro application.
    <b>For, point one,</b>
    After creating web service goto webservice perspective in NWDS. there, choose your web service project.
    Now, open Web service configuration file recided in your project.
    Here, go under config1-> security and double click on it.
    It will display security options for this web service.
    Choose transport protocol as HTTP, Authentication mechanism as HTTP authentication and choose Basic radio button.
    Now, save this, rebuild this and deploy on server.
    <b>For point 2,</b>
    Make model for your web service.
    before calling your web service, set your username and password in code as shown below.
    wdContext.current<web service model node>element().modelobject()._setusername(<username>);
    wdContext.current<web service model node>element().modelobject()._setPassword(<password>);
    Rehards,
    Bhavik

  • AS2 Basic Authentication - Receiver CC

    Hi ,
      I would like to know the Basic Authentication field in Receiver Communication Channel for AS2 Adapter . Our Trading Partner has provided with username and Password information but there is one more mandatory field Realm. Any idea what is this field and what information to be filled in ?
    Laks

    The Realm refers to the content management option used at your receiver. The same receiver organizations have domain specific content management solutions. If such a Realm is used, you need to provide that information. This information should be retrieved by receiver organizations only. This should not be mandatory field.
    Regards,
    Prateek

Maybe you are looking for

  • Difficulty in implementing a web dynpro application

    Hi All, this is Sangeet.I'm facing some difficulty in testing the dynpro application zz_00_bapiflight.When I test it shows that the context node does not exist. One more thing which I wanted to know is when a view is created , it asks for a user name

  • Time Capsule hard drive failure

    Hello, all I have a 500 GB Time Capsule that is about four years old. I use it to back up my MacBook Air and I also use it for file storage. Recently the HD has become erratic, in that it appears on Finder under Shared sometimes but not always. The w

  • Multi provider not activating

    hi, i have a multi provider which is based on two non cumulative cubes both the cubes are active and consistent now when i create multiprovider top of those cubes i am getting this error 'define the characteristics of the validity table for non-cumul

  • Help !!!  Re: Fianacial Analytics failed with Error Code = 36331

    I am getting an error exactly reported under another Post 'Re: Fianacial Analytics failed with Error Code = 36331' workflow log shows DB error to OLTP database.. ERROR : LM_36488 [Wed Aug 19 15:05:52 2009] : (5928|2384) Session task instance [SDE_ORA

  • Calculated Key Figures Issue!

    Hello Experts - I'm getting error messages for the calculated key figures. The message says that the key figure is not defined correctly. Therefore, I started breaking down the calculated key figures and use them in the eventual calculated key figure