Skip to content

Test interoperability with KeePassXC in CI #117

Description

@jorabin

For 3.1.2, KeePassXC compatibility was checked by hand with keepassxc-cli 2.7.4: KDBX files written by
KeePassJava2 open in KeePassXC (including KDBX 3.1 with protected attachments), and plain XML written by
KeePassJava2 imports into KeePassXC with the same passwords and attachments. That check found that KeePassXC's
import crashed on the Protected="True" values KeePassJava2 used to write in plain XML. KdbxXmlRoundTripTest
tests reading KeePassXC's XML, but nothing in the build tests that KeePassXC can read what KeePassJava2 writes.

For 3.2.0, add a test that does this automatically:

  • a JUnit test (e.g. KeePassXcInteropTest) that runs keepassxc-cli through ProcessBuilder:
    • opens KDBX files written by KeePassJava2 (3.1, 4.0, 4.1; with protected and unprotected attachments)
      and compares entries' passwords and exported attachments with the originals
    • imports plain XML written by KeePassJava2, and makes the same comparisons
  • skipped (a JUnit assumption) when keepassxc-cli isn't installed, so local builds without it still pass
  • install KeePassXC before the tests in both CI configurations, so that both run them:
    • .github/workflows/build.yml (GitHub Actions, ubuntu-latest, JDK 17 and 21): on a fixed runner
      (e.g. ubuntu-24.04) or with a pinned KeePassXC version
    • .circleci/config.yml (CircleCI, cimg/openjdk:17.0 Docker image): sudo apt-get install -y keepassxc,
      or a pinned version, in a step before Test
      so that a new KeePassXC release doesn't change the build unannounced, and both get the same version
  • keep the number of keepassxc-cli calls small: each one derives the key, which is slow by design

Not covered: KeePass itself (Windows .NET), which would need Mono on Linux.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions