Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-3757

KeyStore type can't be changed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.2, 2.0.x, 2.1
    • 2.1
    • console, security
    • Security Level: public (Regular issues)
    • None

    Description

      For now (r612905), Geronimo is hardcoded to use JKS keystore type, which prevents Geronimo from running on Harmony or other JDKs that have no JKS implementation:

      org.apache.geronimo.security.keystore.FileKeystoreInstance, line 635:
      KeyStore tempKeystore = KeyStore.getInstance(JKS);

      org.apache.geronimo.security.keystore.FileKeystoreManager, line 364:
      KeyStore keystore = KeyStore.getInstance(FileKeystoreInstance.JKS);

      To workaround this issue, one can change JKS to KeyStore.getDefaultType() (this returns "BKS" for Harmony) or particular other keystore type, but this requires source recompilation. Replacing var/security/keystores/geronimo-default with the proper keystore type file is not a problem.

      A proper solution seems to apply the fix above to use the JDK-default keystore type, and provide FileKeystoreInstance with an additional configuration option, keystoreType, that would allow to change the keystore type through config.xml without recompilation, like this:

      <module name="org.apache.geronimo.configs/server-security-config/2.0.2/car">
      <gbean name="geronimo-default">
      <attribute name="keystoreType">PKCS12</attribute>
      <attribute name="keystorePath">var/security/keystores/geronimo-pkcs12</attribute>
      </gbean>
      </module>

      This issue if a follow up to GERONIMO-2015.

      Attachments

        1. GERONIMO-3757-2.0.patch
          23 kB
          Vamsavardhana Reddy
        2. GERONIMO-3757-2.1.patch
          25 kB
          Vamsavardhana Reddy
        3. Geronimo-3757-trunk.patch
          20 kB
          Richard McGuire
        4. Geronimo-3757.patch
          24 kB
          Vasily Zakharov
        5. Geronimo-3757.patch
          20 kB
          Vasily Zakharov
        6. GERONIMO-3757.patch
          17 kB
          Vamsavardhana Reddy

        Issue Links

          Activity

            People

              vamsic Vamsavardhana Reddy
              vmz Vasily Zakharov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: