LDAP over SSL in Weblogic 6.1 Certificate probs

Hi,
I'm trying to set up an outgoing SSL connection from a J2EE app to an LDAP server
(Netpoint) using JNDI. The code I use looks like this:
// Set up the environment for creating the initial context
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://url:636");
// Specify SSL
env.put(Context.SECURITY_PROTOCOL, "ssl");
// Authenticate as S. User and password
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "uid=userid,ou=ApplicationAccess,dc=domain,dc=domain");
env.put(Context.SECURITY_CREDENTIALS, "password");
// Create the initial context
DirContext ctx = new InitialDirContext(env);
The LDAP server is already configured with a root certificate in PEM format(Base64
encoded ASCII). How do I setup weblogic so that my J2EE application accepts this
certificate??? I have understood that I have to generate a key and add this to
my truststore but I don't know exactly how to do this. Any help is greatly appreciated!

Hi,
I'm trying to set up an outgoing SSL connection from a J2EE app to an LDAP server
(Netpoint) using JNDI. The code I use looks like this:
// Set up the environment for creating the initial context
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://url:636");
// Specify SSL
env.put(Context.SECURITY_PROTOCOL, "ssl");
// Authenticate as S. User and password
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "uid=userid,ou=ApplicationAccess,dc=domain,dc=domain");
env.put(Context.SECURITY_CREDENTIALS, "password");
// Create the initial context
DirContext ctx = new InitialDirContext(env);
The LDAP server is already configured with a root certificate in PEM format(Base64
encoded ASCII). How do I setup weblogic so that my J2EE application accepts this
certificate??? I have understood that I have to generate a key and add this to
my truststore but I don't know exactly how to do this. Any help is greatly appreciated!

Similar Messages

  • LC + ActiveDirectory + LDAP over SSL = doesn't work

    Hi,
    I installed Active Directory Certificate Services. Now I want setup LDAP over SSL. Unfortunatelly it doesn't work. I pressed "Test" and always get "Invalid username or invalid password" (
    German: "Ungültiger Benutzername oder ungültiges Kennwort"). I'm pretty sure username and password are fine (it worked before I installed Active Directory Certificate Services and used LDAP without SSL).
    On server.log, I got this:
    2011-11-12 00:51:28,202 INFO  [com.adobe.idp.um.businesslogic.synch.LdapHelper] Following stacktrace is generated due to the Test LDAP Server Configuration action
    javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1]
            at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3041)
            at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2987)
            at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2789)
            at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2703)
            at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:293)
            at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
            at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
            at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
            at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
            at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
            at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
            at javax.naming.InitialContext.init(InitialContext.java:223)
            at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:134)
            at com.adobe.idp.um.businesslogic.synch.LdapHelper.createContext(LdapHelper.java:663)
            at com.adobe.idp.um.businesslogic.synch.LdapHelper.testServerConfig(LdapHelper.java:682)
            at com.adobe.idp.um.ui.config.ConfigDirectoryEditAction.testServerSettings_onClick(ConfigDirectoryEditAction.java:215)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.cc.framework.adapter.struts.ActionUtil.handleFormAction(Unknown Source)
            at com.cc.framework.adapter.struts.FWAction.handleFormAction(Unknown Source)
            at com.cc.framework.adapter.struts.ActionUtil.execute(Unknown Source)
            at com.cc.framework.adapter.struts.FWAction.execute(Unknown Source)
            at com.cc.framework.adapter.struts.FWAction.execute(Unknown Source)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.adobe.framework.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:173)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.adobe.idp.um.auth.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:154)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.adobe.idp.um.auth.filter.PortalSSOFilter.doFilter(PortalSSOFilter.java:91)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.adobe.idp.um.auth.filter.CSRFFilter.doFilter(CSRFFilter.java:41)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
            at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:543)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)
    Do you have some Idea?
    cu Floh

    I have not done it for Netscape yet but I have done it for Novell and JNDI.. Here is the settings for Novell
    // Dynamically set JSSE as a security provider
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    // Dynamically set the property that JSSE uses to identify
    // the keystore that holds trusted root certificates
    System.setProperty("javax.net.ssl.trustStore", m_connectionData.getLocal("KeyStore").toString());
    ssf = new LDAPJSSESecureSocketFactory();
    // Set the socket factory as the default for all future connections
    LDAPConnection.setSocketFactory(ssf);

  • LDAP over SSL

    A hosted service wants to authenticate against our AD.  They recommend using LDAPS. 
    What is best practice?  Install a public certificate on a DC. 
    For instance on DC1.contoso.com.  Then would I open up 443 on the firewall to that DC and allow from that IP? How would that affect other local LAN clients authenticating to that DC?

    A hosted service wants to authenticate against our AD.  They recommend using LDAPS. 
    What is best practice?  Install a public certificate on a DC. 
    For instance on DC1.contoso.com.  Then would I open up 443 on the firewall to that DC and allow from that IP? How would that affect other local LAN clients authenticating to that DC?
    If its hosted services & if its supports ADAM/AD LDS, then its much safe to use them instead of RWDC or RODC. Enabling LDAP over SSL enhances the security of the information how information is transmitted when client tries to contact DC for the information(authentication/authorization).
    Normally w/o LDAPs being configured in the environment, when client queries a DC in the domain, the information is transmitted in the plain text which ca be read by the hacker using tools available for free. The reason is simple the information on transit
    is not encrypted, but enabling LDAP over SSL prevent the unencrypted queries & provide more security.
    You can't simple implement LDAP over SSP, but it needs PKI infrastructure, planning & designing which is comprehensively listed into the document URL posted by Justin. You can also use ldap over SSL using AD LDS.
    http://blogs.technet.com/b/pki/archive/2011/06/02/implementing-ldaps-ldap-over-ssl.aspx
    Awinish Vishwakarma - MVP
    My Blog: awinish.wordpress.com
    Disclaimer This posting is provided AS-IS with no warranties/guarantees and confers no rights.

  • Trying to determine if LDAP over SSL is working using LDP.exe

    Hi,
    I just wanted to confirm that LDAP over SSL is working properly on our domain controller.  When I connect using LDP.exe on my Windows 7 computer, I get the following output:
    ld = ldap_sslinit("dc1.domain.com", 636, 1);
    Error 0 = ldap_set_option(hLdap, LDAP_OPT_PROTOCOL_VERSION, 3);
    Error 0 = ldap_connect(hLdap, NULL);
    Error 0 = ldap_get_option(hLdap,LDAP_OPT_SSL,(void*)&lv);
    Host supports SSL, SSL cipher strength = 128 bits
    Established connection to dc1.domain.com.
    Retrieving base DSA information...
    Getting 1 entries:
    Dn: (RootDSE)
    <unnecessary details>
    It looks like it is working, but I wasn't sure if the Error 0's mean there is some sort of problem.
    Also, when I run a Simple bind with my credentials, I get the following output:
    res = ldap_simple_bind_s(ld, 'myuseraccount-at-domaindotcom', <unavailable>); // v.3
    Authenticated as: 'DOMAIN\myuseraccount'.
    Finally, when I run a Bind as currently logged on user (with Encrypt traffic after bind checked), I get the following output:
    53 = ldap_set_option(ld, LDAP_OPT_ENCRYPT, 1)
    res = ldap_bind_s(ld, NULL, &NtAuthIdentity, NEGOTIATE (1158)); // v.3
    {NtAuthIdentity: User='NULL'; Pwd=<unavailable>; domain = 'NULL'}
    Authenticated as: 'DOMAIN\myuseraccount'.
    I followed all the instructions found in Microsoft article KB-321051 to get LDAP over SSL working with a valid 3rd party certificate on one of our Windows 2008 R2 domain controllers.  However, when I test Active Directory Authentication on our
    WatchGuard Management Server after importing the CA certificate, the test fails.  In order to use Active Directory Authentication, LDAPS (LDAP over SSL) must be enabled in the Active Directory domain and I am not 100% sure that it is enabled properly.
    Any advice or additional insight would be greatly appreciated.
    Thanks!

    Some ideas:
    DNS Name: KB-321051 says that you need the DNS name in either Subject CN or Subject Alternative Name. Which one did you use? Windows clients are fine with an empty CN and only the SAN populated (there the "either or" statement in the article)
    but third-party tools often look for the DNS name in the Subject CN.
    Even if the WatchGuard Server runs on Windows it might use its own certificate checking logic.
    DC certificate(s): Does the DC have more than this certificate? If yes I'd run a network trace to check which one the machine is actually sending in the SSL handshake.
    Chaining issues at your LDAP client / the WatchGuard Management Server:
    Very often such issues are related to the fact that the certificate chain is not validated properly. Some typical issues:
    It is not clear whether the client uses the Windows certificate store (even if it runs on a Windows server).
    Tools / systems / PKI clients can only deal with a single root CA, not with a hierarchy.
    You need to import both Root and intermediate CAs as the client cannot fetch the intermediates from AIA URLs.
    The client cannot access CRL URLs because of firewalls rules or missing access (e.g.: A CRL URL in AD is used but the client does not have an AD user in whose context it would try to fetch the CRL).
    The client has issues with blanks or special characters in CDP or AIA URLs.
    Having a quick look at
    WatchGuard documentation it seems to me that they are using their own certificate stores you need to import CA certificates to. And they only mention a "Root CA" so if your PKI has two levels you might need to import both CAs to the so-called Root store.
    Elke

  • Ldap over ssl in windows 2008 r2

    hi
    i wanted to configure ldap over ssl and i have created security template along with apropriate persmission however when i want to add it my domain 2008 R2  computer it gives me error.
    ""the permision on the certificate template do not allow the current user to enrol for this type of certificate""
    ""you do not have perssmion to view this type of certificate""
    kindly advise me.
    greenman

    On Sun, 23 Feb 2014 08:23:40 +0000, GreeMann wrote:
    I believe my main problem is that I can not issue any template I have tried other template but I get the same permission error I have tried different account I get the same permission error, is there any way that we can change the default template permission.?
    You have not followed the instructions I gave. As I've said in previous
    posts, the way you've got this template configured is never going to work
    as it is configured to build the subject information from AD and one of the
    attributes being included in the Subject Alternative Name is the DNS. Since
    you're using a user account to request the certificate when it attempts to
    build the subject alternative name it is trying to add the user's DNS name.
    A user account does not have a DNS name.
    I would suggest that you delete any custom templates you've already created
    and start over again. As per one of my previous posts:
    http://technet.microsoft.com/en-us/library/ff625722%28v=ws.10%29.aspx
    Follow the instructions in the Using the Certificate Enrollment wizard with
    an enterprise CA section.
    If you don't follow the instructions I've given you, I can't help you.
    Paul Adare - FIM CM MVP
    Of all the things I've lost, I miss my mind the most.

  • Failed to use LDAP over SSL MUTUAL AUTHENTICATION with some Directory enable SSL.

    In iPlanet Web Server, Enterprise Edition Administration's guide, chapter 5: secure your web server - Using SSL and TLS protocol specifying that the Administrator server camn communicate LDAP over SSL with some Directory enable SSL.
    Is there any way to configure iplanet Administration server to talk ldap/ssl in mutual authentication mode with some directory?

    Hi,
    Sorry, I could not understand what your are trying to do with iWS.
    Could you please berifly explain your question. So that I can help you.
    Regards,
    Dakshin.
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support.

  • Anyone able to run SOAP over SSL with Weblogic 5.1 and without purchasing third party tools???  If so, how???

    Anyone able to run SOAP over SSL with Weblogic 5.1??? If so, how??? And
    without purchasing third party tools??? Thanks.
    -Freddie

    Anyone able to run SOAP over SSL with Weblogic 5.1??? If so, how??? And
    without purchasing third party tools??? Thanks.
    -Freddie

  • How write rmi-iiop over ssl with weblogic server 6.1 - No server found

    //New
    Hello,
    I have written an appication like this:
    - An EJB server running on Weblogic server 6.1
    (named: BankServerHome)
    -A java client calling the BankServer.
    Platform: windows 2000 - jdk1.3
    Now I want to secure the communication with SSL protocol.
    I have done this:
    -generate a key peer with weblogic service named certificate.
    -send the CSR to a CA and place the answer into the weblogic
    server certificate directory.
    -update path for ServerCertificateChainFileName,
    ServerCertificateFileName, ServerKeyFileName into config.xml.
    -launch weblogicServer
         -> server certificate is recognized
         -> listening port 7001 and 7002.
    (-stop weblogicServer!)
    At now, all is all right, errors come hereafter:
    Then I follow the guideline "Programming weblogic Security" (version of 30/07/2001).
    "To use RMI over IIOP over SSL with a Java client, do the following:
    2. Extend the java.rmi.server.RMISocketFactory class to handle SSL socket
    connections. Be sure to specify the port on which WebLogic Server listens for
    SSL connections. For an example of a class that extends the
    java.rmi.server.RMISocketFactory class, see Listing 4-22.
    3. Run the ejbc compiler with the -d option.
    4. Add your extension of the java.rmi.server.RMISocketFactory class to the
    CLASSPATH of the Java client.
    5. Use the following command options when starting the Java client:
    -xbootclasspath/a:%CLASSPATH%
    -Dorg.omg.CORBA.ORBSocketFactoryClass=implementation of java.rmi.server.RMISocketFactory
    -Dssl.certs=directory location of digital certificate for Java client
    -Dssl.key=directory location of private key for Java client"
    At step 3. I found into documentation that -d is linked to a directory name.
    When I run ejbc with this option -d I have the message:
    "ERROR: You must specify an output directory or jar with the -d option to weblogic.ejbc."
    % So what option can I use to run ejbc for secure usage?
    At step 5. Whatever I write for -Dorg.omg.CORBA.ORBSocketFactoryClass,
    this pointed class is not instanciated.
    Then I can not create a socket with my client.
    The folowing exception is raised:
    javax.naming.CommunicationException [Root exception is java.net.ConnectException:
    No server found at T3S://localhost:7002]
    So, my questions are:
    % Why -Dorg.omg.CORBA.ORBSocketFactoryClass must be known by the client and not
    the server?
    My java client part, managing connection is:
    -------------------BEGIN OF CONNECTION MANAGER-------------------
    Properties env = new Properties ();
    // Shouldn't have to do this, but for now you must
    if ( factory.equals ("weblogic.jndi.WLInitialContextFactory") ) {
    env.put ("java.naming.provider.url", "t3s://localhost:7002");
    InitialContext context = new InitialContext (env);
    BankSessionServerHome bssh = (BankServerHome) context.lookup("BankServerHome");
    BankServer = bssh.create();
    -------------------END OF CONNECTION MANAGER-------------------
    I have also try
    env.put ("java.naming.provider.url", "corbaloc:iiop://localhost:7002");
    but it throws the following error
    javax.naming.InvalidNameException: url does not conatin !!!
    % What is the code for the java client allowing connection with the ejb?
    % And better, can I have a sample example for rmi-iiop over ssl?
    (...wlserver6.1\samples\examples\iiop\ejb\stateless\rmiclient\client.java do not
    speak ssl!)
    Any help will be appreciate from you...
    Best Regards.
    Oliver

    "oliver" <[email protected]> writes:
    The SSL support is poorly doc'd right now. We have fixed this and
    updated the way you do things in SP2. Please either wait for SP2 or
    contact support.
    andy
    I have written an appication like this:
    - An EJB server running on Weblogic server 6.1
    (named: BankServerHome)
    -A java client calling the BankServer.
    Platform: windows 2000 - jdk1.3
    Now I want to secure the communication with SSL protocol.
    I have done this:
    -generate a key peer with weblogic service named certificate.
    -send the CSR to a CA and place the answer into the weblogic
    server certificate directory.
    -update path for ServerCertificateChainFileName,
    ServerCertificateFileName, ServerKeyFileName into config.xml.
    -launch weblogicServer
         -> server certificate is recognized
         -> listening port 7001 and 7002.
    (-stop weblogicServer!)
    At now, all is all right, errors come hereafter:
    Then I follow the guideline "Programming weblogic Security" (version of 30/07/2001).
    "To use RMI over IIOP over SSL with a Java client, do the following:
    2. Extend the java.rmi.server.RMISocketFactory class to handle SSL socket
    connections. Be sure to specify the port on which WebLogic Server listens for
    SSL connections. For an example of a class that extends the
    java.rmi.server.RMISocketFactory class, see Listing 4-22.
    3. Run the ejbc compiler with the -d option.
    4. Add your extension of the java.rmi.server.RMISocketFactory class to the
    CLASSPATH of the Java client.
    5. Use the following command options when starting the Java client:
    -xbootclasspath/a:%CLASSPATH%
    -Dorg.omg.CORBA.ORBSocketFactoryClass=implementation of java.rmi.server.RMISocketFactory
    -Dssl.certs=directory location of digital certificate for Java client
    -Dssl.key=directory location of private key for Java client"
    At step 3. I found into documentation that -d is linked to a directory name.
    When I run ejbc with this option -d I have the message:
    "ERROR: You must specify an output directory or jar with the -d option to weblogic.ejbc."
    % So what option can I use to run ejbc for secure usage?
    At step 5. Whatever I write for -Dorg.omg.CORBA.ORBSocketFactoryClass,
    this pointed class is not instanciated.
    Then I can not create a socket with my client.
    The folowing exception is raised:
    javax.naming.CommunicationException [Root exception is java.net.ConnectException:
    No server found at T3S://localhost:7002]
    So, my questions are:
    % Why -Dorg.omg.CORBA.ORBSocketFactoryClass must be known by the client and not
    the server?
    My java client part, managing connection is:
    -------------------BEGIN OF CONNECTION MANAGER-------------------
    Properties env = new Properties ();
    // Shouldn't have to do this, but for now you must
    if ( factory.equals ("weblogic.jndi.WLInitialContextFactory") ) {
    env.put ("java.naming.provider.url", "t3s://localhost:7002");
    InitialContext context = new InitialContext (env);
    BankSessionServerHome bssh = (BankServerHome) context.lookup("BankServerHome");
    BankServer = bssh.create();
    -------------------END OF CONNECTION MANAGER-------------------
    I have also try
    env.put ("java.naming.provider.url", "corbaloc:iiop://localhost:7002");
    but it throws the following error
    javax.naming.InvalidNameException: url does not conatin !!!
    % What is the code for the java client allowing connection with the ejb?
    % And better, can I have a sample example for rmi-iiop over ssl?
    (...wlserver6.1\samples\examples\iiop\ejb\stateless\rmiclient\client.java do not
    speak ssl!)
    Any help will be appreciate from you...
    Best Regards.
    Oliver

  • How write rmi-iiop over ssl with weblogic server 6.1?

    Hello,
    I have written an appication like this:
    - An EJB server running on Weblogic server 6.1
    (named: BankServerHome)
    -A java client calling the BankServer.
    Platform: windows 2000 - jdk1.4
    Now I want to secure the communication with SSL protocol.
    I have done this:
    -generate a key peer with weblogic service named certificate.
    -send the CSR to a CA and place the answer into the weblogic
    server certificate directory.
    -update path for ServerCertificateChainFileName,
    ServerCertificateFileName, ServerKeyFileName into config.xml.
    -launch weblogicServer
         -> server certificate is recognized
         -> listening port 7001 and 7002.
    (-stop weblogicServer!)
    At now, all is all right, errors come hereafter:
    Then I follow the guideline "Programming weblogic Security" (version of 30/07/2001).
    "To use RMI over IIOP over SSL with a Java client, do the following:
    2. Extend the java.rmi.server.RMISocketFactory class to handle SSL socket
    connections. Be sure to specify the port on which WebLogic Server listens for
    SSL connections. For an example of a class that extends the
    java.rmi.server.RMISocketFactory class, see Listing 4-22.
    3. Run the ejbc compiler with the -d option.
    4. Add your extension of the java.rmi.server.RMISocketFactory class to the
    CLASSPATH of the Java client.
    5. Use the following command options when starting the Java client:
    -xbootclasspath/a:%CLASSPATH%
    -Dorg.omg.CORBA.ORBSocketFactoryClass=implementation of java.rmi.server.RMISocketFactory
    -Dssl.certs=directory location of digital certificate for Java client
    -Dssl.key=directory location of private key for Java client"
    At step 3. I found into documentation that -d is linked to a directory name.
    When I run ejbc with this option -d I have the message:
    "ERROR: You must specify an output directory or jar with the -d option to weblogic.ejbc."
    % So what option can I use to run ejbc for secure usage?
    At step 5. Whatever I write for -Dorg.omg.CORBA.ORBSocketFactoryClass,
    this pointed class is not instanciated.
    Then I can not create a socket with my client.
    The folowing exception is raised:
    javax.naming.CommunicationException [Root exception is java.net.ConnectException:
    No server found at T3S://localhost:7002]
    So, my questions are:
    % Why -Dorg.omg.CORBA.ORBSocketFactoryClass must be known by the client and not
    the server?
    My java client part, managing connection is:
    -------------------BEGIN OF CONNECTION MANAGER-------------------
    Properties env = new Properties ();
    // Shouldn't have to do this, but for now you must
    if ( factory.equals ("weblogic.jndi.WLInitialContextFactory") ) {
    env.put ("java.naming.provider.url", "t3s://localhost:7002");
    } else {
    env.put ("java.naming.provider.url", "rmi://localhost:7002");
    InitialContext context = new InitialContext (env);
    BankSessionServerHome bssh = (BankServerHome) context.lookup("BankServerHome");
    BankServer = bssh.create();
    -------------------END OF CONNECTION MANAGER-------------------
    % What is the code for the java client allowing connection with the ejb?
    % And better, can I have a sample example for rmi-iiop over ssl?
    (...wlserver6.1\samples\examples\iiop\ejb\stateless\rmiclient\client.java do not
    speak ssl!)
    Any help will be appreciate from you...
    Best Regards.
    Oliver

    "oliver" <[email protected]> writes:
    First off 1.4 isn't supported as yet. That is probably part of the problem.
    You also must use a corba URL from the client in order for this to work for instance:
    If you are using WLInitialContextFactory:
    corbaloc:iiop:localhost:7001/NameService
    If you are using CNCtxFactory:
    iiop://localhost:7001
    Using rmi: is the wrong thing to do - that will use jrmp or t3.
    However, I suggest that you raise a call with support since there is
    some other trickiness with getting SSL working. We hope to have this
    much improved in SP2.
    andy
    Hello,
    I have written an appication like this:
    - An EJB server running on Weblogic server 6.1
    (named: BankServerHome)
    -A java client calling the BankServer.
    Platform: windows 2000 - jdk1.4
    Now I want to secure the communication with SSL protocol.
    I have done this:
    -generate a key peer with weblogic service named certificate.
    -send the CSR to a CA and place the answer into the weblogic
    server certificate directory.
    -update path for ServerCertificateChainFileName,
    ServerCertificateFileName, ServerKeyFileName into config.xml.
    -launch weblogicServer
         -> server certificate is recognized
         -> listening port 7001 and 7002.
    (-stop weblogicServer!)
    At now, all is all right, errors come hereafter:
    Then I follow the guideline "Programming weblogic Security" (version of 30/07/2001).
    "To use RMI over IIOP over SSL with a Java client, do the following:
    2. Extend the java.rmi.server.RMISocketFactory class to handle SSL socket
    connections. Be sure to specify the port on which WebLogic Server listens for
    SSL connections. For an example of a class that extends the
    java.rmi.server.RMISocketFactory class, see Listing 4-22.
    3. Run the ejbc compiler with the -d option.
    4. Add your extension of the java.rmi.server.RMISocketFactory class to the
    CLASSPATH of the Java client.
    5. Use the following command options when starting the Java client:
    -xbootclasspath/a:%CLASSPATH%
    -Dorg.omg.CORBA.ORBSocketFactoryClass=implementation of java.rmi.server.RMISocketFactory
    -Dssl.certs=directory location of digital certificate for Java client
    -Dssl.key=directory location of private key for Java client"
    At step 3. I found into documentation that -d is linked to a directory name.
    When I run ejbc with this option -d I have the message:
    "ERROR: You must specify an output directory or jar with the -d option to weblogic.ejbc."
    % So what option can I use to run ejbc for secure usage?
    At step 5. Whatever I write for -Dorg.omg.CORBA.ORBSocketFactoryClass,
    this pointed class is not instanciated.
    Then I can not create a socket with my client.
    The folowing exception is raised:
    javax.naming.CommunicationException [Root exception is java.net.ConnectException:
    No server found at T3S://localhost:7002]
    So, my questions are:
    % Why -Dorg.omg.CORBA.ORBSocketFactoryClass must be known by the client and not
    the server?
    My java client part, managing connection is:
    -------------------BEGIN OF CONNECTION MANAGER-------------------
    Properties env = new Properties ();
    // Shouldn't have to do this, but for now you must
    if ( factory.equals ("weblogic.jndi.WLInitialContextFactory") ) {
    env.put ("java.naming.provider.url", "t3s://localhost:7002");
    } else {
    env.put ("java.naming.provider.url", "rmi://localhost:7002");
    InitialContext context = new InitialContext (env);
    BankSessionServerHome bssh = (BankServerHome) context.lookup("BankServerHome");
    BankServer = bssh.create();
    -------------------END OF CONNECTION MANAGER-------------------
    % What is the code for the java client allowing connection with the ejb?
    % And better, can I have a sample example for rmi-iiop over ssl?
    (...wlserver6.1\samples\examples\iiop\ejb\stateless\rmiclient\client.java do not
    speak ssl!)
    Any help will be appreciate from you...
    Best Regards.
    Oliver

  • Trying to connect to an AD LDAP over SSL via OPEN_SSL

    Hello,
    We are getting the error below when we attempt to run this code. Any ideas? Does this point to an incorrectly configured wallet and/or certificate?
    DECLARE
    BEGIN
    l_session := DBMS_LDAP.init ( hostname => l_ldap_host_in, portnum => l_ldap_port_in );
    l_retval := DBMS_LDAP.OPEN_SSL(l_session, owallet_loc, owallet_pwd, 2); -- Over SSL
    l_retval := DBMS_LDAP.simple_bind_s ( ld => l_session, dn => l_ldap_dn_in, passwd => l_ldap_password_in );
    l_retval := DBMS_LDAP.unbind_s(l_session);
    END;
    Error report:
    ORA-31202: DBMS_LDAP: LDAP client/server error: UnKnown Error Encountered
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.DBMS_LDAP", line 1457
    ORA-06512: at "SYS.DBMS_LDAP", line 1234
    ORA-06512: at line 21
    31202. 00000 - "DBMS_LDAP: LDAP client/server error: %s"
    *Cause:    There is a problem either on the LDAP server or on the client.
    *Action:   Please report this error to the LDAP server administrator or
    your Database administrator.
    Any help will be greatly appreciated! Thank you,
    Alex.

    We had never tried this before. I'm the Programmer trying to make the code work. I found this other thread Google'ing https://kr.forums.oracle.com/forums/thread.jspa?threadID=494022&start=15&tstart=0 and asked our Network Admin and our DBA to follow steps 1 and 2 and provide location to the wallet and password when they were done, which they did.
    Now I'm testing the code and getting that error. I was about to report it to them, but I thought I should try and help by providing a possible fix, or maybe the code is the problem?
    Alex.
    Edited by: alarzabal on Dec 7, 2011 6:24 PM

  • LDAP over SSL for Solaris 9 / Solaris 10

    I have successfully configured Solaris-10 clients to use Windows 2003 R2 Active Directory for LDAP authentication over SSL. However, my production environment is still running on Solaris-9. I am able to make Kerberos and ldapsearch working on Solaris-9, but I am still NOT able to use PuTTY to make authentication with AD.
    I reviewed all my steps that I configured on Solaris-10, but somewhat I could not make it work on Solaris-9. If anybody sucessfully deployed on Solaris-9, please advices! Any helps greatly appreciated.
    Here are what I got so far on Solaris-9
    =======================================================
    KERBEROS
    =======================================================
    #getent passwd aduser
    aduser:1000:1000:aduser:/export/home/aduser:/bin/sh
    #kinit [email protected]
    Password for [email protected]:
    #klist
    Ticket cache: /tmp/krb5cc_0
    Default principal: [email protected]
    Valid starting Expires Service principal
    Fri Jan 04 17:22:34 2008 Sat Jan 05 03:22:34 2008 krbtgt/[email protected]
    renew until Fri Jan 11 17:22:34 2008
    =======================================================
    LDAPSEARCH / SSL
    =======================================================
    #ldapsearch -v -h sundc1.consoto.com -p 636 -Z -P /var/ldap/cert8.db -D cn=administrator,cn=users,dc=consoto,dc=com -w - -b "dc=consoto,dc=com" -v -s base "objectclass=*"
    Enter bind password:
    ldapsearch: started Fri Jan 4 17:23:52 2008
    LDAP Library Information -
    Highest supported protocol version: 3
    LDAP API revision: 2005
    API vendor name: Sun Microsystems Inc.
    Vendor-specific version: 5.08
    LDAP API Extensions:
    SERVER_SIDE_SORT (revision 1)
    VIRTUAL_LIST_VIEW (revision 1)
    PERSISTENT_SEARCH (revision 1)
    PROXY_AUTHORIZATION (revision 1)
    X_LDERRNO (revision 1)
    X_MEMCACHE (revision 1)
    X_IO_FUNCTIONS (revision 1)
    X_EXTIO_FUNCTIONS (revision 1)
    X_DNS_FUNCTIONS (revision 1)
    X_MEMALLOC_FUNCTIONS (revision 1)
    X_THREAD_FUNCTIONS (revision 1)
    X_EXTHREAD_FUNCTIONS (revision 1)
    X_GETLANGVALUES (revision 1)
    X_CLIENT_SIDE_SORT (revision 1)
    X_URL_FUNCTIONS (revision 1)
    X_FILTER_FUNCTIONS (revision 1)
    ldap_init( sundc1.consoto.com, 636 )
    ldaptool_getcertpath -- /var/ldap/cert8.db
    ldaptool_getkeypath -- .
    ldaptool_getdonglefilename -- (null)
    filter pattern: objectclass=*
    returning: ALL
    filter is: (objectclass=*)
    version: 1
    dn: dc=consoto,dc=com
    objectClass: top
    objectClass: domain
    objectClass: domainDNS
    distinguishedName: DC=consoto,DC=com
    instanceType: 5
    whenCreated: 20071220204021.0Z
    whenChanged: 20071226231851.0Z
    subRefs: DC=ForestDnsZones,DC=consoto,DC=com
    subRefs: DC=DomainDnsZones,DC=consoto,DC=com
    subRefs: CN=Configuration,DC=consoto,DC=com
    uSNCreated: 4098
    uSNChanged: 16663
    name: consoto
    objectGUID:: bM0hWw8HKEOYCFN3yQ==
    creationTime: 128426572605937500
    forceLogoff: -9223372036854775808
    lockoutDuration: -18000000000
    lockOutObservationWindow: -18000000000
    lockoutThreshold: 0
    maxPwdAge: -37108517437440
    minPwdAge: -864000000000
    minPwdLength: 7
    modifiedCountAtLastProm: 0
    nextRid: 1003
    pwdProperties: 1
    pwdHistoryLength: 24
    objectSid:: AQQAAAAAAAUAAYA4LaLGUspxVHsMP
    serverState: 1
    uASCompat: 1
    modifiedCount: 129
    auditingPolicy:: AAE=
    nTMixedDomain: 0
    rIDManagerReference: CN=RID Manager$,CN=System,DC=consoto,DC=com
    fSMORoleOwner: CN=NTDS Settings,CN=SUNDC1,CN=Servers,CN=Default-First-Site-Nam e,CN=Sites,CN=Configuration,DC=consoto,DC=com
    systemFlags: -1946157056
    wellKnownObjects: B:32:6227F0AF1FC2410D8E3BB10615BB5B0F:CN=NTDS Quotas,DC=sunl
    ab,DC=com
    wellKnownObjects: B:32:F4BE92A4C777485E878E9421D53087DB:CN=Microsoft,CN=Progra
    m Data,DC=consoto,DC=com
    wellKnownObjects: B:32:09460C08AE1E4A4EA0F64AEE7DAA1E5A:CN=Program Data,DC=sun
    lab,DC=com
    wellKnownObjects: B:32:22B70C67D56E4EFB91E9300FCA3DC1AA:CN=ForeignSecurityPrin
    cipals,DC=consoto,DC=com
    wellKnownObjects: B:32:18E2EA80684F11D2B9AA00C04F79F805:CN=Deleted Objects,DC=
    consoto,DC=com
    wellKnownObjects: B:32:2FBAC1870ADE11D297C400C04FD8D5CD:CN=Infrastructure,DC=s
    unlab,DC=com
    wellKnownObjects: B:32:AB8153B7768811D1ADED00C04FD8D5CD:CN=LostAndFound,DC=sun
    lab,DC=com
    wellKnownObjects: B:32:AB1D30F3768811D1ADED00C04FD8D5CD:CN=System,DC=consoto,DC
    =com
    wellKnownObjects: B:32:A361B2FFFFD211D1AA4B00C04FD7D83A:OU=Domain Controllers,
    DC=consoto,DC=com
    wellKnownObjects: B:32:AA312825768811D1ADED00C04FD8D5CD:CN=Computers,DC=consoto
    ,DC=com
    wellKnownObjects: B:32:A9D1CA15768811D1ADED00C04FD8D5CD:CN=Users,DC=consoto,DC=
    com
    objectCategory: CN=Domain-DNS,CN=Schema,CN=Configuration,DC=consoto,DC=com
    isCriticalSystemObject: TRUE
    gPLink: [LDAP://CN={31B2F340-016D-11D2-945F-00C04FB984F9},CN=Policies,CN=Syste
    m,DC=consoto,DC=com;0]
    masteredBy: CN=NTDS Settings,CN=SUNDC1,CN=Servers,CN=Default-First-Site-Name,C
    N=Sites,CN=Configuration,DC=consoto,DC=com
    ms-DS-MachineAccountQuota: 10
    msDS-Behavior-Version: 2
    msDS-PerUserTrustQuota: 1
    msDS-AllUsersTrustQuota: 1000
    msDS-PerUserTrustTombstonesQuota: 10
    msDs-masteredBy: CN=NTDS Settings,CN=SUNDC1,CN=Servers,CN=Default-First-Site-N
    ame,CN=Sites,CN=Configuration,DC=consoto,DC=com
    dc: consoto
    1 matches
    I am thinking about pam.conf file or ldapclient's configuration file, any suggestion?

    I have now sat down and looked at your suggestion and I am pretty certain we can't implement it ... :( I was hoping it was just going to be configuration files that were copied (maybe a naive hope, but there you go!) This system is going to be deployed as a live service for a government agency so I do not think we can, in all good conscience, have binaries from two different OS releases residing on the same server as it will make the system nigh-on non-patchable.
    Let's hope Sun have somethig constructive to say about our issue which, I am slowly beginning to think, is related to the password.
    If I su to the test AD user we have whilst logged in as a root user (which does not, of course, prompt for a password) it all works nicely - home directory, shell, the id command gives all that is expected of uid and gid. Now, should I be in a as a non-root user and try the same I get prompted for a password and it all fails - despite me providing what should be the correct password.
    If I do a getent for the user the returned data has a blank for the password field (as opposed to the usual x).
    I think that somewhere, somehow, in the transmission of data that the password is getting a level of encryption that the AD is not setup to unravel. The packets are all encrypted through ldap (we are using tls simple) but what of the password within the packet? Does anything encrypt that first, and if so, does AD know how to decrypt it?

  • LDAP over SSL gives an error when testing connection in RPD

    Hello all,
    I got something strange. When I configure OBIEE to use an LDAP server (ADSI) it just works fine.
    Now when I change the port number and check SSL and I check the connection again it says:
    [53016] The IBM LDAP SSL (Secure Socket Layer) client library initialization failed: Reason: Bad keyfile password
    But now when I log on to OBIEE with an AD user it just works...
    Anyone with the same problem/issue?

    On Sun, 23 Feb 2014 08:23:40 +0000, GreeMann wrote:
    I believe my main problem is that I can not issue any template I have tried other template but I get the same permission error I have tried different account I get the same permission error, is there any way that we can change the default template permission.?
    You have not followed the instructions I gave. As I've said in previous
    posts, the way you've got this template configured is never going to work
    as it is configured to build the subject information from AD and one of the
    attributes being included in the Subject Alternative Name is the DNS. Since
    you're using a user account to request the certificate when it attempts to
    build the subject alternative name it is trying to add the user's DNS name.
    A user account does not have a DNS name.
    I would suggest that you delete any custom templates you've already created
    and start over again. As per one of my previous posts:
    http://technet.microsoft.com/en-us/library/ff625722%28v=ws.10%29.aspx
    Follow the instructions in the Using the Certificate Enrollment wizard with
    an enterprise CA section.
    If you don't follow the instructions I've given you, I can't help you.
    Paul Adare - FIM CM MVP
    Of all the things I've lost, I miss my mind the most.

  • Solution: Active Directory over LDAP over SSL

    Hey all
    I have the solution and i will describe how i solved it.
    - Install windows 2000 server
    - install service pack 2
    - install high encription pack from windows
    http://www.microsoft.com/windows2000/downloads/recommended/encryption/
    - install active directory
    also install a dns server, if there isn't one.
    - install a Certificate Authority
    a stand alone, that requires Active Directory
    - install JDK 1.4
    - goto http://localhost/certsrv
    choose: "Retrieve the CA certificate or certificate revocation list"
    then choose: "Download CA certificate"
    save this file to the hard disk
    - use keytool to import this file in the cacerts file
    keytool -import -alias foo -storetype jks -keystore cacerts -file yourca.cer
    the cacerts file must be in C:\j2sdk1.4.0_01\jre\lib\security or something
    - then run the followin code for a connection
    import java.util.*;
    import javax.naming.*;
    import javax.naming.directory.*;
    import java.io.*;
    import java.net.*;
    public class HBUserAdmin {
    public HBUserAdmin() {}
    private Hashtable env;
    private void _initialize() {
    env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, "ldap://your.server.com:636");
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, "CN=Administrator,CN=Users,DC=jellie,DC=com");
    env.put(Context.SECURITY_CREDENTIALS, "youknowit");
    env.put(Context.REFERRAL, "ignore");
    env.put(Context.SECURITY_PROTOCOL, "ssl");
    //THE LOCATION OF THE CACERTS MUST BE SPECIFIED
    System.setProperty("javax.net.ssl.keyStore", "D:\\j2sdk1.4.0_01\\jre\\lib\\security\\cacerts");
    System.setProperty("javax.net.ssl.trustStore", "D:\\j2sdk1.4.0_01\\jre\\lib\\security\\cacerts");
    System.setProperty("javax.net.ssl.trustStoreType", "jks");
    public void bindAs(String principal, String credentials, String baseDN) {
    env.put(Context.PROVIDER_URL, baseDN);
    env.put(Context.SECURITY_PRINCIPAL, principal);
    env.put(Context.SECURITY_CREDENTIALS, credentials);
    DirContext ctx = null;
    try {
    ctx = new InitialDirContext(env);
    System.out.println("bind Successful...");
    ctx.close();
    } catch(AuthenticationException aex) {
    System.out.println("Invalid userid or password... Please try again");
    } catch (Exception ex) {
    ex.printStackTrace();
    public static void main(String[] args) {
    System.out.println("Starting to execute");
    HBUserAdmin testUser = new HBUserAdmin();
    System.out.println("Binding...");
    testUser.bindAs("CN=Administrator,CN=Users,DC=jellie,DC=com", "youknowit", "ldap://your.server.com:636");
    I hope this will help all of you
    questions?....mail
    Jellie
    [email protected]

    System.setProperty("javax.net.ssl.keyStore", "D:\\j2sdk1.4.0_01\\jre\\lib\\security\\cacerts");
    System.setProperty("javax.net.ssl.trustStore", "D:\\j2sdk1.4.0_01\\jre\\lib\\security\\cacerts");
    Do not forget to alter these values.
    IT MUST BE POINTING TO THE FILE YOU HAVE IMPORTED THE CERTIFICATE TO.
    good luck

  • SOLVED: How To Use LDAP over SSL (no certs) from java program

    Trying to connect to OID from Java program (using Grocery Store demo as a test). Want to use SSL with no server certificate. OID is configured, and ldapsearch -U 1 works.
    Tried using URL with ldaps, or adding SECURITY_PROTOCOL,"ssl". In both case the error is 'simple bind failed'.
    Samples on OTN say this should be possible, but then only have code for the non-ssl connection.
    Posting from others with this same question don't seem to have been answered.
    Message was edited by:
    user590350
    I have found that using ConnectionUtil.getSSLDirCtx() from Oracle will make a no-authentication SSL connection. An example in the sample code would be useful.

    Even with Java APIs, There is a way to talk through SSL without bothering about certificates. It's just that you will have to write some code and make some changes in settings.
    Read following to get further information on the same.
    http://kiranthakkar.blogspot.com/2007/04/dummny-certificate-authentication.html
    I don't know or I won't comment whether it's the right approach or not but it's definitely a work around.
    Thanking You
    Kiran Thakkar

  • LDAP over SSL - Works with AD Username but not with full logon @

    Hello
    I have 2 Cisco ASA 5505 and have configured SSL over LDAP to connect via a Active Directory server.
    Everything works fine apart that lets say I have a user called [email protected] - When I am using Anyconnect or Cisco VPN Client and try that it does not work at all.
    If I try abc without the @zzz.com then it works and authenticates to the AD and gets DHCP and user is fine.
    The only question is since I think I have seen this documented somewhere - is that correct or can I use the @ full AD UPN ??       
    I am trying to make our users do a single SSO and have every other application using the full UPN.
    Thanks

    Hello
    I have 2 Cisco ASA 5505 and have configured SSL over LDAP to connect via a Active Directory server.
    Everything works fine apart that lets say I have a user called [email protected] - When I am using Anyconnect or Cisco VPN Client and try that it does not work at all.
    If I try abc without the @zzz.com then it works and authenticates to the AD and gets DHCP and user is fine.
    The only question is since I think I have seen this documented somewhere - is that correct or can I use the @ full AD UPN ??       
    I am trying to make our users do a single SSO and have every other application using the full UPN.
    Thanks

Maybe you are looking for

  • Syncing problem and battery

    My 1st gen shuffle has been waxing and waning on length of play. It is less than a year old and used infrequently. I recently recharged the thing to full charge. I cannot play a song on my external player. When I sync to my pc I get the follow error

  • Rapidwiz fails on database step for 12.1.1 on Oracle Linux 5.7

    I am trying to install Oracle EBS 12.1.1 on Oracle Linux 5.7 64 bit platform. The issue is that after I followed the requirements including set kernel parameters by using the oracle-validated RPM package, the install fails on database creation step.

  • IO filestream help

    hi all im currently learning basic io classes via the java tutorials i tried to write my own version of the copybyte program (http://java.sun.com/docs/books/tutorial/essential/io/examples/CopyBytes.java) but im having some problems understanding what

  • What is a passcode in reset network settings

    what is a passcode in reset network settings?

  • Query/join/where/child parent table

    query/join/where/child parent table hello my query below is not working for my cf application can you help? thanks this is my previous question so i tried to do it my self. tcase_req.tcase_req_id is added tcase.case_id=tcase_req.case_id :note that th