Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-7860

Cannot setup 12.0.x with IBM JDK 7

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.0.0, 12.0.2
    • Fix Version/s: 12.0.4, 13.5.1, 14.0.0
    • Component/s: install
    • Labels:
    • Environment:
      JBoss EAP 6.3 with IBM JDK 7 test
      (OpenAM12.0.0)
    • Sprint:
      AM Sustaining Sprint 26
    • Support Ticket IDs:

      Description

      1. Deploy openam 12.0.0 with IBM JDK 7 and
      configure a simple install.
      2. Impact the configuration passes to the last stage but
      then fails to complete and also no user access is possible,

      ERROR: Failed to create the context id for this tokencn=dsameuser,ou=DSAME Users,dc=openam,dc=forgerock,dc=org
      java.security.NoSuchAlgorithmException: no such algorithm: SHA1PRNG for provider SUN
      at sun.security.jca.GetInstance.getService(GetInstance.java:100)
      at sun.security.jca.GetInstance.getInstance(GetInstance.java:219)
      at java.security.SecureRandom.getInstance(SecureRandom.java:342)
      at com.iplanet.sso.providers.dpro.SSOTokenImpl.<init>(SSOTokenImpl.java:119)
      at com.iplanet.sso.providers.dpro.SSOProviderImpl.createSSOToken(SSOProviderImpl.java:138)
      at com.iplanet.sso.SSOTokenManager.createSSOToken(SSOTokenManager.java:283)
      at com.iplanet.services.naming.service.NamingService.initialize(NamingService.java:142)
      at com.iplanet.services.naming.service.NamingService.<clinit>(NamingService.java:123)
      at com.sun.identity.setup.AMSetupServlet.configure(AMSetupServlet.java:1147)
      at com.sun.identity.setup.AMSetupServlet.processRequest(AMSetupServlet.java:693)

      The code
      com.iplanet.sso.providers.dpro.SSOTokenImpl.<init>(SSOTokenImpl.java:119) assume a SUN Provider
      but the problem is that NoSuchAlgorithm is thrown
      from IBM JDK instead of no such provider.

      --- SSOTokenImpl.java      2015-12-14 14:17:21.000000000 +0800
      +++ SSOTokenImpl.java   2015-12-14 14:17:28.000000000 +0800
      @@ -43,6 +43,7 @@
       import com.sun.identity.authentication.internal.InvalidAuthContextException;
       import com.sun.identity.shared.Constants;
       import java.net.InetAddress;
      +import java.security.NoSuchAlgorithmException;
       import java.security.NoSuchProviderException;
       import java.security.SecureRandom;
       import java.util.HashMap;
      @@ -117,6 +118,8 @@
                   SecureRandom secureRandom = null;
                   try {
                       secureRandom = SecureRandom.getInstance("SHA1PRNG", "SUN");
      +            } catch (NoSuchAlgorithmException e) {
      +                secureRandom = SecureRandom.getInstance("SHA1PRNG");
                   } catch (NoSuchProviderException e) {
                       secureRandom = SecureRandom.getInstance("SHA1PRNG");
                   }
      

      Ref: https://www-01.ibm.com/support/knowledgecenter/SSYKE2_7.0.0/com.ibm.java.security.component.70.doc/security-component/ibmsecurerandom/ibmsecurerandom.html

        Attachments

          Activity

            People

            • Assignee:
              markdr Mark de Reeper
              Reporter:
              chee-weng.chea C-Weng C
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h