Skip to content

Commit 0b434be

Browse files
committed
#23 | Create documentation page
1 parent 0865161 commit 0b434be

20 files changed

+787
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,3 +359,5 @@ Resource.designer.cs
359359
*.zip
360360
KeePassHttp.plgx
361361
mono/KeePassHttp.dll
362+
docs/_site/
363+
docs/.jekyll-cache/

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"explorer.excludeGitIgnore": true
3+
}

docs/Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source "https://rubygems.org"
2+
3+
gem "github-pages", group: :jekyll_plugins
4+
gem "jekyll-remote-theme"

docs/Gemfile.lock

Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
activesupport (7.1.6)
5+
base64
6+
benchmark (>= 0.3)
7+
bigdecimal
8+
concurrent-ruby (~> 1.0, >= 1.0.2)
9+
connection_pool (>= 2.2.5)
10+
drb
11+
i18n (>= 1.6, < 2)
12+
logger (>= 1.4.2)
13+
minitest (>= 5.1)
14+
mutex_m
15+
securerandom (>= 0.3)
16+
tzinfo (~> 2.0)
17+
addressable (2.8.7)
18+
public_suffix (>= 2.0.2, < 7.0)
19+
base64 (0.2.0)
20+
benchmark (0.5.0)
21+
bigdecimal (3.3.1)
22+
coffee-script (2.4.1)
23+
coffee-script-source
24+
execjs
25+
coffee-script-source (1.12.2)
26+
colorator (1.1.0)
27+
commonmarker (0.23.12)
28+
concurrent-ruby (1.3.5)
29+
connection_pool (2.5.4)
30+
dnsruby (1.72.4)
31+
base64 (~> 0.2.0)
32+
logger (~> 1.6.5)
33+
simpleidn (~> 0.2.1)
34+
drb (2.2.3)
35+
em-websocket (0.5.3)
36+
eventmachine (>= 0.12.9)
37+
http_parser.rb (~> 0)
38+
ethon (0.15.0)
39+
ffi (>= 1.15.0)
40+
eventmachine (1.2.7)
41+
execjs (2.10.0)
42+
faraday (2.8.1)
43+
base64
44+
faraday-net_http (>= 2.0, < 3.1)
45+
ruby2_keywords (>= 0.0.4)
46+
faraday-net_http (3.0.2)
47+
ffi (1.17.2)
48+
forwardable-extended (2.6.0)
49+
gemoji (4.1.0)
50+
github-pages (231)
51+
github-pages-health-check (= 1.18.2)
52+
jekyll (= 3.9.5)
53+
jekyll-avatar (= 0.8.0)
54+
jekyll-coffeescript (= 1.2.2)
55+
jekyll-commonmark-ghpages (= 0.4.0)
56+
jekyll-default-layout (= 0.1.5)
57+
jekyll-feed (= 0.17.0)
58+
jekyll-gist (= 1.5.0)
59+
jekyll-github-metadata (= 2.16.1)
60+
jekyll-include-cache (= 0.2.1)
61+
jekyll-mentions (= 1.6.0)
62+
jekyll-optional-front-matter (= 0.3.2)
63+
jekyll-paginate (= 1.1.0)
64+
jekyll-readme-index (= 0.3.0)
65+
jekyll-redirect-from (= 0.16.0)
66+
jekyll-relative-links (= 0.6.1)
67+
jekyll-remote-theme (= 0.4.3)
68+
jekyll-sass-converter (= 1.5.2)
69+
jekyll-seo-tag (= 2.8.0)
70+
jekyll-sitemap (= 1.4.0)
71+
jekyll-swiss (= 1.0.0)
72+
jekyll-theme-architect (= 0.2.0)
73+
jekyll-theme-cayman (= 0.2.0)
74+
jekyll-theme-dinky (= 0.2.0)
75+
jekyll-theme-hacker (= 0.2.0)
76+
jekyll-theme-leap-day (= 0.2.0)
77+
jekyll-theme-merlot (= 0.2.0)
78+
jekyll-theme-midnight (= 0.2.0)
79+
jekyll-theme-minimal (= 0.2.0)
80+
jekyll-theme-modernist (= 0.2.0)
81+
jekyll-theme-primer (= 0.6.0)
82+
jekyll-theme-slate (= 0.2.0)
83+
jekyll-theme-tactile (= 0.2.0)
84+
jekyll-theme-time-machine (= 0.2.0)
85+
jekyll-titles-from-headings (= 0.5.3)
86+
jemoji (= 0.13.0)
87+
kramdown (= 2.4.0)
88+
kramdown-parser-gfm (= 1.1.0)
89+
liquid (= 4.0.4)
90+
mercenary (~> 0.3)
91+
minima (= 2.5.1)
92+
nokogiri (>= 1.13.6, < 2.0)
93+
rouge (= 3.30.0)
94+
terminal-table (~> 1.4)
95+
github-pages-health-check (1.18.2)
96+
addressable (~> 2.3)
97+
dnsruby (~> 1.60)
98+
octokit (>= 4, < 8)
99+
public_suffix (>= 3.0, < 6.0)
100+
typhoeus (~> 1.3)
101+
html-pipeline (2.14.3)
102+
activesupport (>= 2)
103+
nokogiri (>= 1.4)
104+
http_parser.rb (0.8.0)
105+
i18n (1.14.7)
106+
concurrent-ruby (~> 1.0)
107+
jekyll (3.9.5)
108+
addressable (~> 2.4)
109+
colorator (~> 1.0)
110+
em-websocket (~> 0.5)
111+
i18n (>= 0.7, < 2)
112+
jekyll-sass-converter (~> 1.0)
113+
jekyll-watch (~> 2.0)
114+
kramdown (>= 1.17, < 3)
115+
liquid (~> 4.0)
116+
mercenary (~> 0.3.3)
117+
pathutil (~> 0.9)
118+
rouge (>= 1.7, < 4)
119+
safe_yaml (~> 1.0)
120+
jekyll-avatar (0.8.0)
121+
jekyll (>= 3.0, < 5.0)
122+
jekyll-coffeescript (1.2.2)
123+
coffee-script (~> 2.2)
124+
coffee-script-source (~> 1.12)
125+
jekyll-commonmark (1.4.0)
126+
commonmarker (~> 0.22)
127+
jekyll-commonmark-ghpages (0.4.0)
128+
commonmarker (~> 0.23.7)
129+
jekyll (~> 3.9.0)
130+
jekyll-commonmark (~> 1.4.0)
131+
rouge (>= 2.0, < 5.0)
132+
jekyll-default-layout (0.1.5)
133+
jekyll (>= 3.0, < 5.0)
134+
jekyll-feed (0.17.0)
135+
jekyll (>= 3.7, < 5.0)
136+
jekyll-gist (1.5.0)
137+
octokit (~> 4.2)
138+
jekyll-github-metadata (2.16.1)
139+
jekyll (>= 3.4, < 5.0)
140+
octokit (>= 4, < 7, != 4.4.0)
141+
jekyll-include-cache (0.2.1)
142+
jekyll (>= 3.7, < 5.0)
143+
jekyll-mentions (1.6.0)
144+
html-pipeline (~> 2.3)
145+
jekyll (>= 3.7, < 5.0)
146+
jekyll-optional-front-matter (0.3.2)
147+
jekyll (>= 3.0, < 5.0)
148+
jekyll-paginate (1.1.0)
149+
jekyll-readme-index (0.3.0)
150+
jekyll (>= 3.0, < 5.0)
151+
jekyll-redirect-from (0.16.0)
152+
jekyll (>= 3.3, < 5.0)
153+
jekyll-relative-links (0.6.1)
154+
jekyll (>= 3.3, < 5.0)
155+
jekyll-remote-theme (0.4.3)
156+
addressable (~> 2.0)
157+
jekyll (>= 3.5, < 5.0)
158+
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
159+
rubyzip (>= 1.3.0, < 3.0)
160+
jekyll-sass-converter (1.5.2)
161+
sass (~> 3.4)
162+
jekyll-seo-tag (2.8.0)
163+
jekyll (>= 3.8, < 5.0)
164+
jekyll-sitemap (1.4.0)
165+
jekyll (>= 3.7, < 5.0)
166+
jekyll-swiss (1.0.0)
167+
jekyll-theme-architect (0.2.0)
168+
jekyll (> 3.5, < 5.0)
169+
jekyll-seo-tag (~> 2.0)
170+
jekyll-theme-cayman (0.2.0)
171+
jekyll (> 3.5, < 5.0)
172+
jekyll-seo-tag (~> 2.0)
173+
jekyll-theme-dinky (0.2.0)
174+
jekyll (> 3.5, < 5.0)
175+
jekyll-seo-tag (~> 2.0)
176+
jekyll-theme-hacker (0.2.0)
177+
jekyll (> 3.5, < 5.0)
178+
jekyll-seo-tag (~> 2.0)
179+
jekyll-theme-leap-day (0.2.0)
180+
jekyll (> 3.5, < 5.0)
181+
jekyll-seo-tag (~> 2.0)
182+
jekyll-theme-merlot (0.2.0)
183+
jekyll (> 3.5, < 5.0)
184+
jekyll-seo-tag (~> 2.0)
185+
jekyll-theme-midnight (0.2.0)
186+
jekyll (> 3.5, < 5.0)
187+
jekyll-seo-tag (~> 2.0)
188+
jekyll-theme-minimal (0.2.0)
189+
jekyll (> 3.5, < 5.0)
190+
jekyll-seo-tag (~> 2.0)
191+
jekyll-theme-modernist (0.2.0)
192+
jekyll (> 3.5, < 5.0)
193+
jekyll-seo-tag (~> 2.0)
194+
jekyll-theme-primer (0.6.0)
195+
jekyll (> 3.5, < 5.0)
196+
jekyll-github-metadata (~> 2.9)
197+
jekyll-seo-tag (~> 2.0)
198+
jekyll-theme-slate (0.2.0)
199+
jekyll (> 3.5, < 5.0)
200+
jekyll-seo-tag (~> 2.0)
201+
jekyll-theme-tactile (0.2.0)
202+
jekyll (> 3.5, < 5.0)
203+
jekyll-seo-tag (~> 2.0)
204+
jekyll-theme-time-machine (0.2.0)
205+
jekyll (> 3.5, < 5.0)
206+
jekyll-seo-tag (~> 2.0)
207+
jekyll-titles-from-headings (0.5.3)
208+
jekyll (>= 3.3, < 5.0)
209+
jekyll-watch (2.2.1)
210+
listen (~> 3.0)
211+
jemoji (0.13.0)
212+
gemoji (>= 3, < 5)
213+
html-pipeline (~> 2.2)
214+
jekyll (>= 3.0, < 5.0)
215+
kramdown (2.4.0)
216+
rexml
217+
kramdown-parser-gfm (1.1.0)
218+
kramdown (~> 2.0)
219+
liquid (4.0.4)
220+
listen (3.9.0)
221+
rb-fsevent (~> 0.10, >= 0.10.3)
222+
rb-inotify (~> 0.9, >= 0.9.10)
223+
logger (1.6.6)
224+
mercenary (0.3.6)
225+
minima (2.5.1)
226+
jekyll (>= 3.5, < 5.0)
227+
jekyll-feed (~> 0.9)
228+
jekyll-seo-tag (~> 2.1)
229+
minitest (5.26.1)
230+
mutex_m (0.3.0)
231+
nokogiri (1.15.7-x86_64-linux)
232+
racc (~> 1.4)
233+
octokit (4.25.1)
234+
faraday (>= 1, < 3)
235+
sawyer (~> 0.9)
236+
pathutil (0.16.2)
237+
forwardable-extended (~> 2.6)
238+
public_suffix (5.1.1)
239+
racc (1.8.1)
240+
rb-fsevent (0.11.2)
241+
rb-inotify (0.11.1)
242+
ffi (~> 1.0)
243+
rexml (3.4.4)
244+
rouge (3.30.0)
245+
ruby2_keywords (0.0.5)
246+
rubyzip (2.4.1)
247+
safe_yaml (1.0.5)
248+
sass (3.7.4)
249+
sass-listen (~> 4.0.0)
250+
sass-listen (4.0.0)
251+
rb-fsevent (~> 0.9, >= 0.9.4)
252+
rb-inotify (~> 0.9, >= 0.9.7)
253+
sawyer (0.9.3)
254+
addressable (>= 2.3.5)
255+
faraday (>= 0.17.3, < 3)
256+
securerandom (0.3.2)
257+
simpleidn (0.2.3)
258+
terminal-table (1.8.0)
259+
unicode-display_width (~> 1.1, >= 1.1.1)
260+
typhoeus (1.5.0)
261+
ethon (>= 0.9.0, < 0.16.0)
262+
tzinfo (2.0.6)
263+
concurrent-ruby (~> 1.0)
264+
unicode-display_width (1.8.0)
265+
266+
PLATFORMS
267+
x86_64-linux-musl
268+
269+
DEPENDENCIES
270+
github-pages
271+
jekyll-remote-theme
272+
273+
BUNDLED WITH
274+
2.2.24

docs/_config.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
title: KeePassHttp
2+
description: KeePassHttp is a plugin for KeePass that provides a secure means of exposing KeePass entries via HTTP for clients to access.
3+
repository: dummy/dummy
4+
5+
remote_theme: just-the-docs/just-the-docs
6+
plugins:
7+
- jekyll-remote-theme
8+
9+
nav_external_links:
10+
- title: Latest Release
11+
url: https://github.com/alan-null/keepasshttp/releases/latest
12+
hide_icon: false
13+
opens_in_new_tab: true

docs/api.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
layout: default
3+
title: API
4+
nav_order: 7
5+
has_toc: false
6+
---
7+
8+
# API
9+
10+
A little deeper into protocol
11+
12+
### Generic HTTP request
13+
(based on packet sniffing and code analyssis)
14+
Generic HTTP request is json sent in POST message. Cipher, by means of OpenSSL library is `AES-256-CBC`, so key is 32 byte long.
15+
16+
```bash
17+
Host: localhost:19455
18+
Connection: keep-alive
19+
Content-Length: 54
20+
Content-Type: application/json
21+
Accept: */*
22+
Accept-Encoding: gzip, deflate, br
23+
24+
{"RequestType":"test-associate","TriggerUnlock":false}
25+
```
26+
27+
Also, minimal JSON request (except that one without key set up) consists of four main parameters:
28+
- RequestType - `test-associate`, `associate`, `get-logins`, `get-logins-count`, `set-login`, ...
29+
- TriggerUnlock - TODO: what is this good for? seems always false
30+
- Nonce - 128 bit (16 bytes) long random vector, base64 encoded, used as IV for aes encryption
31+
- Verifier - verifier, base64 encoded AES encrypted data: `encrypt(base64_encode($nonce), $key, $nonce);`
32+
- Id - Key id entered into KeePass GUI while `associate`, not used during `associate`

docs/api/examples.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
layout: default
3+
title: API Examples
4+
nav_order: 32
5+
parent: API
6+
---
7+
8+
# API Request / Response Examples

docs/api/examples/associate.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: default
3+
title: associate
4+
parent: API Examples
5+
nav_order: 1
6+
---
7+
8+
# associate
9+
10+
Request:
11+
```javascript
12+
{
13+
"RequestType":"associate",
14+
"Key":"CRyXRbH9vBkdPrkdm52S3bTG2rGtnYuyJttk/mlJ15g=", // Base64 encoded 256 bit key
15+
"Nonce":"epIt2nuAZbHt5JgEsxolWg==",
16+
"Verifier":"Lj+3N58jkjoxS2zNRmTpeQ4g065OlFfJsHNQWYaOJto="
17+
}
18+
```
19+
20+
Response:
21+
```javascript
22+
{
23+
"Count":null,
24+
"Entries":null,
25+
"Error":"",
26+
"Hash":"d8312a59523d3c37d6a5401d3cfddd077e194680",
27+
"Id":"PHP", // You need to save this - to use in future
28+
"Nonce":"cJUFe18NSThQ/0yAqZMaDA==",
29+
"RequestType":"associate",
30+
"Success":true,
31+
"Verifier":"ChH0PtuQWP4UKTPhdP3XSgwFyVdekHmHT7YdL1EKA+A=",
32+
"Version":"1.8.4.1",
33+
"objectName":""
34+
}
35+
```

0 commit comments

Comments
 (0)