Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/java/com/wallet/secure/audit/entity/AuditLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import com.wallet.secure.common.enums.LogSeverity;
import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.type.SqlTypes;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

Expand Down Expand Up @@ -96,6 +98,7 @@ public class AuditLog {
* OWASP A09: details MUST NOT contain passwords, tokens, or raw PII.
* Safe to store: email (for identification), UUIDs, amounts, outcomes.
*/
@JdbcTypeCode(SqlTypes.JSON)
@Column(name = "details", columnDefinition = "jsonb")
private String details;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import com.wallet.secure.wallet.entity.Wallet;
import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.type.SqlTypes;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

Expand Down Expand Up @@ -154,6 +156,7 @@ public class Transaction {
* OWASP A09: stores request context for fraud detection and audit.
* Example: {"ip": "192.168.1.1", "device": "Mozilla/5.0..."}
*/
@JdbcTypeCode(SqlTypes.JSON)
@Column(name = "metadata", columnDefinition = "jsonb")
private String metadata;

Expand Down
Loading