Jump to content

I am currently building a project using Spring boot and implementing spring security in it. I know that we can configure spring security to read the usernam and password from a database but is it possible to read those data if those are stored in a file locally on my machine.

Instead of using a database like mysql or postgres can spring security read the username and passwords provided in a text file that's stored in the project directory and yes before writing thise values to the text file i will use bcrypt to encrypt those instead of storing them in plain text.

 

Link to comment
https://linustechtips.com/topic/1591509-help-with-configuring-spring-security/
Share on other sites

Link to post
Share on other sites

4 hours ago, Souranil21 chakraborty said:

I know that we can configure spring security to read the usernam and password from a database but is it possible to read those data if those are stored in a file locally on my machine.

Implement springs in-memory authentication method?

https://docs.spring.io/spring-security/reference/servlet/authentication/passwords/in-memory.html

 

Link to post
Share on other sites

On 12/6/2024 at 6:09 PM, C2dan88 said:

Yeah but it wouldn't work if i reboot the application then the user have to set their password again

Link to post
Share on other sites

  • 4 weeks later...
On 12/14/2024 at 2:24 AM, Souranil21 chakraborty said:

Yeah but it wouldn't work if i reboot the application then the user have to set their password again

hum yes, that is the goal of security. You are trying to remove the security here. Why no just running without any instead. I know it used to exist a credential less about a decade ago

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×