Skip to content

Commit 515ae78

Browse files
authored
Merge pull request #126 from jamals86/feature/pubsub
Feature/pubsub
2 parents 7335239 + 783b379 commit 515ae78

7 files changed

Lines changed: 37 additions & 37 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
version_tag:
7-
description: "Version tag for release (e.g. v0.2.0)"
7+
description: "Version tag for release (e.g. v0.3.0)"
88
required: true
9-
default: "v0.2.0"
9+
default: "v0.3.0"
1010

1111
platforms:
1212
description: "Comma-separated platforms (like --platforms). Ignored if all_platforms=true"

Cargo.lock

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ members = [
2424
]
2525

2626
[workspace.package]
27-
version = "0.2.0"
27+
version = "0.3.0-alpha1"
2828
edition = "2021"
2929
rust-version = "1.92"
3030
authors = ["KalamDB Team"]
@@ -39,7 +39,7 @@ serde_json = "1.0.149"
3939

4040
# Error handling
4141
thiserror = "2.0.18"
42-
anyhow = "1.0"
42+
anyhow = "1.0.101"
4343

4444
# Logging
4545
log = "0.4.29"
@@ -105,7 +105,7 @@ wait-timeout = "0.2"
105105
serial_test = "3.3.1"
106106

107107
# Benchmarking
108-
criterion = { version = "0.8.1", features = ["html_reports"] }
108+
criterion = { version = "0.8.2", features = ["html_reports"] }
109109

110110
# Raft consensus
111111
openraft = { version = "0.9.21", features = ["serde"] }

specs/007-user-auth/plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ Run: `.specify/scripts/bash/update-agent-context.sh copilot`
735735

736736
### CLI Credential Storage
737737

738-
**Decision**: Store encrypted credentials in config file at `~/.config/kalamdb/credentials.toml` (XDG Base Directory)
738+
**Decision**: Store encrypted credentials in config file at `~/.kalam/credentials.toml` (same directory as config.toml)
739739

740740
**Rationale**:
741741
- XDG standard for config files on Linux/macOS

specs/007-user-auth/quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,10 +675,10 @@ kalam> SELECT CURRENT_USER();
675675

676676
### Credential Storage
677677

678-
The CLI stores credentials in `~/.kalamdb/credentials.toml`:
678+
The CLI stores credentials in `~/.kalam/credentials.toml`:
679679

680680
```toml
681-
# ~/.kalamdb/credentials.toml
681+
# ~/.kalam/credentials.toml
682682

683683
[[connections]]
684684
name = "localhost"

specs/007-user-auth/research.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ async fn create_table(
403403

404404
### Decision
405405

406-
**Store credentials in `~/.config/kalamdb/credentials.toml` with file permissions 0600 (owner read/write only)**
406+
**Store credentials in `~/.kalam/credentials.toml` with file permissions 0600 (owner read/write only)**
407407

408408
### Rationale
409409

@@ -415,7 +415,7 @@ async fn create_table(
415415

416416
2. **File Structure**:
417417
```toml
418-
# ~/.config/kalamdb/credentials.toml
418+
# ~/.kalam/credentials.toml
419419

420420
[default]
421421
instance_name = "local"
@@ -693,7 +693,7 @@ pub async fn authenticate_request(req: &ServiceRequest) -> Result<AuthenticatedU
693693
| **Password Hashing** | Bcrypt cost 12, async via spawn_blocking | Industry standard, 250ms acceptable, prevents blocking |
694694
| **JWT Validation** | jsonwebtoken crate, JWKS caching, RS256/ES256 | Battle-tested library, reduces HTTP requests 99% |
695695
| **Middleware Architecture** | AuthService (library) → AuthMiddleware (HTTP) | Reusable auth logic, clean separation of concerns |
696-
| **CLI Credentials** | ~/.config/kalamdb/credentials.toml with 0600 perms | XDG standard, file perms for security, multi-instance |
696+
| **CLI Credentials** | ~/.kalam/credentials.toml with 0600 perms | Consistent with config.toml, file perms for security, multi-instance |
697697
| **Migration** | 3-phase gradual (dual auth → deprecation → removal) | Zero downtime, 6-month notice, user choice |
698698
| **Cost Factor** | 12 (not 13 or 14) | Balance security and UX (~250ms vs 500ms+) |
699699
| **Algorithm Support** | RS256, ES256, HS256 | Cover external OAuth and internal tokens |

specs/007-user-auth/tasks.md

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

445445
#### CLI-Specific Implementation (cli crate)
446446

447-
- [x] T119 [US6] Implement FileCredentialStore in cli/src/credentials.rs (store at ~/.config/kalamdb/credentials.toml with 0600 permissions, implements CredentialStore trait from link) - **COMPLETED**: Full implementation with TOML serialization, secure file permissions, instance management
447+
- [x] T119 [US6] Implement FileCredentialStore in cli/src/credentials.rs (store at ~/.kalam/credentials.toml with 0600 permissions, implements CredentialStore trait from link) - **COMPLETED**: Full implementation with TOML serialization, secure file permissions, instance management
448448
- [x] T120 [US6] Implement automatic authentication in CLI session in cli/src/session.rs (read credentials via FileCredentialStore, create BasicAuth provider, pass to KalamLinkClient) - **COMPLETED**: CLISession::with_auth() accepts AuthProvider, creates authenticated KalamLinkClient
449449
- [x] T121 [US6] Add CLI commands to view system user credentials in cli/src/commands/credentials.rs (show-credentials command, uses FileCredentialStore) - **COMPLETED**: \\show-credentials command displays instance, username, server URL (password hidden), security warnings about storage location and file permissions
450450
- [x] T122 [US6] Add CLI commands to update system user credentials in cli/src/commands/credentials.rs (update-credentials command, uses FileCredentialStore) - **COMPLETED**: \\update-credentials <username> <password> and \\delete-credentials commands implemented with colored output and security reminders

0 commit comments

Comments
 (0)