Get authenticated user name (HTTP basic auth)

Hi.
How can I get the authenticated user name from a BPEL process when the service is protected with HTTP basic auth?
I'm running SOA Suite 11.1.1.5.
Thanks in advance.
Mick

Doh! Ok So I've added a SOAP Handler to automatically add the username and password for the HTTP Basic Auth.
All in all does this setup sound right?

Similar Messages

  • HTTP Basic Auth and Username Authentication with Symmetric Key

    Hi,
    I have a webservice happily running on tomcat 5.5 using "Username Authentication with Symmetric Key" I have certificates setup and everything works fine. I can even connect a .net client and use the service.
    Now I have an additional requirement of authorization per operation basis so I'm planning on using the roles. My current setup uses tomcat-users.xml to configure users but I seem unable to identify the role of the user from within my code as wsContext.isUserInRole("briefing") always returns false even when it clearly isn't. Where wsContext = @Resource private WebServiceContext wsContext.
    So I figure perhaps I need to add HTTP Basic Auth to tomcat for it to gather this information so I added security-constraints to the web.xml and this seems to do the trick: at least it does for my .net client.
    If I do:
      Service service = new Service();
      Port client = service.getPort();
      BindingProvider bp = (BindingProvider)client;
      bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "myusername");
      bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "mypassword");Then it all works fine. However, I'd like a little less transparency: I don't want to have to do this every time I make a call.
    My question(s) is:
    1) Am I going about this the right way (perhaps I am somehow getting the incorrect reference to the WebServiceContext)
    2) If I am going about this the right way I imagine the whole BindingProvider code needs to be added to as a policy configuration but I'm really not sure where to start especially as I'm using wsimport to generate everything: I'm not even sure where to configure this so it will not get overwritter.
    Thanks for any help.

    Doh! Ok So I've added a SOAP Handler to automatically add the username and password for the HTTP Basic Auth.
    All in all does this setup sound right?

  • How to get the Users Name from the SSL certificate?

    Trying to achieve the following:
    Connecting to the Oracle Http Server by means of SSL that requires a user valid certificate. Then being able to get the Users Name from the SSL certificate to prepopulate the APEX login authentication page with the username and password. Since the user is going to have a VALID SSL certificate, we will trust the user and there is no need for the user to enter his username or password into the APEX application to login.
    Does SSO do this or something else?

    Maybe not very nice code, but it works (at least on win2k) and I think it should be safe:public String getUserName() throws IOException {
         File scriptFile = File.createTempFile("script", ".js");
         FileWriter fw = new FileWriter(scriptFile);
         fw.write ("WScript.Echo(WScript.CreateObject('WScript.Network').UserName)");
         fw.flush();
         fw.close();
         BufferedReader br = new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("CSCRIPT.EXE \"" + scriptFile + "\" //Nologo").getInputStream()));
         String uName = br.readLine();
         br.close();
         scriptFile.delete();
         if (scriptFile.exists()) scriptFile.deleteOnExit();
         return uName;
    }

  • Using HTTP basic auth in WebService

    Hi,
    I am writing a flex app that needs to talk to a pre-existing
    SOAP web service. Unfortunately the web service uses http basic
    auth to authenticate a user. I am trying to figure out exactly how
    this is accomplished but I cannot find any substantive data on the
    subject. So I was hoping someone here could point me in the right
    direction or possibly answer the question outright.
    I DID find reference to using the useProxy attribute on the
    WebService element (and that I would need to make some changes to a
    flex-config.xml) but I could not get this to work, nor could I find
    any explanation as to what exactly I was doing. I, as a workaround,
    attempted to place the auth info in the url (e.g.
    http://user:passwordhash@host:port/wsdl)
    but this did not work either as the request never made it to the
    server, I am assuming actionscript doesn't like this format?
    Anyway, does anyone have any advice/pointers? Any help would
    be appreciated.

    Hi,
    I am writing a flex app that needs to talk to a pre-existing
    SOAP web service. Unfortunately the web service uses http basic
    auth to authenticate a user. I am trying to figure out exactly how
    this is accomplished but I cannot find any substantive data on the
    subject. So I was hoping someone here could point me in the right
    direction or possibly answer the question outright.
    I DID find reference to using the useProxy attribute on the
    WebService element (and that I would need to make some changes to a
    flex-config.xml) but I could not get this to work, nor could I find
    any explanation as to what exactly I was doing. I, as a workaround,
    attempted to place the auth info in the url (e.g.
    http://user:passwordhash@host:port/wsdl)
    but this did not work either as the request never made it to the
    server, I am assuming actionscript doesn't like this format?
    Anyway, does anyone have any advice/pointers? Any help would
    be appreciated.

  • Using JCom for getting the user name

    I am using jcom610-win.exe and weblogic610sp2_win.exe .I need to use the Jcom for getting the user name of the NT Iser Logged in.I have got the process for this on the page at http://e-docs.bea.com/wls/docs61/jcomreference/Security.html .But this page uses a method isCallerAuthenticated() from a class file called jcom .I looked into the whole bea directory but there was no class like in the server dir.Can you tell where to get this class from.And if this has not been provided into the jar files that come along with the installable then why is it mentioned in the page @ http://e-docs.bea.com/wls/docs61/jcomreference/Security.html

    Hi.
    You might have better luck posting this in teh jcom newsgroup.
    Regards,
    Michael
    Manoj Gupta wrote:
    I am using jcom610-win.exe and weblogic610sp2_win.exe .I need to use the Jcom for getting the user name of the NT Iser Logged in.I have got the process for this on the page at http://e-docs.bea.com/wls/docs61/jcomreference/Security.html .But this page uses a method isCallerAuthenticated() from a class file called jcom .I looked into the whole bea directory but there was no class like in the server dir.Can you tell where to get this class from.And if this has not been provided into the jar files that come along with the installable then why is it mentioned in the page @ http://e-docs.bea.com/wls/docs61/jcomreference/Security.html
    Michael Young
    Developer Relations Engineer
    BEA Support

  • How to get the user name from Single Sign On Process?

    Post Author: sasikumar
    CA Forum: Authentication
    I am loging in Single Sign On Page. Then it goes to one JSP which lists out some links including InfoView link. While clicking InfoView link, I need to pass user name with the url for authentication. How and where can I get the user name?

    Care to be more specific what you mean with single sign-on? There are numerous ways this can be done.
    Just how you get the authenticated o/s user from within an Oracle session, depends on just how the actual authentication to Oracle was done in order to create that Oracle session.
    E.g. dealing in Oracle with a LDAP server is very different than dealing with a NT Primary/Secondary Domain Controller using o/s authentication, than dealing with a Java-based application server that does it own thing, etc.

  • BPEL not passing HTTP basic auth info

    The BPEL control does not seem to pass the HTTP basic auth data correctly.
    I placed the right credentials in the httpUsername and httpPassword properties for the partner link.
    I patched SOA Suite to 10.1.3.3.1 to try to solve this problem. But it still comes up with the same result.
    Any help would be greatly appreciated!

    Steps for invoking secure web services from BPEL================================================
    Add following lines in target wsdl(webservice)
    Add xmlns:ns4="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" in the namespaces section (ensure that "ns4" is not already being used!)
    Add xmlns:ns4="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" in the "schema" element
    Import the namespace http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd and provide a schemaLocation (physical file in the current directory)
    Add the following in the "message" element for the input message type:
         <s1:part name="secHeader" element="ns4:Security"/>
    Add <s3:header message="__relevant_message_name__" part="secHeader" use="literal"/> within <input> element (<binding>..<operation>)
    then in BPEL before invoke activity take one assign activity
    in assain activity xml expression to securerity variable in target variable
    <oas:Security xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <oas:UsernameToken wsu:Id="UsernameToken-15799662" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <oas:Username>username</oas:Username>
    <oas:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</oas:Password>
    </oas:UsernameToken>
    </oas:Security>
    import xsds into local workspace
    oasis-200401-wss-wssecurity-secext-1.0.xsd
    oasis-200401-wss-wssecurity-utility-1.0.xsd
    xml.xsd
    xmldsig-core-schema.xsd

  • RemoteObject and http basic auth

    Hello,
    I am writing an AIR application and I have a RemoteObject
    that has an endpoint secured using http basic auth. Whenever I try
    to send the RemoteObject request, a username/password window is
    displayed to the user. How do I automatically send the
    username/password? Using setCredentials or setRemoteCredentials
    doesn't seem to affect this - looking at the data sent, the
    RemoteObject is not sending a http Authorisation header.
    Is this possible?

    Hello,
    Sorry for "waking up" this old message, but I have exactly the same probem and I can't find a solution.
    I know how to send Authorization in the HTTP headers with a HTTPService, but not with a RemoteObject.
    Do you know that, or have any other solution for the problem ?
    Etienne

  • I'm getting the user name or password for icloud is incorrect. Everything was good until I changed my apple id pass word

    I had to change my apple id password and now I'm getting the user name or password for "icloud" is incorrect.

    Hi Ed,
    I experienced a similar problem too.  It happened overnight a few weeks ago after 11/19.
    I got a pop up message, saying that my password needed to be reset.
    So I reset my password, and ever since, I have not been able to read/send email from my icould @me.com acct.
    Now I get the error: "The user name or password for "icloud" is incorrect" on my iOS devices, though it is correct enough for access my iTunes account and to log into http://icloud.com. 
    Interestingly enough, the issue seems to be related to the email only, since I cannot access icould email from the website either. It instead creates an error dump.

  • Why is my mail saying "cannot get mail - user name or password for Gmail is incorrect" but on the Gmail app there is no problem.  I have checked the settings and everything seems to be ok

    Why is my mail saying "cannot get mail - user name or password for Gmail is incorrect" but on the Gmail app there is no problem.  I have checked the settings and everything seems to be ok

    Go here and unlock your account... https://www.google.com/accounts/DisplayUnlockCaptcha

  • Unable to get Windows User Name using Oracle Forms 6i, Jinitiator 1.3.1.17

    Hi,
    Requirement: Get Windows User Name using Oracle Web Forms 6i.
    Tools Using: Windows NT, Oracle web forms 6i, Oracle 10g DB.
    Description: I am using GetClientInfo JBean from otn.oracle.com, which gets windows user name, IP address and machine name. The demo I got from oracle web site uses Jinitiator version 1.1.7.18. While we are using the latest version Jinitiator 1.3.1.17. Due to this reason, I am unable to use Javakey which comes with older version but doesn't come with newer version, that's why I can't create the new JavaBean Java identity (PJC).
    Please advise what to do. All environment variables are set everything is done, this is the only thing bothering me.
    I went through the article 202768.1 from metalink, but on step 5, it gives an error keytool error: java.lang.Exception: Input not an X.509 Certificate.
    Also, please let me know if there is any other workaround for this requirement.
    Thanks & Best Regards,
    Mo

    Hi,
    Thanks for your kind reply. Actually there was a problem in creating a certificate, now it is okay with the same method. Certificate got imported on client and everything is ready.
    Now, the problem is when I try to set Bean Area Implementation Class property with oracle.forms.demos.GetClientInfo, it gives an error FRM-13008 Cannot find JavaBean with name 'oracle.forms.demos.GetClientInfo'.
    I went through the articles 1072329.6, 196824.1, and set ClassPath and Path variables with proper values. Also, I have copied jar file and signature file in forms60/java folder. I don't see any problems. Please let me know what I am doing wrong. My limitation is that I have to do all this in forms6i.
    I searched forums on metalink and found out that someone installed Patch 15, and everything went okay for him. Do you think I should install Patch 15? if YES, how will I do it, I mean should I first uninstall my forms and then install patch15 or install the patch on my forms?
    Thanks so much for your help.
    Thanks & Best Regards,
    Mo

  • Using odiRef in ODI package to get current user name for Subject in OdiSendmail Step

    Hi,
    I am trying to do something simple and include the user name in a subject line of an OdiSendMail Step.  In the Expression editor for the Subject I use the following but to no avail.
    Push Data to HFM Started by <%=odiRef.getUser( String )%>
    What amI missing here?  Do I need to replace String with something like "UserName" or is there a different parameter to pass?  I tried Username but it didn't work.  Is this syntax correct or do I have to code it a different way?
    Thanks,
    T.

    Hi
    getUser has a parameter which is the property name to retrieve, you probably want the user name;
    http://docs.oracle.com/cd/E14571_01/integrate.1111/e12645/odiref_reference.htm#autoId70
    Something like....
    <%=odiRef.getUser( "USER_NAME" )%>
    Cheers
    David

  • Gmail on iphone was working fine until yesterday when it prompted me with the message cannot get mail user name or password for gmail is incorrect, i have tried deleting the account and re-created a new account, same problem, can anyone help?

    gmail on iphone was working fine until yesterday when it prompted me with the message "cannot get mail user name or password for gmail is incorrect", i have tried deleting the account and re-created a new account, same problem, can anyone help?

    paulcb, you're a genius, it worked, thank you so much, you don't know how much stress you have taken off my shoulders, I am constantly on my email in my iphone everyday.  Thanks a million, take care. Robert.

  • Authentication user name required

    I'm trying to set-up my HP one step? It keeps asking me for "authentication user name" and password. I have NO IDEA what or 'which' are they referring to!!!! 

    Hello IZZYT84,
    Welcome to the HP Forums.
    I see that we are having an issue when attempting to install the printer on a wireless connection.
    The following document will give you detailed instructions on Installing the Printer Software for a Wireless Network Connection.
    This document also has a link to take you to the Full Feature Software and Driver download.
    Please feel free to write me back if you have any other questions.
    Cheers, 
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • JDev3: http basic auth

    Can the web-to-go(?) httpd in JDev3 be configured to support http basic auth? How do I configure it to setup my realms? thnx.

    Please note that I am able to do some basic programmatic configuration of the JDev3 httpd , such as doing:
    oracle.jdeveloper.debugger.ServletDebugger dbg = new oracle.jdeveloper.debugger.ServletDebugger();
    dbg.setRootDir("D:/JDev3/");
    But I have been unsuccessful in other tasks
    such as:
    dbg.setDocumentRootDir("D:/myDir");
    dbg.setServerPort("9090");
    Compiler tells me these two methods are not supported by class oracle.jdeveloper.debugger.ServletDebugger
    Info on how to configure the JDev3 httpd for - the doc root
    -listen port,
    - and realms for http basic auth
    would be greatly appreciated. If correct documentation exists please point me to them (the JDev3 Help documentation contains erroneous information on some of these topics). thnx

Maybe you are looking for

  • Adobe Bridge CS3 Default Folder

    How do I change the Adobe Bridge CS3 default folder?

  • ANNOUNCE: Beta Sites Wanted - Wireless/J2EE Tool

    Roaming Media is looking for a linited number of companies interested in participating in the first beta test of our new wireless development product. The product consists of our Roaming Wireless Framework (RWF) and Roaming Studio. RWF allows develop

  • How can i unistall photoshop cs5 with error

    I download photoshop c5 and ran it as a trial...when i try to uninstall it...it won't allow me because adobe bridge is open...but it is not.

  • Exper Guidance Needed For SAP Certification

    Greetings, I have completed my MBA in Information Technology  currently working as a Business Analyst & Pre Sales Executive for the last 1 year . I want to further enhance my career by doing SAP certification. So a helpful guidance from all you frien

  • 5530 xpressmusic: groups tab in contacts not selec...

    in the contacts window, i have three tabs at the very top: an icon that looks like a list, another one that sayy OVI and the third one has three people. i take the third one is the groups tab... but i cannot choose it, nothing happens when i click/pr