-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c821180
commit ef76fdd
Showing
7 changed files
with
53 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,18 @@ | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
package org.seedstack.shell.internal; | ||
|
||
import com.google.inject.Module; | ||
import io.nuun.kernel.api.plugin.InitState; | ||
import io.nuun.kernel.api.plugin.PluginException; | ||
import io.nuun.kernel.api.plugin.context.Context; | ||
import io.nuun.kernel.api.plugin.context.InitContext; | ||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import javax.inject.Inject; | ||
import org.apache.shiro.authc.AuthenticationException; | ||
import org.apache.shiro.authc.UsernamePasswordToken; | ||
import org.apache.shiro.mgt.SecurityManager; | ||
|
@@ -24,35 +29,22 @@ | |
import org.apache.sshd.server.UserAuth; | ||
import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider; | ||
import org.seedstack.seed.core.internal.AbstractSeedPlugin; | ||
import org.seedstack.seed.security.internal.SecurityGuiceConfigurer; | ||
import org.seedstack.seed.security.internal.SecurityProvider; | ||
import org.seedstack.shell.ShellConfig; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import javax.inject.Inject; | ||
import javax.inject.Named; | ||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* This plugin provides shell-style interaction over SSH with the SEED application. | ||
* | ||
* @author [email protected] | ||
*/ | ||
public class ShellPlugin extends AbstractSeedPlugin implements SecurityProvider { | ||
public class ShellPlugin extends AbstractSeedPlugin { | ||
private static final Logger LOGGER = LoggerFactory.getLogger(ShellPlugin.class); | ||
|
||
private ShellConfig shellConfig; | ||
private SshServer sshServer; | ||
|
||
@Inject | ||
private ShellFactory shellFactory; | ||
|
||
@Inject | ||
@Named("shell") | ||
private SecurityManager securityManager; | ||
|
||
@Override | ||
|
@@ -135,16 +127,6 @@ public Object nativeUnitModule() { | |
return new ShellModule(); | ||
} | ||
|
||
@Override | ||
public Module provideMainSecurityModule(SecurityGuiceConfigurer securityGuiceConfigurer) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Module provideAdditionalSecurityModule() { | ||
return new ShellSecurityModule(); | ||
} | ||
|
||
private final class ShiroAuthFactory implements NamedFactory<UserAuth> { | ||
@Override | ||
public String getName() { | ||
|
1 change: 0 additions & 1 deletion
1
src/main/resources/META-INF/services/org.seedstack.seed.security.internal.SecurityProvider
This file was deleted.
Oops, something went wrong.