Skip to content

基本APIの実装#7

Draft
turtton wants to merge 42 commits intomainfrom
feat/rest-basic
Draft

基本APIの実装#7
turtton wants to merge 42 commits intomainfrom
feat/rest-basic

Conversation

@turtton
Copy link
Member

@turtton turtton commented Jan 25, 2025

  • features
    • add event handler(save event and apply to entity)
    • implement defaults in XXId(Uuid)
  • methods
    • /account
    • /user
    • /metadata

@codecov
Copy link

codecov bot commented Jan 25, 2025

Codecov Report

❌ Patch coverage is 51.20451% with 952 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.24%. Comparing base (fcf9689) to head (6f27c9a).

Files with missing lines Patch % Lines
application/src/service/account.rs 0.00% 215 Missing ⚠️
server/src/route/account.rs 0.00% 169 Missing ⚠️
application/src/service/auth_account.rs 0.00% 95 Missing ⚠️
application/src/transfer/pagination.rs 0.00% 48 Missing ⚠️
server/src/handler.rs 0.00% 36 Missing ⚠️
server/src/main.rs 0.00% 32 Missing ⚠️
driver/src/crypto/password.rs 67.05% 28 Missing ⚠️
driver/src/crypto/encryption.rs 78.90% 27 Missing ⚠️
driver/src/crypto/rsa.rs 73.00% 27 Missing ⚠️
kernel/src/lib.rs 0.00% 27 Missing ⚠️
... and 22 more
Additional details and impacted files
@@             Coverage Diff             @@
##             main       #7       +/-   ##
===========================================
- Coverage   95.08%   77.24%   -17.84%     
===========================================
  Files          58       59        +1     
  Lines        3888     4879      +991     
===========================================
+ Hits         3697     3769       +72     
- Misses        191     1110      +919     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@turtton turtton marked this pull request as draft December 31, 2025 04:08
turtton and others added 8 commits December 31, 2025 19:59
- Add crypto module with RSA-2048 key generation using rsa crate
- Encrypt private keys with Argon2id key derivation + AES-256-GCM
- Read master password from /run/secrets or ./master-key-password
- Add security measures:
  - Zeroize sensitive data in memory
  - Validate password file permissions (Unix 0o600/0o400)
  - Use generic error messages to prevent timing attacks
- Add KernelError::NotFound for proper HTTP 404 responses

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add adapter crate with SigningKeyGenerator composed trait via blanket impl
- Move crypto implementations from application to driver layer
- Improve password memory management with Zeroizing<Vec<u8>>
- Standardize decrypt error messages to prevent information leakage
- Add comprehensive documentation for blanket implementations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Account作成をイベントソーシング経由(CommandEnvelope → event_streams → 非同期Applier)
から直接INSERT方式に変更し、auth_emumet_accountsリンクも同一フローで作成するように修正。

- AccountModifierトレイトにlink_auth_accountメソッド追加
- CreateAccountServiceをAccount::new() + 直接INSERT方式に書き換え
- Account::create()メソッド削除(update/deleteは既存のイベントソーシングを維持)
- EventVersion<T>にDefault実装追加
- 関連テストをAccountEvent::Created直接構築に更新
EditAccountServiceトレイトとupdate_account_by_idハンドラを追加し、
イベントソーシングによるアカウントのis_botフィールド更新を実装
非同期プロジェクション適用前に再取得すると古いデータを返す可能性があるため、
DELETEと同様に204 No Contentを返すように変更
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant