Orlok
Orlok

Reputation: 107

Spring Boot Shell Security

Trying to change the default security for using the CRaSH Shell, but getting an exception The Reference manual says the following

You can use the shell.auth.simple.username and shell.auth.simple.password properties to configure custom connection credentials.

But I get the below exception after I put those two properties in the application.properties file. I have something like :

shell.auth.simple.username=foo-user
shell.auth.simple.password=foo-pwd

This gives the following exception:

org.springframework.beans.NotWritablePropertyException: Invalid property 'username' of bean class [org.springframework.boot.actuate.autoconfigure.ShellProperties$SimpleAuthenticationProperties]: Bean property 'username' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

Upvotes: 1

Views: 1033

Answers (1)

M. Deinum
M. Deinum

Reputation: 125138

According to the list of properties use

shell.auth.simple.user.name=
shell.auth.simple.user.password=

This also matches the path as used in the code. I suspect the docs haven't been updated properly.

Upvotes: 2

Related Questions