Skip to content

Commit 8757bb1

Browse files
authored
Version bump & documentation (#2)
1 parent bbbf995 commit 8757bb1

4 files changed

Lines changed: 31 additions & 87 deletions

File tree

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This repository contains a Spring Boot implementation for application-level fiel
44

55
**IMPORTANT DISCLAIMER**: **NOT PRODUCTION GRADE**
66

7-
## Solution Summary
7+
## Summary
88

99
The application protects sensitive fields before they are persisted by combining the following controls:
1010

@@ -17,7 +17,7 @@ The application protects sensitive fields before they are persisted by combining
1717
## Technology Stack
1818

1919
- Java 21
20-
- Spring Boot 3.3.4
20+
- Spring Boot 3.5.x
2121
- Maven
2222
- PostgreSQL
2323
- HashiCorp Vault
@@ -28,14 +28,13 @@ The application protects sensitive fields before they are persisted by combining
2828

2929
Key top-level paths:
3030

31-
- `src/main/java/dev/wackydevelopers/encryption/`: application source code
32-
- `src/test/java/dev/wackydevelopers/encryption/`: unit, integration, and e2e tests
33-
- `db/`: database migration assets and validation scripts
31+
- `src/main/`: application source code
32+
- `src/test/`: unit, integration, and e2e tests
3433
- `vault/`: Vault bootstrap assets and validation scripts
3534
- `docs/`: runbooks and supporting documentation
3635
- `postman/`: Postman collection and environment files
3736

38-
## Architecture Diagram
37+
## Architecture
3938

4039
The following high-level view shows the main runtime components and trust boundaries:
4140

@@ -59,7 +58,7 @@ The primary local workflow is documented in [docs/local-development-workflow.md]
5958

6059
Typical prerequisites:
6160

62-
- Docker with Compose plugin
61+
- Docker/podman with Compose plugin
6362
- Java 21 or later
6463
- Maven 3.9 or later
6564

@@ -130,9 +129,11 @@ This repository currently emphasizes implementation and validation of:
130129
- Vault bootstrap and startup resilience behavior
131130
- key rotation workflows and contract validation
132131

133-
The implementation **IS NOT PRODUCTION GRADE** but only a showcase. **DO NOT USE IN PRODUCTION** UNLESS REVIEWED AND VETTED
132+
The implementation **IS NOT PRODUCTION GRADE** but only a showcase. **DO NOT USE IN PRODUCTION** UNLESS REVIEWED AND VETTED.
134133

135134
Other than that, enjoy your stay and *you can checkout any time you like...*.
136135
If this repo helps you in any chance, target achieved!
137136

138137
Cheers, and remember, *the bards' songs will remain*.
138+
139+
PS: Did I mention that this is **NOT BATTLE-TESTED & PRODUCTION READY**?

config/application-vault-example.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

docs/local-development-workflow.md

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,34 @@ This runbook defines the primary Docker-based local setup and the fallback workf
66

77
## Prerequisites
88

9-
Run prerequisite checks:
10-
11-
```bash
12-
bash scripts/check-prerequisites.sh
13-
```
14-
159
Expected tools:
1610

1711
- Docker with Compose plugin
1812
- Java 21+
1913
- Maven 3.9+
2014

21-
Ensure scripts are executable:
22-
23-
```bash
24-
chmod +x scripts/*.sh db/tests/*.sh vault/tests/*.sh tests/*.sh
25-
```
26-
2715
## Primary Workflow (Docker Compose)
2816

2917
1. Start local stack and run Vault bootstrap:
3018

3119
```bash
32-
bash scripts/start-local.sh
20+
docker compose up -d postgres vault
3321
```
3422

35-
1. Confirm services:
23+
2. Confirm services:
3624

3725
```bash
3826
docker compose ps
3927
```
4028

29+
3. Initialise vault:
30+
31+
```bash
32+
docker compose run --rm vault-init
33+
```
34+
35+
Check logs to get the AppRole `role-id` and generated `secret-id`. These are necessary environment variables (`VAULT_ROLE_ID` & `VAULT_SECRET_ID`) for the application to start.
36+
4137
1. Access endpoints:
4238

4339
- PostgreSQL: localhost:5432
@@ -51,37 +47,15 @@ Use fallback only when Docker Compose cannot be used in the current environment.
5147
1. Run API in in-memory mode:
5248

5349
```bash
54-
bash scripts/start-local-fallback.sh
50+
mvn -q -DskipTests -Dspring-boot.run.profiles=inmemory spring-boot:run
5551
```
5652

57-
1. Validate API health:
53+
2. Validate API health:
5854

5955
```bash
6056
curl http://localhost:8080/actuator/health
6157
```
6258

63-
## Troubleshooting
64-
65-
1. Docker daemon not running:
66-
67-
- Start Docker Desktop or daemon service.
68-
- Re-run `bash scripts/check-prerequisites.sh`.
69-
70-
1. Vault init fails:
71-
72-
- Check Vault container logs: docker compose logs vault
73-
- Re-run bootstrap: docker compose run --rm vault-init
74-
75-
1. Port conflicts:
76-
77-
- Check listeners on 5432/8200/8080 and free conflicting processes.
78-
- Override mapped ports in docker-compose.yml if needed.
79-
80-
1. Fallback startup fails:
81-
82-
- Verify Java and Maven paths.
83-
- Run `mvn -q test` first to ensure project compiles.
84-
8559
## Exit and Cleanup
8660

8761
Stop and remove services:

pom.xml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@
1111
<maven.compiler.source>21</maven.compiler.source>
1212
<maven.compiler.target>21</maven.compiler.target>
1313
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
14-
<spring.boot.version>3.3.4</spring.boot.version>
15-
<flyway.version>10.20.1</flyway.version>
16-
<jackson.version>2.17.2</jackson.version>
17-
<junit.jupiter.version>5.11.0</junit.jupiter.version>
18-
<testcontainers.version>1.20.4</testcontainers.version>
19-
<postgresql.version>42.7.4</postgresql.version>
14+
<spring.boot.version>3.5.13</spring.boot.version>
15+
<flyway.version>11.7.2</flyway.version>
16+
<jackson.version>2.21.2</jackson.version>
17+
<jackson.annotations.version>2.21</jackson.annotations.version>
18+
<junit.jupiter.version>5.12.2</junit.jupiter.version>
19+
<testcontainers.version>1.21.4</testcontainers.version>
20+
<postgresql.version>42.7.10</postgresql.version>
2021
<h2.version>2.3.232</h2.version>
21-
<slf4j.version>2.0.16</slf4j.version>
22-
<maven.surefire.plugin.version>3.3.1</maven.surefire.plugin.version>
22+
<slf4j.version>2.0.17</slf4j.version>
23+
<maven.surefire.plugin.version>3.5.5</maven.surefire.plugin.version>
2324
</properties>
2425

2526
<dependencies>
@@ -111,7 +112,7 @@
111112
<dependency>
112113
<groupId>com.fasterxml.jackson.core</groupId>
113114
<artifactId>jackson-annotations</artifactId>
114-
<version>${jackson.version}</version>
115+
<version>${jackson.annotations.version}</version>
115116
</dependency>
116117

117118
<dependency>

0 commit comments

Comments
 (0)