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-configuration
for 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.username
andmanagement.shell.auth.simple.password
.If a Spring Security
AuthenticationManager
is detected, this configuration will create aCRaSHPlugin
to forward shell authentication requests to Spring Security. This authentication method will get enabled ifmanagement.shell.auth.type
is set tospring
or if no explicitmanagement.shell.auth
is provided and aAuthenticationManager
is 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
CRaSHPlugin
in 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.CrshShellProperties
to 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-patterns
in your application configuration.- See Also:
ShellProperties
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CrshAutoConfiguration.AuthenticationManagerAdapterConfiguration
Deprecated.static class
CrshAutoConfiguration.CrshBootstrapBean
Deprecated.Spring Bean used to bootstrap the CRaSH shell.
Field Summary
Fields Modifier and Type Field Description static String
AUTH_PREFIX
Deprecated.
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.CrshBootstrapBean
shellBootstrap()
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.