Class CrshAutoConfiguration
- java.lang.Object
- org.springframework.boot.actuate.autoconfigure.CrshAutoConfiguration
@Configuration @ConditionalOnClass(org.crsh.plugin.PluginLifeCycle.class) @EnableConfigurationProperties(ShellProperties.class) @Deprecated public class CrshAutoConfiguration extends Object
Deprecated.as of 1.5 since CRaSH is not actively maintainedAuto-configurationfor embedding an extensible shell into a Spring Boot enabled application. By default a SSH daemon is started on port 2000. If the CRaSH Telnet plugin is available on the classpath, Telnet daemon will be launched on port 5000.The default shell authentication method uses a username and password combination. If no configuration is provided the default username is 'user' and the password will be printed to console during application startup. Those default values can be overridden by using
management.shell.auth.simple.usernameandmanagement.shell.auth.simple.password.If a Spring Security
AuthenticationManageris detected, this configuration will create aCRaSHPluginto forward shell authentication requests to Spring Security. This authentication method will get enabled ifmanagement.shell.auth.typeis set tospringor if no explicitmanagement.shell.authis provided and aAuthenticationManageris available. In the latter case shell access will be restricted to users having roles that match those configured inManagementServerProperties. Required roles can be overridden bymanagement.shell.auth.spring.roles.To add customizations to the shell simply define beans of type
CRaSHPluginin the application context. Those beans will get auto detected during startup and registered with the underlying shell infrastructure. To configure plugins and the CRaSH infrastructure add beans of typeShellProperties.CrshShellPropertiesto the application context.Additional shell commands can be implemented using the guide and documentation at crashub.org. By default Boot will search for commands using the following classpath scanning pattern
classpath*:/commands/**. To add different locations or override the default usemanagement.shell.command-path-patternsin your application configuration.- See Also:
ShellProperties
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCrshAutoConfiguration.AuthenticationManagerAdapterConfigurationDeprecated.static classCrshAutoConfiguration.CrshBootstrapBeanDeprecated.Spring Bean used to bootstrap the CRaSH shell.
Field Summary
Fields Modifier and Type Field Description static StringAUTH_PREFIXDeprecated.
Constructor Summary
Constructors Constructor Description CrshAutoConfiguration(ShellProperties properties)Deprecated.
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CrshAutoConfiguration.CrshBootstrapBeanshellBootstrap()Deprecated.
Field Detail
AUTH_PREFIX
public static final String AUTH_PREFIX
Deprecated.- See Also:
- Constant Field Values
Constructor Detail
CrshAutoConfiguration
public CrshAutoConfiguration(ShellProperties properties)
Deprecated.
Method Detail
shellBootstrap
@Bean @ConditionalOnMissingBean(org.crsh.plugin.PluginLifeCycle.class) public CrshAutoConfiguration.CrshBootstrapBean shellBootstrap()
Deprecated.