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

OP-1373 remove warns at api startup #512

Merged
merged 5 commits into from
Dec 8, 2024

Conversation

mwithi
Copy link
Member

@mwithi mwithi commented Dec 8, 2024

See OP-1373.

Notes:

  • we don't use Mustache Templates and they are enabled by default in Spring Boot
  • disabling spring.jpa.open-in-view is generally recommended for REST APIs to prevent performance issues and ensure explicit data fetching
  • We don't need at the moment to define an authenticationProvider because we have only one UserDetailsService implementation (org.isf.security.UserDetailsServiceImpl) and only one PasswordEncoder bean (BCryptPasswordEncoder), so Spring Security uses the default DaoAuthenticationProvider. In the future, if we add more UserDetailsService implementations for multiple authentication data sources (e.g. Database, LDAP, Third-Party) we must define each provider and instruct the AuthenticationManager in which one to use for each case.

NOTE: WARN - HHH90000025: MariaDBDialect ... not eliminable because it is needed to start the application even without DB connection for the openapi workflow and in general

We don't need at the moment to define an authenticationProvider because
we have only one UserDetailsService implementation
(org.isf.security.UserDetailsServiceImpl) and only one PasswordEncoder
bean (BCryptPasswordEncoder), so Spring Security uses the default
DaoAuthenticationProvider

In the future, if we add more UserDetailsService implementations for
multiple authentication data sources (e.g. Database, LDAP, Third-Party)
we must define each provider and instruct the AuthenticationManager in
which one to use for each case.
@mwithi mwithi requested a review from dbmalkovsky December 8, 2024 17:30
Copy link
Collaborator

@dbmalkovsky dbmalkovsky left a comment

Choose a reason for hiding this comment

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

LGTM

because it is needed to start the application even without DB connection
for the openapi workflow
@mwithi mwithi merged commit 4377475 into develop Dec 8, 2024
4 checks passed
@mwithi mwithi deleted the OP-1373-remove-warns-at-api-startup branch December 8, 2024 18:55
Copy link
Collaborator

@dbmalkovsky dbmalkovsky left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants