Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamoDB #6

Merged
merged 7 commits into from
Dec 30, 2024
Merged

DynamoDB #6

merged 7 commits into from
Dec 30, 2024

Conversation

arkavo-com
Copy link
Contributor

@arkavo-com arkavo-com commented Dec 28, 2024

DynamoDB Integration for User Management

  • Added DynamoDBStore implementation to replace in-memory user management.
    • Handles user credentials and data.
    • Supports passkey storage and WebAuthn session management.
  • Enhanced DynamoDB error handling:
    • Detailed error logging and distinctions for missing tables and unknown issues.
    • Added retries and input validation to improve reliability.
  • Updated db.rs and authn.rs with improved logging for key operations such as user creation and query processing.

Credential Handling Improvements

  • Refactored credential handling to list-based parsing for better error resilience and efficiency.
  • Introduced comprehensive validation to detect duplicate credentials and prevent additions for nonexistent users.
  • Enhanced traceability and logging for credential registration and updates.

WebAuthn Updates

  • Adjusted WebAuthn RP ID and origin to "arkavo.net" to align with the updated domain.
  • Improved session state management and error reporting in WebAuthn flows.

Build and Deployment Updates

  • Updated Cargo.toml:
    • Lowered optimization level and disabled LTO for faster builds.
  • Introduced production-ready DynamoDB table configurations via environment variables.
  • Updated deployment and DynamoDB setup instructions in the README.
  • Added simplified curl examples for authentication testing.

README Enhancements

  • Fixed endpoint URLs and added proper command examples for manual testing setups.
  • Included instructions for deploying and configuring DynamoDB for production use.

Miscellaneous Improvements

  • Minor logging enhancements and code cleanup.
  • Improved error resilience and debugging across user management workflows.

This commit introduces a new `DynamoDBStore` implementation to handle user credentials and data, replacing the in-memory user management. Key changes include creating and fetching users from DynamoDB, storing passkeys, and revising session management for WebAuthn operations. Additionally, it updates dependencies, improves error handling, and adjusts the state structure to align with the new backend integration.
Log and return detailed errors for DynamoDB operations in `db.rs` to improve debugging and resilience. Adjust `Cargo.toml` to lower optimization level and disable LTO for faster builds. Add missing deployment and DynamoDB setup instructions in the README, and include debug prints in `authn.rs` for better troubleshooting.
Add `println!` statements to log key actions in the code, such as user creation, query operations, and parsing. Updated the README to fix endpoint URLs and include proper command examples for manual testing setups.
Changed the WebAuthn RP ID and origin to "arkavo.net" to align with the updated domain. Also added a simpler `curl` example in the README for easier authentication testing.
Enhanced error handling in user creation, query, and registration workflows with detailed distinctions for missing tables and unknown errors. Added retries for database operations, input validations, and detailed logging to improve debugging and resiliency. Updated WebAuthn flows for better session state management and error reporting.
Introduce improved logging, validation, and error handling during credential registration and updates in the database. Ensure duplicate credentials are detected and prevent additions for nonexistent users, enhancing reliability and traceability.
Improved DynamoDB credential parsing by switching to list-based handling for better error resilience and efficiency. Updated environment variables in README to reflect production-ready DynamoDB tables. Minor logging enhancements and error handling improvements added for better debugging.
@arkavo-com arkavo-com marked this pull request as ready for review December 30, 2024 03:20
@arkavo-com arkavo-com changed the title Add DynamoDB integration and refactor user management. DynamoDB Dec 30, 2024
@arkavo-com arkavo-com merged commit 1d0cbb7 into main Dec 30, 2024
5 checks passed
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