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

gRPC CreateEntity Allows Invalid device_id or publish Public Key #99

Open
PromiseFru opened this issue Jun 7, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@PromiseFru
Copy link
Member

The CreateEntity method in the gRPC service currently allows the creation of entities with invalid device_id or publish public key.

Expected Behavior:
The CreateEntity method should validate the device_id and publish public key before creating the entity. If the device_id or publish public key is invalid, the method should return an appropriate error message and prevent the creation of the entity.

@PromiseFru PromiseFru added the bug Something isn't working label Jun 7, 2024
PromiseFru added a commit that referenced this issue Jun 8, 2024
- Added validation for X25519 public keys in gRPC entity service requests.
- Implemented a function `is_valid_x25519_public_key` to check the validity of X25519 public keys encoded in base64.
- Updated `validate_request_fields` function to include validation for X25519 public keys.
- Added tests for entity creation and authentication with invalid X25519 public keys.

Fixes: #99
@PromiseFru PromiseFru self-assigned this Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant