Skip to content

Commit 0fa0613

Browse files
committed
docs: add markdownlint, formatting improvements
1 parent 0d77156 commit 0fa0613

File tree

9 files changed

+66
-27
lines changed

9 files changed

+66
-27
lines changed

.markdownlint-cli2.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# markdownlint-cli2 configuration
2+
# https://github.com/DavidAnson/markdownlint-cli2
3+
4+
ignores:
5+
- "target/**"
6+
- "node_modules/**"

.markdownlint.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# markdownlint configuration for InferaDB Management
2+
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
3+
4+
# Disable line length - not practical for technical docs with code, tables, URLs
5+
MD013: false
6+
7+
# Allow duplicate headings in different sections (common in API docs: Request/Response)
8+
MD024:
9+
siblings_only: true
10+
11+
# Allow emphasis as pseudo-headings for inline section labels
12+
MD036: false
13+
14+
# Require language on fenced code blocks
15+
MD040: true
16+
17+
# Table formatting - disable strict alignment (prettier handles this)
18+
MD058: false
19+
MD060: false
20+
21+
# Allow inline HTML when needed
22+
MD033: false
23+
24+
# Allow trailing punctuation in headings (e.g., "What is IPL?")
25+
MD026: false
26+
27+
# Allow multiple blank lines (sometimes useful for visual separation)
28+
MD012: false
29+
30+
# Allow hard tabs in code blocks
31+
MD010:
32+
code_blocks: false

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ mod tests {
122122

123123
Follow [Conventional Commits](https://www.conventionalcommits.org/):
124124

125-
```
125+
```text
126126
<type>(<scope>): <subject>
127127
128128
<body>
@@ -142,7 +142,7 @@ Types:
142142

143143
Examples:
144144

145-
```
145+
```text
146146
feat(auth): implement password authentication
147147
148148
Add password-based authentication with Argon2id hashing.
@@ -151,7 +151,7 @@ Includes rate limiting and session management.
151151
Closes #123
152152
```
153153

154-
```
154+
```text
155155
fix(storage): handle FoundationDB connection timeout
156156
157157
Add retry logic with exponential backoff for FDB connections.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ format: ## Format code (Prettier, Taplo, markdownlint, rustfmt)
7575
@$(PRETTIER) --write "**/*.{md,yml,yaml,json}" --log-level warn || true
7676
@$(MARKDOWNLINT) --fix "**/*.md" || true
7777
@$(TAPLO) fmt || true
78-
@$(CARGO) fmt --all
78+
@$(CARGO) +nightly fmt --all
7979
@echo "✅ Formatting complete!"
8080

8181
lint: ## Run linters (clippy, markdownlint)

NOTICE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ Under the terms of this license:
1818

1919
---
2020

21-
### **Trademarks**
21+
## Trademarks
2222

2323
"InferaDB" and the InferaDB logo are trademarks of the InferaDB Project.
2424
No right, title, or interest in these trademarks is granted under this license.
2525

2626
---
2727

28-
### **Third-Party Components**
28+
## Third-Party Components
2929

3030
This project may include open-source dependencies governed by their respective licenses.
3131
A complete list of third-party components and their licenses can be found in `THIRD_PARTY_NOTICES.md` (to be added as the project evolves).
3232

3333
---
3434

35-
### **Summary**
35+
## Summary
3636

3737
InferaDB is developed and maintained by the InferaDB Project to advance the state of fine-grained authorization and distributed access control.
3838
While the software is source-available, its use in commercial SaaS offerings requires prior authorization.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ cargo run --bin inferadb-management
4848

4949
Built in Rust with pluggable storage:
5050

51-
```
51+
```text
5252
infera-management # Main binary
5353
├── infera-management-api # REST/gRPC handlers
5454
├── infera-management-core # Business logic, entities, repositories

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ observability:
6363

6464
You should see output like:
6565

66-
```
66+
```text
6767
2025-11-18T10:00:00.000Z INFO Starting InferaDB Management API
6868
2025-11-18T10:00:00.123Z INFO HTTP server listening on 127.0.0.1:3000
6969
2025-11-18T10:00:00.456Z INFO gRPC server listening on 127.0.0.1:3001

docs/overview.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,7 +2323,7 @@ class VaultClient:
23232323

23242324
**Token Expiry Timeline**:
23252325

2326-
```
2326+
```text
23272327
Time: 0min 55min 60min 24hr 7d
23282328
| | | | |
23292329
Access: [========= JWT valid =========][expired]
@@ -2368,7 +2368,7 @@ This method provides the best user experience for interactive CLI usage by lever
23682368

23692369
**Detailed Implementation**:
23702370

2371-
**Step 1: CLI initiates auth flow**
2371+
#### Step 1: CLI initiates auth flow
23722372

23732373
```bash
23742374
inferadb login
@@ -2402,7 +2402,7 @@ open_browser(&auth_url);
24022402
start_callback_server(callback_port).await;
24032403
```
24042404

2405-
**Step 2: Dashboard authenticates user and redirects**
2405+
#### Step 2: Dashboard authenticates user and redirects
24062406

24072407
Dashboard UI (`https://app.inferadb.com/cli-login`):
24082408

@@ -2444,18 +2444,18 @@ Dashboard UI (`https://app.inferadb.com/cli-login`):
24442444
- `expires_at` (5 minutes from now)
24452445
4. Return authorization code to Dashboard
24462446

2447-
**Step 3: Dashboard redirects to CLI callback**
2447+
#### Step 3: Dashboard redirects to CLI callback
24482448

2449-
```
2449+
```http
24502450
HTTP/1.1 302 Found
24512451
Location: http://localhost:8432/callback?code=<authorization_code>&state=<state>
24522452
```
24532453

2454-
**Step 4: CLI receives callback and exchanges code for token**
2454+
#### Step 4: CLI receives callback and exchanges code for token
24552455

24562456
CLI callback handler receives:
24572457

2458-
```
2458+
```http
24592459
GET /callback?code=<authorization_code>&state=<state>
24602460
```
24612461

@@ -2491,15 +2491,15 @@ CLI calls Management API to exchange code for session token:
24912491
4. Return the session token associated with the authorization code
24922492
5. CLI stores session token in secure storage
24932493

2494-
**Step 5: CLI uses session token for API requests**
2494+
#### Step 5: CLI uses session token for API requests
24952495

24962496
```bash
24972497
inferadb vaults list
24982498
```
24992499

25002500
CLI includes session token in requests:
25012501

2502-
```
2502+
```http
25032503
GET /v1/organizations
25042504
Authorization: Bearer <session_token>
25052505
```
@@ -2611,7 +2611,7 @@ fn generate_client_assertion(client_id: &str, private_key_pem: &str) -> Result<S
26112611

26122612
CLI/SDK exchanges client assertion for vault-scoped JWT:
26132613

2614-
```
2614+
```http
26152615
POST /v1/token
26162616
Content-Type: application/x-www-form-urlencoded
26172617
@@ -2682,7 +2682,7 @@ $ inferadb vaults list
26822682

26832683
**Management API Request**:
26842684

2685-
```
2685+
```http
26862686
GET /v1/organizations
26872687
Authorization: Bearer <session_token>
26882688
```
@@ -3176,7 +3176,7 @@ pub struct SystemApiKey {
31763176

31773177
### JWT Client Assertion Flow
31783178

3179-
**Step 1: Management API generates client assertion JWT**
3179+
#### Step 1: Management API generates client assertion JWT
31803180

31813181
When the Management API needs to call the Server API, it generates a short-lived JWT (client assertion) signed with its System API Key:
31823182

@@ -3223,7 +3223,7 @@ async fn generate_client_assertion(system_key: &SystemApiKey) -> Result<String>
32233223
}
32243224
```
32253225

3226-
**Step 2: Include JWT in gRPC metadata**
3226+
#### Step 2: Include JWT in gRPC metadata
32273227

32283228
```rust
32293229
use tonic::{metadata::MetadataValue, Request};
@@ -3252,7 +3252,7 @@ async fn create_server_client() -> Result<VaultManagementServiceClient<Channel>>
32523252
}
32533253
```
32543254

3255-
**Step 3: Server validates JWT using JWKS**
3255+
#### Step 3: Server validates JWT using JWKS
32563256

32573257
The Server API fetches the Management API's JWKS endpoint to retrieve public keys:
32583258

@@ -3514,7 +3514,7 @@ This section focuses on **tenant requests** and how the Server enforces VaultRol
35143514

35153515
VaultRoles define what operations are permitted within a vault:
35163516

3517-
```
3517+
```text
35183518
READER < WRITER < MANAGER < ADMIN
35193519
```
35203520

@@ -3705,7 +3705,7 @@ The Server API enforces tenant isolation by prefixing all storage operations wit
37053705

37063706
**FoundationDB Keyspace** (Server side):
37073707

3708-
```
3708+
```text
37093709
vault_<vault_id>/
37103710
tuples/
37113711
<namespace>/<object>/<relation>/<subject>
@@ -4504,7 +4504,7 @@ async fn main() -> Result<()> {
45044504

45054505
All data is isolated by entity type and organization to ensure security:
45064506

4507-
```
4507+
```text
45084508
mgmt/ # Namespace prefix
45094509
users/
45104510
<user_id>/ # User data

loadtests/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ done
158158
```
159159

160160
2. Run tests against localhost:
161+
161162
```bash
162163
k6 run loadtests/auth.js
163164
```
@@ -195,7 +196,7 @@ Each test defines custom metrics:
195196

196197
### Example Output
197198

198-
```
199+
```text
199200
running (4m30.0s), 000/100 VUs, 12500 complete and 0 interrupted iterations
200201
default ✓ [======================================] 100 VUs 4m30s
201202

0 commit comments

Comments
 (0)