Skip to content

Commit eb99586

Browse files
committed
Merge branch 'develop' into master
2 parents 5d2cb11 + cdbb92e commit eb99586

File tree

5 files changed

+52
-13
lines changed

5 files changed

+52
-13
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,55 @@
55
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f8c426863d4c46578ef2b7ae8c32e99f)](https://app.codacy.com/gh/purejava/keepassxc-proxy-access?utm_source=github.com&utm_medium=referral&utm_content=purejava/keepassxc-proxy-access&utm_campaign=Badge_Grade)
66
[![Maven Central](https://img.shields.io/maven-central/v/org.purejava/keepassxc-proxy-access.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22org.purejava%22%20AND%20a:%22keepassxc-proxy-access%22)
77
[![License](https://img.shields.io/github/license/purejava/keepassxc-proxy-access.svg)](https://github.com/purejava/keepassxc-proxy-access/blob/master/LICENSE)
8+
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate?hosted_button_id=XVX9ZM7WE4ANL)
89

910
A Java library to access KeePassXC via its build-in proxy.
1011

12+
# Dependency
13+
Add `keepassxc-proxy-access` as a dependency to your project.
14+
```maven
15+
<dependency>
16+
<groupId>org.purejava</groupId>
17+
<artifactId>keepassxc-proxy-access</artifactId>
18+
<version>0.0.2</version>
19+
</dependency>
20+
```
21+
22+
# Usage
23+
The library uses the JSON data format to communicate with KeePassXC. The underlying TweetNaCL crypto library provides the crypto_box functionality that is used to set up an encrypted and secure channel for the components to communicate with each other.
24+
25+
It's fast, easy to use and cross-platform.
26+
27+
Examples on how to use the library can be found in the Maven test classes.
28+
29+
You need to establish a connection to KeePassXC first:
30+
```java
31+
private KeepassProxyAccess kpa = new KeepassProxyAccess();
32+
kpa.connect();
33+
kpa.associate();
34+
```
35+
You'll get an AssociateID and the public key of an IDKeypair created during the initial connection.
36+
Both pieces of data combined are needed for further connections. As both are public data, there is no need to store them securely.
37+
38+
# keepassxc-protocol
39+
Communication with KeePassXC happens via the KeePassXC protocol. Currently, the following functionality is implemented:
40+
* `change-public-keys`: Request for passing public keys from client to server and back.
41+
* `get-databasehash`: Request for receiving the database hash (SHA256) of the current active database.
42+
* `associate`: Request for associating a new client with KeePassXC.
43+
* `test-associate`: Request for testing if the client has been associated with KeePassXC.
44+
* `generate-password`: Request for generating a password. KeePassXC's settings are used.
45+
* `get-logins`: Requests for receiving credentials for the current URL match.
46+
* `set-login`: Request for adding or updating credentials to the database.
47+
* `lock-database`: Request for locking the database from client.
48+
* `get-database-groups`: Request to retrieve all database groups together with their groupUuids.
49+
* `create-new-group`: Request to create a new group for the given name or path.
50+
* `get-totp`: Request for receiving the current TOTP.
51+
52+
# Donation
53+
If you like this project, you can give me a cup of coffee :)
54+
55+
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/donate?hosted_button_id=XVX9ZM7WE4ANL)
56+
1157
# Copyright
1258
Copyright (C) 2021 Ralph Plawetzki
1359

pom.xml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.purejava</groupId>
88
<artifactId>keepassxc-proxy-access</artifactId>
9-
<version>0.0.1</version>
9+
<version>0.0.2</version>
1010
<packaging>jar</packaging>
1111

1212
<name>keepassxc-proxy-access</name>
@@ -54,17 +54,10 @@
5454
<maven.compiler.target>1.9</maven.compiler.target>
5555
</properties>
5656

57-
<!-- local repo for tweetnacl-java -->
58-
<repositories>
59-
<repository>
60-
<id>local-repo</id>
61-
<url>file://${basedir}/etc/repo</url>
62-
</repository>
63-
</repositories>
64-
57+
<!-- tweetnacl-java -->
6558
<dependencies>
6659
<dependency>
67-
<groupId>com.iwebpp.crypto</groupId>
60+
<groupId>org.purejava</groupId>
6861
<artifactId>tweetnacl-java</artifactId>
6962
<version>1.1.2</version>
7063
</dependency>

src/main/java/org/keepassxc/LinuxMacConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
public class LinuxMacConnection extends Connection {
1919

20-
static final Logger log = LoggerFactory.getLogger(LinuxMacConnection.class);
20+
private static final Logger log = LoggerFactory.getLogger(LinuxMacConnection.class);
2121

2222
private AFUNIXSocket socket;
2323
private OutputStream os;

src/main/java/org/keepassxc/WindowsConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
public class WindowsConnection extends Connection {
1313

14-
static final Logger log = LoggerFactory.getLogger(WindowsConnection.class);
14+
private static final Logger log = LoggerFactory.getLogger(WindowsConnection.class);
1515

1616
private RandomAccessFile pipe;
1717

src/test/java/org/purejava/UnlockedDatabaseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* For this test, KeePassXC should be started and unlocked.
1919
*/
2020
public class UnlockedDatabaseTest {
21-
static final Logger log = LoggerFactory.getLogger(UnlockedDatabaseTest.class);
21+
private static final Logger log = LoggerFactory.getLogger(UnlockedDatabaseTest.class);
2222

2323
private KeepassProxyAccess kpa = new KeepassProxyAccess();
2424

0 commit comments

Comments
 (0)