Skip to content

KeePassJava2 3.0.0

Choose a tag to compare

@jorabin jorabin released this 03 Oct 02:02
· 35 commits to v3-master since this release

The first release of version 3. It needs Java 11, and is on Maven Central.

Version 2 is still maintained for now, with bug and security fixes; its current release is 2.2.6, on the master branch. Version 3 is developed on v3-develop, and v3-master holds the latest 3.x release.

Changes you may need to act on

Upgrading from 2.x needs some, mostly minor, changes to your code and build:

  • Java 11 is required.

  • One KDBX implementation. The Jackson implementation is now the KDBX database, KdbxDatabase (was JacksonDatabase). The Simple, JAXB and DOM implementations are removed.

  • No generics on the database classes. Database, Group, Entry and so on are no longer generic, so declarations such as Database<?,?,?,?> become plain Database.

  • Renamed classes, for example KdbxCreds is now KdbxCredentials.

  • New artifacts (group org.linguafranca.pwdb):

    2.x 3.0.0
    KeePassJava2-jackson KeePassJava2.kdbx.database
    KeePassJava2-kdbx KeePassJava2.kdbx.io
    KeePassJava2-kdb KeePassJava2.kdb
    database database
    KeePassJava2 (all) KeePassJava2 (KDBX and KDB)
    KeePassJava2-simple, -jaxb, -dom removed
  • New Java module names (#93), deliberately different from 2.x: org.linguafranca.pwdb.database, org.linguafranca.pwdb.kdb, org.linguafranca.pwdb.kdbx.io, org.linguafranca.pwdb.kdbx.database and org.linguafranca.pwdb.all. Update your requires clauses.

See the Quick Start for a worked example in the version 3 API.

New

  • Pluggable storage of property values, so sensitive values such as passwords can be kept protected in memory. By default the password is protected.
  • Fluent building of entries, e.g. group.addEntry("entry").addProperty(USER_NAME, "Tom").addProperty(PASSWORD, ...), and more convenience methods.
  • Group times (#99): Group now has getCreationTime(), getLastModificationTime(), getLastAccessTime(), getExpires()/setExpires() and getExpiryTime()/setExpiryTime(), as Entry does.
  • Loading XML (#96): KdbxDatabase.load(StreamFormat, Credentials, InputStream), for example with StreamFormat.None for XML; KeePass XML export ProtectInMemory values stay protected, and loadXml() no longer fails on Protected values.

Fixes

Version 3 includes all the fixes made in 2.x up to 2.2.6:

  • Attachments: KDBX 4 files stored attachments twice, and each save of a loaded database added another copy (#97); Meta/Binaries was written in a form KeePassXC drops for KDBX 3.1 (#98).
  • Non-UTF-8 default encoding: non-ASCII text was saved in the platform encoding, so the database couldn't be loaded back (#104, #83).
  • Custom icons were serialized incorrectly (#87), and an empty autotype element KeePass needs was missing (#89).
  • No test or logging libraries are passed on to your application (#81).

Dependencies and build

  • Dependencies are current, as in 2.2.5 (#88, #90): Jackson 2.22.3, Woodstox 7.3.0, Guava 33.7.2, Bouncy Castle 1.86 and Commons Codec 1.22.1.
  • The Maven plugins are updated (#68), and publishing uses the Central Publishing plugin.
  • Building KeePassJava2 needs JDK 11 or later; it compiles with --release 11.

Maven

<dependency>
    <groupId>org.linguafranca.pwdb</groupId>
    <artifactId>KeePassJava2.kdbx.database</artifactId>
    <version>3.0.0</version>
</dependency>

Or KeePassJava2 for the KDBX and KDB implementations together.

See the CHANGELOG for the full history.