Skip to content
Open
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
4 changes: 2 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
spring.application.name=bankapp
# MySQL Database configuration
spring.datasource.url=jdbc:mysql://localhost:3306/bankappdb?useSSL=false&serverTimezone=UTC
spring.datasource.url=jdbc:mysql://localhost:3306/BankDB?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Security risk: allowPublicKeyRetrieval=true combined with useSSL=false.

Enabling allowPublicKeyRetrieval=true while useSSL=false exposes the MySQL authentication process to potential man-in-the-middle attacks. The RSA public key and credentials can be intercepted over an unencrypted connection.

Consider either:

  • Setting useSSL=true and configuring proper SSL certificates, or
  • Using a different authentication plugin that doesn't require public key retrieval
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/resources/application.properties` at line 3, The JDBC URL in
spring.datasource.url currently sets allowPublicKeyRetrieval=true while
useSSL=false which exposes credentials; update the spring.datasource.url value
to remove or set allowPublicKeyRetrieval=false and/or set useSSL=true and
configure proper SSL certificates (or switch the MySQL user to an auth plugin
that doesn't need public key retrieval) so the connection is encrypted and
public key retrieval is not allowed over plaintext.

spring.datasource.username=root
spring.datasource.password=Test@123
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

# JPA & Hibernate configuration
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
spring.jpa.show-sql=true