How to change SSO user's password: Get LDAP URL

Hi,
I would like to add a 'change user SSO password' form to my BC4J application. The form's submit button fires an action that calls a PL/SQL package. This package receives 7 parameters, and uses de dbms_ldap package to change the user's password.
Parameters:
- LDAP Host
- LDAP Port
- User DN
- SSO Username
- Old Password
- New Password
- Retyped New Password (for confirmation)
I'm trying with a DataForwardAction event whose purpose is to get the user's account information and the LDAP location, but I can't get the LDAP Location (ClassCastException) and the SSOUsername (NullPointerException).
I'm using JDeveloper 10.1.2.0.0 (Build 1811)
My question is: ¿What am I doing wrong? ¿Is there any easier way to do this?
The code is below:
import javax.servlet.http.HttpServletRequest;
import oracle.adf.controller.struts.actions.DataActionContext;
import oracle.adf.controller.struts.actions.DataForwardAction;
import oracle.security.jazn.JAZNConfig;
import oracle.security.jazn.spi.ldap.LDAPJAZNProvider;
public class ChgPwdAction extends DataForwardAction
  public void onChange(DataActionContext ctx) throws Exception
    HttpServletRequest request = ctx.getHttpServletRequest();
    String host                = null;
    String port                = null;
    String userDN              = null;
    String SSOUsername         = null;
    String oldPwd              = null;
    String newPwd              = null;
    String confirmNewPwd       = null;
    try
      LDAPJAZNProvider ldapProvider = (LDAPJAZNProvider)JAZNConfig.getJAZNConfig().getJAZNProvider();
      host = ldapProvider.getJAZNConfig().getLocationURL().getHost();
      port = "" + ldapProvider.getJAZNConfig().getLocationURL().getPort();
    catch (ClassCastException e)
      //System.out.println(e);
      throw new Exception("Missing LDAP location");
    try
      userDN = request.getHeader("Osso-User-Dn");
    catch (NullPointerException e)
      //System.out.println(e);
      throw new Exception("Missing User DN.");
    SSOUsername   = request.getRemoteUser();
    oldPwd        = (String)request.getParameter("oldPwd");
    newPwd        = (String)request.getParameter("newPwd");
    confirmNewPwd = (String)request.getParameter("confirmNewPwd");
    request.setAttribute("Host", host);
    request.setAttribute("Port", port);
    request.setAttribute("UserDN", userDN);
    request.setAttribute("SSOUsername", SSOUsername);
    request.setAttribute("OldPwd", (String)ctx.getHttpServletRequest().getParameter("oldPwd"));
    request.setAttribute("NewPwd", (String)ctx.getHttpServletRequest().getParameter("newPwd"));
    request.setAttribute("ConfirmNewPwd", (String)ctx.getHttpServletRequest().getParameter("confirmNewPwd"));
    //System.out.println (userDN + "-" + SSOUsername);
  // To override a method of the lifecycle, go to
  // the main menu "Tools/Override Methods...".
}Thanks in advance.

Hi again,
First of all, thanks for your reply.
Yes, I know I can use JNDI instead of a call to a PL/SQL package (I visited this link: http://forum.java.sun.com/thread.jspa?threadID=592611&start=0 that explains how to do it), but in both cases I have the same problem: I don't know if it's possible to get the LDAP's environment specifications (PROVIDER_URL, SECURITY_PROTOCOL) dynamically.
Our production environment's LDAP is not the same as our development environment's LDAP. This is why I want to get this information dynamically.
I think that this information is stored in the jazn.xml file: Is there any way to get this information?
Thanks a lot.

Similar Messages

  • How to change a users login password via single user mode, plus multiple issues?

    So, there is much to this Thread.
    (First Issue)
    A lil back ground, i'm working on a MacBook Pro 3,1 running OS X Tiger 10.4.(something, no idea), the The user has forgotten their account password. Now before you tell me to just change it through the Root Admin account, that account seems to have its own issues, the accounts do not show up in the system preferences, therefore not allowing me to change that users account password.
    (Second Issue)
    Once I'm able to login into the users account, is there any way to disable / erase / eradicate the key chain system?
    (Third Issue)
    All of a sudden the MacBook has lost all audio capability, both in the built in speakers and through the headphone jack.
    i'm open to any ideas, its currently 10:14am the user is wanting this to be done by 2:45pm please help i'm desperate and i don't want to be defeated by a Mac

    It's possible some of these things are related. I'd first do a basic verification of the computer's system.
    First, if at all possible make a backup of the drive in its present configuration. If something goes wrong during repair attempts and makes things worse you will have a backup. You will have to decide how to work this in the light of any present backups you may have, for example, a backup that may be a few days out of date. In that case you may want to keep that one and make a second backup of this as they are now, though I realize people often don't have a lot of empty drives sitting around.
    Boot from the System installer disc that came with your computer or is the one for the version you currently have on there, select language if applicable, choose utilities, run Disk Utility and verify (and repair if necessary) the drive. You can verify a drive from DU on your main drive while booted but I have found this can result in incorrect reporting of errors. To repair your drive you have to run it from a drive other than the boot drive anyway.
    Next, boot from your drive in [Safe Mode|http://docs.info.apple.com/article.html?artnum=107393] and repair permissions. You can repair permissions while booted from the installer disc but this uses the permissions configuration on the installer disc which may be out of date if you have run any updates on your computer. Booting your computer to Safe Mode restricts the number of things running on your computer while permissions are being run and does a bit of spring cleaning at the same time.
    [Resolve startup issues and perform disk maintenance with Disk Utility and fsck|http://docs.info.apple.com/article.html?artnum=106214]
    [Using Disk Utility in Mac OS X 10.4.3 or later|http://docs.info.apple.com/article.html?artnum=302672]
    [Disk Utility's Repair Disk Permissions|http://docs.info.apple.com/article.html?artnum=25751]
    From BDaqua (couldn't have said it better):
    "Try Disk Utility
    1. Insert the Mac OS X Install disc that came with your computer (Edit: Do not use this disc if it is not the same general version as what you have currently on your computer, e.g. use a Tiger disc for a Tiger drive, not a Panther disc), then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
    5. Select your Mac OS X volume.
    6. Click Repair. Disk Utility checks and repairs the disk.
    Then Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes."

  • How can I Change a User's password remotely

    Hi all
    I setup an iChat Server. I need to allow the users the ability to change their password without physically accessing the server (including via Remote Managment)
    Thow some iChat(jabber) Clients support changing the password, the iChat Server does not appear to have this option.
    Is there any way to remotely change a user's password ?
    A possible solution would be to setup a Webpage allowing the user to logon and change the Password.
    Is there any web managment tool on OS X Server for this ?
    Any other sugestions?
    Thanks,
    Best regards

    This is getting depressing. I've just speand most of a day getting the OID to support ldaps SSL protocol, since I read that a number of active directory services only allow password change if the connection is encrypted. Finally got my ldaps connection, but the NoPermissionException is still there. The user I'm signing on as is definitely has user security management permissions. I can't seem to modify attributes at all. I added my own optional attribute to the schema, but JNDI can't set it.
    Perhaps the oracle LDAP library in jpdk might help, but I'm not hopeful. If I could find any API documentation I might be more moved to try, but I see no setPassword methods in the relavant classes. This just looks like a fairly thin wrapper for JNDI anyway.
    Does anyone know where the API doc for oracle.ldap.* is? Has anyone got a password to change other than by the SSO's built in change password dialog?
    I'm not hopeful. On these boards I've found many questions along these lines but, thus far, no answers.

  • How to change your Administration Server password when you're locked out

    How to change your Administration Server password when you're locked out
    The Netscape server products are all managed by a single administration
    server, which gives you a web forms-based interface you can use to
    configure them, start/stop them, check their logs, and so forth.
    <P>
    There are three levels of protection that keep the general public from
    being able to get into your administration server and mess up the
    configuration of any Netscape servers you have installed:
    <P>
    <OL>
    <LI> <B>Obscurity:</B> Your administration server can run on any port you'd
    like (usually something between 81 and 30,000), so if an attacker
    doesn't know what port to find your admin server on, he can't get
    into it.<P>
    <LI> <B>Host restrictions:</B> You can tell your admin server to only allow
    connections from specific hosts, and to reject all other hosts.
    <P>
    <LI> <B>Password protection:</B> Even if a user connects to your admin server
    from a valid host, he won't be allowed to get into even the first
    page unless he presents a valid username and password.
    </OL>
    <P>
    If you, the legitimate administrator of your web server, are unable to
    access the administration server (if you forgot your password or the
    admin port number or if you accidentally locked your own site out),
    then here is how to get past each of these levels of protection:
    <P>
    <OL>
    <LI> If you don't remember what port your administration server is
    running on, just look in your "ns-admin.conf" file, which is in
    the "admserv" directory under your Netscape server directory.
    (For 1.x web servers on Windows NT, run "regedt32" and go to the
    "HKEY_LOCAL_MACHINE\SOFTWARE\Netscape\Administration" section).
    You will see a "Port" entry there that specifies what port your
    admin server is on. You can change this value if you want your
    admin server to run on a different port, but make sure you restart
    the admin server after you change the value.
    <P>
    <LI> If your admin server is complaining "Unauthorized host" when you
    try to connect to it, then you can open it up to all sites by
    going into the "ns-admin.conf" file or the "Administration"
    section of your NT registry, as described above, and deleting the
    lines for "Hosts" and "Addresses" (either one of those might not
    be present) then restarting your admin server (on Unix run
    "stop-admin" then "start-admin"; on NT go into the Services
    control panel and stop/start the "Netscape Administration" or
    "Netscape Admin Server" service). You will then be able to get
    back into the admin server, where you can then try new settings
    for your host and address restrictions if you wish.
    <P>
    <LI> If you have forgotten the password to your admin server and now
    you can't log into your admin pages, all is not lost! Go into
    your "ns-home" directory, and into the "admserv" directory under
    that. You should find an "admpw" text file containing a simgle
    line of text, something like this:
    admin:lnOVeixulqkmU
    The first part of that line is the name of your admin account
    (usually just "admin"), and the second part is your admin
    password, encrypted. Edit this file to remove the encrypted
    password so that your file looks like this:
    admin:
    Then shut down your admin server, bring it back up again, and log
    into your admin server but don't give any password. It should let
    you in, at which point you can then go to the appropriate
    configuration page to set a new admin password, and then you're
    back in business.
    </OL><P>
    Note that because it is so easy to change the admin password this
    way, it's good to periodically make certain that your admin
    password file and your web server's configuration files are not
    left world-writable, and that only trusted people have access to
    them. (By default they're not world-writable, but it's good to
    make sure of this from time to time.)

    If you mean that yu forgo the password for yur encrypted backup then you can only:
    Warning: If you encrypt an iPhone backup in iTunes and then forget your password, you will not be able to restore from backup and your data will be unrecoverable. If you forget the password, you can continue to back up and use the device, however you will not be able to restore the encrypted backup to any device without the password. You do not need to enter the password for your backup each time you back up or sync.
    If you cannot remember the password and want to start again, you must perform a full software restore and when iTunes prompts you to select the backup from which to restore, choose set up as a new device.
    Above from:
    http://support.apple.com/kb/HT4946

  • I suddenly recieved 6 'How to change your Apple ID password' emails, even though I haven't been on the Apple site in months....should I be concerned that someone is trying to use my account?

    I suddenly recieved 6 'How to change your Apple ID password' emails, even though I haven't been on the Apple site in months....should I be concerned that someone is trying to use my account?

    I wouldn't be too concerned. The most likely cause is that someone is attempting to login and made a mistake in entering their Apple ID and typing yours instead. So, they are getting an error and offer to reset their password. But the email that generates is being sent to the real owner of the Apple ID they are entering, you. If you are really concerned, you can go to the Apple support site and reset your password yourself to be on the safe side.

  • Automatically change AD User's password hourly

    Hi
    I was wonder if there was a script or some kind of way which could reset a specific user's password every hour and save the password to a .txt file or maybe to a SQL table? I found one program however it emails the password rather than saving it to a file
    (and isn't free). I am using the NPS RADIUS server role and would like guests to have temporary access without having to create and delete an account every time (or have a static password allowing them to rejoin the network if they return).
    Thanks :)
    [Using Windows Server 2008 R2]

    Hello,
    I just have an idea about this.
    Save all the passwords you want in a text file and give full control access to your own user and remove the rest of the ACL entries except Domain Admins.
    Create a Powershell script to reset user password. This Powershell script reads the new passwords from the text file and will delete the newly assigned password from the text file. In that case your text file will be fresh with unused passwords.
    Run the Powershell script as schedule task on hourly basis with your own user.
    To understand how to reset password using Powershell check:
     How to Change a User's Active Directory Password with PowerShell
    Mahdi Tehrani Loves Powershell
    Please kindly click on Propose As Answer or to mark this post as
    and helpfull to other poeple.

  • What changing of user's password can affect?

    Hello everybody,
    I would like to change my user's password (which is also the administrator account) which I use to access my Mac. But I have several questions regarding it:
    What services will changed password actually affect? (Keychain, etc.?)
    What interests me the most is will it affect my encryption password? I mean passphrase which is used to unlock my encrypted storage? Or access password and encryption passphrase are separated from each other? As I know, passphrase is actually encrypted password for access. But I am not pretty sure in this statement.
    And one question regarding passphrase for the encrypted storage. Can I store it to the Apple servers if I did not do it when I was establishing encryption of my storage? I remember that this option was offered by the system.
    Thank you in advance.

    mende1,
    Thank you for the quick response.
    Just will bring some clearness. By "passphrase" I meant "recovery key" which is provided by FileVault. So as you mentioned, it should not bring any changes to my recovery key. I just thought that login password and recovery key is something related to each other, as after user enters a password, then storage gets "unencrypted" in the sense that user can cooperate with it as long as user is logged into the system.
    Summing it up, it turns out that recovery key is established only once and is not get changed by any changing of any system-related password? (Except for the case when FileVault has been disabled and then enabled once again. So by doing this user will get new recovery key.)
    mende1 wrote:
    Apple allowed you to store your recovery password in their servers. You can check if you can do it now in System Preferences > Security & Privacy > FileVault, but it's quite possible that it will not allow you to do it
    I have tried it, but you are right. It does not have any option to store encryption key to the Apple's servers.

  • How to check SSO user from database?

    Hi:
    I've posted this topic in Forms forum:
    How to check SSO user from database?
    then as I've been told, it's better to post it here, so ...... here is the question:
    I'm writing a "before delete trigger" to insert into log table before delete. Is there a way that I know from database the current SSO user when SSO users share one database user?
    Just like in Oracle Application Express there is v('APP_USER') to know the current user.
    Saad,

    End users are manipulating data through Oracle Forms(and SSO through portal) and the thing I need is to trace the SSO username from database without modifying forms, I mean purely from database taking into consideration that SSO users are sharing one database user. Is it possible?
    Saad,

  • Question on how to Hide the User Name, Password, and Domain fields in the MDT Wizard

    MDT 2012 U1
    Deploying Windows 7 via Offline Media (ISO) to MS Virtual PC's
    I am looking on how to Hide the User Name, Password, and Domain fields which are prepopulated in the MDT wizard via the CS.ini (Not so concerned about the Domain field as I am User Name and Password)
    We do need the Computer Name and OU fields to be seen, so skipping the wizard is not a option
    The client just does not want these fields to be seen by the end users, they dont want them to even know the account name used for adding the machine to the domain, of course the password is not displayed but it must not be displayed either.
    But since we use the fields they must still  be fuctional just not seen.
    Thanks.....
    If this post is helpful please click "Mark for answer", thanks! Kind regards

    You shouldn't have to edit DeployWiz_Definition_ENU.xml. You should only need to add "SkipAdminPassword=YES" to the CS.ini file and your authentication information.
    Example:
    [Settings]
    Priority=Default
    Properties=MyCustomProperty
    [Default]
    OSInstall=Y
    SkipCapture=NO
    SkipAdminPassword=YES
    UserID=<MyUserID>
    UserPassword=<MyPassword>
    UserDomain=<MyDomain.com>
    SkipProductKey=NO
    SkipComputerBackup=YES
    SkipBitLocker=NO
    -Nick O.
    Nick,
    SkipAdminPassword=YES is for:
    You can skip the Administrator Password wizard page by using this property in the
    customsettings.ini.
    I am hidding the Username/Password/and domain field in the computer name Wizard pane which is read from the cs.iniDomainAdmin=xxxxx
    DomainAdminPassword=xxxxx
    DomainAdminDomain=xxxxxx
    JoinDomain=xxxxxx
    If this post is helpful please click "Mark for answer", thanks! Kind regards

  • I got an ipod touch from my friend, but can't figure out how to change the apple id to get games. Help?

    I got an ipod touch from my friend, but can't figure out how to change the apple id to get games. Help?

    Never mind, I got this.

  • How to change your user name for the Ipod nano...

    Can anyone please explain how to change the user name on your Ipod nano?

    hiya!
    do you mean the nano's name in the ipod source list?
    if so, select the ipod in the itunes sourcelist. click on it once, and pause for a second or so. you should then be able to type in what you please.
    love, b

  • How to change my apple id password, but i dont remember sequrity questions and i cant reach reset email

    how to change my apple id password, but i dont remember sequrity questions and i cant reach reset email

    Hi sisot,
    Thanks for visiting Apple Support Communities.
    You may find this article helpful with resetting your security questions:
    Rescue email address and how to reset Apple ID security questions
    http://support.apple.com/kb/HT5312
    However, if you're not able to receive email to your rescue email address, you may need to contact iTunes Store Support:
    You'll need to contact iTunes Store support to have your questions and answers reset.
    After your password, security questions and answers are reset, I'd recommend providing a different rescue email address:
    You can edit or delete your rescue email address at My Apple ID. To edit your rescue email address:
    Navigate to My Apple ID using your web browser.
    Click "Manage your account"
    When prompted, sign in using your Apple ID and password.
    Click Password & Security
    You'll be asked to answer 2 of your 3 security questions before you can make any modifications. If you are unable to remember your answers, you can choose to send an email to your rescue email to reset your security questions.
    All the best,
    Jeremy

  • HT1918 How to change my app store password ?

    How to change my app store password?

    Hi Medhataskar,
    If you can't remember your Apple ID Password, or want to change it, use the password retrieval process at My Apple ID. Follow these steps to change your Apple ID Password:
    1) Go to My Apple ID and click Reset your password.
    2) On the next page, enter your Apple ID Name and click Next.
    3) Authenticate by email or by answering the security question.
    4) By following the emailed link or answering the security question, you'll be presented the option to reset your Apple ID password.

  • How to change the Apple ID password if forgotten?

    How to change the Apple ID password if forgotten?  Security Question also was not set.  Please help.
    Thanks!

    Hi Coolhand17,
    Welcome to the Apple Support Communities!
    If you forgot your Apple ID password and would like to reset it, please follow the instructions located in the attached article. 
    If you forgot your Apple ID password - Apple Support
    Best regards,
    Joe

  • How to change Analyzer user password with Administration API?

    Hi,<BR>I would like to change Analyzer user password with Administration API. Can someone post some sample commands to do the task?<BR><BR>I would just like to write an application to change end user's Analyzer password.<BR>As I see I would need to do the following:<BR>1. login with admin userid/password<BR>2. execute some method to change password for required userid. I think the input parameter should be userid (of the user I would like to change password) and new password (the new password for the user).<BR>3. logout<BR><BR>Can someone post some sample code (commands to execute)?<BR><BR>Thanks,<BR>grofaty<BR><BR>My system:<BR>Analyzer Server 7.0.1.<BR>Essbase server 7.1<BR>Windows XP SP2<BR>

    <blockquote>quote:<br><hr><i>Originally posted by: <b>knightrich</b></i><BR>Hello Mr. Jordan.<BR><BR>I would like to exchange some thoughts about "housekeeping" Analyzer reports in preparation for migration from Analyzer 7.0.0.0.01472 to 9.x:<BR><BR>...<BR><BR>Did you solved such a problem or do you have an idea if it could be solved with the Admin API methods?<BR> ...<BR>Migration from 7.00 to 9.x: As we heard last week the "Migration Wizard for Reports" in 9.3 should be able to migrate reports. Do you have experience or more detailed information about that Wizard?<BR><BR>Many thanks in advance<BR><BR>knigthrich<hr></blockquote><BR><BR>knighrich, <BR>I'd like to be more help, but I have no experience with System 9. I did substantial cleanup when we migrated from Analyzer 6 to Analyzer 7.1, and even more cleanup when moving up to 7.2, but our installation is smaller in scale than yours and we didn't need to automate report cleanup.<BR><BR>You might be able to get the ownership information you need through the back door, doing a direct query on the database, but simpler might be an export users, at least from 7.0. (This facility probably doesn't exist in system 9; it was dropped in 7.2 in favor of an undocumented API) The export file is an xml file that could easily be parsed to identify reports that have the administrator as user and then a second pass to delete those with otuer ownership as well. As previously suggested, you might be able to get this by a well crafted SQL query against the repository.<BR><BR>Procedurally, we have both public reports that have the blessing of management and are widely available, owned by a "public owner", and private reports developed by indivdual users and shared or not. Our team maintains the public reports, but not the private reports. We may be asked to make a previously private report public and take over maintenance of it. <BR><BR>I hope that you can find a solution that meets your needs. Certainly a call to customer support to identify a poorly documented feature would be in order.<BR>

Maybe you are looking for

  • A better way to do ChangeListeners?

    I find myself having to implement multiple change listeners in a single class, and I was wondering if there was a way to do this that wouldn't trigger compilation problems. For example, let's say you have a LineChart, and you want the chart to listen

  • Can't rearrange apps in iTunes 11.1

    When my iPhone 5s is plugged into my desktop running iTunes I used to be able to drag and drop app icons from page to page. This no longer seems possible. Can anyone shed any light on this problem? The instructions (small type at bottom of page) indi

  • Exception HAndling B2B 11g .AQ Integration

    Trying to catch the B2B exception for 850 and send it to SOA. I have used AQ integration for B2B.Please tell me how to implement this in soa

  • Excise duty and vat

    Dear all, client wants  that , one excise duty is deductible and another excise duty is non deductible in PO . Same way vat also non deductble and deductible. please give configuration for this one. create condition type deductble and non deductible

  • Can iWeb publish to NOT .Mac?

    Hi All - I'm not a .Mac subscriber. I don't really have a need for it, but I like the look of iWeb. I'd like to use it to publish some stuff, especially blogs and podcasts, but to my own website. Can it be done, or is this strcitly as .Mac tool? -Tom