Security: Implement UUID v7 for Resource Identification #78#92
Security: Implement UUID v7 for Resource Identification #78#92omatheusmesmo merged 11 commits intoomatheusmesmo:developfrom
Conversation
|
🤖 Hi @rifernun, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
🤖 Hi @rifernun, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
🤖 I'm sorry @rifernun, but I was unable to process your request. Please see the logs for more details. |
omatheusmesmo
left a comment
There was a problem hiding this comment.
Great job, well done @rifernun! Since this project isn't in production, we don't need to create a new Flyway script to change the ID type—we can just edit the original scripts. Could you please adjust this?
|
🤖 Hi @rifernun, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
🤖 I'm sorry @rifernun, but I was unable to process your request. Please see the logs for more details. |
|
🤖 Hi @rifernun, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
🤖 I'm sorry @rifernun, but I was unable to process your request. Please see the logs for more details. |
|
🤖 Hi @rifernun, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
🤖 Hi @rifernun, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
🤖 I'm sorry @rifernun, but I was unable to process your request. Please see the logs for more details. |
omatheusmesmo
left a comment
There was a problem hiding this comment.
Hello @rifernun ,
Great job on this PR! Implementing Snowflake IDs is a solid move for security and scalability. Here are a few tweaks needed to get this merged and running smoothly:
Required Changes (Action Needed)
-
PostgreSQL 18 Compatibility:
- Both
docker-compose.yml(root and backend folder) need to be updated. PostgreSQL 18 changed its internal directory structure. Please update the volume mapping from/var/lib/postgresql/datato/var/lib/postgresql. Without this, the database fails to start on several environments. - Ref: Postgres 18 Docker Changes
- Both
-
Code Formatting:
- The build is currently failing style validation. Please run
mvn net.revelc.code.formatter:formatter-maven-plugin:2.29.0:formatin the backend folder to alignSnowflakeIdGenerator.javawith the project standards.
- The build is currently failing style validation. Please run
-
DTO Field Mapping Consistency:
RegisterUserDTOcurrently uses@JsonProperty("full_name"), but other parts of the system (like README and frontend) might expectfullName. Please double-check this to ensure registration doesn't fail due to null constraints (I encountered a 500 error during manual testing).
-
Issue Tracking:
- Please add "fix #78" to your PR body. This ensures the original issue closes automatically upon merge.
Verification Summary
I’ve manually verified the core logic and it works as intended:
- Generated ID Example:
288774909243428864(Confirmed 64-bit Snowflake). - Database Schema: All 7 Flyway migrations (V1-V7) are applying correctly on a Postgres 18 instance with the volume fix applied.
Congratulations on the high-quality contribution! Once these points are addressed, we are good to go.
|
🤖 Hi @rifernun, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
🤖 Hi @rifernun, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
🤖 I'm sorry @rifernun, but I was unable to process your request. Please see the logs for more details. |
|
🤖 Hi @rifernun, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
🤖 I'm sorry @rifernun, but I was unable to process your request. Please see the logs for more details. |
omatheusmesmo
left a comment
There was a problem hiding this comment.
Great job! All requested changes have been addressed. The PostgreSQL 18 configuration is correct, Flyway migrations are updated to BIGINT, and code formatting is aligned with project standards. Ready to merge.
omatheusmesmo
left a comment
There was a problem hiding this comment.
@rifernun , great job, well done! 🎉 ☕
fix #78
Description
Currently, the system uses sequential identifiers (SERIAL / AUTO_INCREMENT) for database records. While functional, sequential IDs are predictable and can expose data volume metrics. Although the initial proposal suggested UUID v7, we implemented Snowflake IDs (64-bit) to provide non-predictability while maintaining superior storage efficiency and native BIGINT compatibility compared to 128-bit UUIDs.
Resolution (What was done)
How to Test
Acceptance Criteria