Derby
  1. Derby
  2. DERBY-5676

Cannot connect to AES encrypted database with IBMJCECCA provider

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Blocker Blocker
    • Resolution: Unresolved
    • Affects Version/s: 10.5.3.0
    • Fix Version/s: None
    • Component/s: Services
    • Environment:
    • Urgency:
      Normal

      Description

      The install is created on a HFS file system. And we create DB using this command
      java -cp . -jar derbyrun.jar ij databaseAuth.sql
      and databaseAuth.sql content is given below.

      connect 'jdbc:derby: /HO4/test/testDb;create=true;dataEncryption=true;bootPassword=Password;encryptionAlgorithm=AES/CBC/NoPadding;';

      --------------------------------------------------------------------------------
      – CREATE TESTTABLE TABLE WITH PRIMARY KEY OF USERNAME
      – STEP 2
      --------------------------------------------------------------------------------
      CREATE TABLE TESTTABLE
      (
      USERNAME VARCHAR(30) NOT NULL,
      PASSWORD VARCHAR(30) NOT NULL,
      PRIMARY KEY (USERNAME)
      );

      --------------------------------------------------------------------------------
      – INSERT USER INTO TESTTABLE TABLE
      – STEP 3
      --------------------------------------------------------------------------------
      INSERT INTO TESTTABLE VALUES('<adminuser>', '<adminpass>');

      EXIT;

      Create was successful. But when we try to connect to DB again it fails to start with error.

      1. scriptinascii.zip
        7 kB
        Ambili
      2. db.tar
        3.49 MB
        Ambili
      3. scripts.tar
        50 kB
        Ambili
      4. db.tar
        1.75 MB
        Kathey Marsden
      5. db.pax.Z
        1.78 MB
        Ambili
      6. derby.log
        22 kB
        Ambili

        Activity

        Gavin made changes -
        Workflow jira [ 12660060 ] Default workflow, editable Closed status [ 12801947 ]
        Knut Anders Hatlen made changes -
        Summary Database cannot to started Cannot connect to AES encrypted database with IBMJCECCA provider
        Labels derby_triage10_10
        Urgency Urgent [ 10051 ] Normal [ 10052 ]
        Component/s Services [ 11415 ]
        Component/s Tools [ 11414 ]
        Ambili made changes -
        Comment [ Hi Mike,

        Before creating DB, the /HO43/Vantagegmi/webclientdb/VantageDb did not exist. I have attached the scripts that we used to create and query the DB.
        I will run the test with no encryption and let you know. We did not try any other encryption.

        regards
        Ambili ]
        Ambili made changes -
        Description The install is created on a HFS file system. And we create DB using this command
        java -cp . -jar derbyrun.jar ij databaseAuth.sql
        and databaseAuth.sql content is given below.

        connect 'jdbc:derby: /HO43/Vantagegmi/webclientdb/VantageDb;create=true;dataEncryption=true;bootPassword=Password;encryptionAlgorithm=AES/CBC/NoPadding;';

        --------------------------------------------------------------------------------
        -- CREATE USER_CREDENTIALS TABLE WITH PRIMARY KEY OF USERNAME
        -- STEP 2
        --------------------------------------------------------------------------------
        CREATE TABLE USER_CREDENTIALS
        (
                  USERNAME VARCHAR(30) NOT NULL,
                  PASSWORD VARCHAR(30) NOT NULL,
                  PRIMARY KEY (USERNAME)
        );

        --------------------------------------------------------------------------------
        -- INSERT USER INTO USER_CREDENTIALS TABLE
        -- STEP 3
        --------------------------------------------------------------------------------
        INSERT INTO USER_CREDENTIALS VALUES('APP', 'Password');

        EXIT;

        Create was successful. But when we try to connect to DB again it fails to start with error.
        The install is created on a HFS file system. And we create DB using this command
        java -cp . -jar derbyrun.jar ij databaseAuth.sql
        and databaseAuth.sql content is given below.

        connect 'jdbc:derby: /HO4/test/testDb;create=true;dataEncryption=true;bootPassword=Password;encryptionAlgorithm=AES/CBC/NoPadding;';

        --------------------------------------------------------------------------------
        -- CREATE TESTTABLE TABLE WITH PRIMARY KEY OF USERNAME
        -- STEP 2
        --------------------------------------------------------------------------------
        CREATE TABLE TESTTABLE
        (
                  USERNAME VARCHAR(30) NOT NULL,
                  PASSWORD VARCHAR(30) NOT NULL,
                  PRIMARY KEY (USERNAME)
        );

        --------------------------------------------------------------------------------
        -- INSERT USER INTO TESTTABLE TABLE
        -- STEP 3
        --------------------------------------------------------------------------------
        INSERT INTO TESTTABLE VALUES('<adminuser>', '<adminpass>');

        EXIT;

        Create was successful. But when we try to connect to DB again it fails to start with error.
        Ambili made changes -
        Comment [ Mike,

        The issue is not with ebcidic format since the same script work on other system.
        The script ran is RunScript.sh which creates a DB at the user given path and does a backup of the db and then query the DB. You can check the script.out file in the attached zip to get the output of ij command.

        regards
        Ambili ]
        Ambili made changes -
        Comment [ Mike,

        The issue is not with ebcidic format since the same script work on other system.
        The script ran is RunScript.sh which creates a DB at the user given path and does a backup of the db and then query the DB. You can check the script.out file in the attached zip to get the output of ij command.

        regards
        Ambili ]
        Ambili made changes -
        Attachment scriptinascii.zip [ 12521098 ]
        Ambili made changes -
        Attachment db.tar [ 12521042 ]
        Ambili made changes -
        Attachment scripts.tar [ 12521038 ]
        Kathey Marsden made changes -
        Attachment db.tar [ 12520337 ]
        Ambili made changes -
        Description The install is created on a HFS file system. And we create DB using this command
        java -cp . -jar derbyrun.jar ij databaseAuth.sql
        and databaseAuth.sql content is given below.

        connect 'jdbc:derby: /HO43/Vantagegmi/webclientdb/VantageDb';create=true;dataEncryption=true;bootPassword=Password;encryptionAlgorithm=AES/CBC/NoPadding;';

        --------------------------------------------------------------------------------
        -- CREATE USER_CREDENTIALS TABLE WITH PRIMARY KEY OF USERNAME
        -- STEP 2
        --------------------------------------------------------------------------------
        CREATE TABLE USER_CREDENTIALS
        (
                  USERNAME VARCHAR(30) NOT NULL,
                  PASSWORD VARCHAR(30) NOT NULL,
                  PRIMARY KEY (USERNAME)
        );

        --------------------------------------------------------------------------------
        -- INSERT USER INTO USER_CREDENTIALS TABLE
        -- STEP 3
        --------------------------------------------------------------------------------
        INSERT INTO USER_CREDENTIALS VALUES('APP', 'Password');

        EXIT;

        Create was successful. But when we try to connect to DB again it fails to start with error.
        The install is created on a HFS file system. And we create DB using this command
        java -cp . -jar derbyrun.jar ij databaseAuth.sql
        and databaseAuth.sql content is given below.

        connect 'jdbc:derby: /HO43/Vantagegmi/webclientdb/VantageDb;create=true;dataEncryption=true;bootPassword=Password;encryptionAlgorithm=AES/CBC/NoPadding;';

        --------------------------------------------------------------------------------
        -- CREATE USER_CREDENTIALS TABLE WITH PRIMARY KEY OF USERNAME
        -- STEP 2
        --------------------------------------------------------------------------------
        CREATE TABLE USER_CREDENTIALS
        (
                  USERNAME VARCHAR(30) NOT NULL,
                  PASSWORD VARCHAR(30) NOT NULL,
                  PRIMARY KEY (USERNAME)
        );

        --------------------------------------------------------------------------------
        -- INSERT USER INTO USER_CREDENTIALS TABLE
        -- STEP 3
        --------------------------------------------------------------------------------
        INSERT INTO USER_CREDENTIALS VALUES('APP', 'Password');

        EXIT;

        Create was successful. But when we try to connect to DB again it fails to start with error.
        Ambili made changes -
        Attachment db.pax.Z [ 12520329 ]
        Ambili made changes -
        Field Original Value New Value
        Attachment derby.log [ 12520304 ]
        Ambili created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Ambili
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development