Coder Social home page Coder Social logo

blast-shell's People

Contributors

matthoffman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

blast-shell's Issues

logback.xml should be excluded from blast-shell-core.jar build

This causes warnings when deployed.

12:33:44,383 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
12:33:44,383 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:.../webapps/tuneeca_prd_commerce/WEB-INF/lib/blast-shell-core-0.13.jar!/logback.xml]
12:33:44,383 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:.../webapps/tuneeca_prd_commerce/WEB-INF/classes/logback.xml]

Support Public Key authentication

Several pointers :

  • org.apache.sshd.SshServer contains not only passwordAuthenticator but also publickeyAuthenticator
  • implementation is org.apache.karaf.shell.ssh.KarafPublickeyAuthenticator
  • configure it in blast-shell/karaf/ssh/main/resources/META-INF/shell/ssh-command-context.xml :
    <bean id="sshServer" class="org.apache.sshd.SshServer" factory-method="setUpDefaultServer" scope="prototype">
        <property name="port" value="${sshPort}"/>
        <property name="shellFactory">
            <bean class="blast.shell.karaf.ssh.BlastShellFactoryImpl">
                <property name="consoleFactory" ref="consoleFactory"/>
            </bean>
        </property>
        <property name="commandFactory">
            <bean class="org.apache.karaf.shell.ssh.ShellCommandFactory">
                <property name="commandProcessor" ref="commandProcessor"/>
            </bean>
        </property>
        <property name="keyPairProvider" ref="keyPairProvider"/>
        <property name="passwordAuthenticator" ref="passwordAuthenticator"/>
        <property name="publickeyAuthenticator" ref="PUT IT HERE"/>
    </bean>
  • KarafPublickeyAuthenticator uses setAuthorizedKeys to set the filesystem filename that contains it.
  • void org.apache.karaf.shell.ssh.KarafPublickeyAuthenticator.AuthorizedKeysProvider.run() parses the file and calls void org.apache.karaf.shell.ssh.KarafPublickeyAuthenticator.AuthorizedKeysProvider.setKeys(Map<PublicKey, AuthorizedKey> keys)
  • The format of the file is : (note: this is not the keys.properties format Karaf 2.3.1 uses by default)
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEtlBOtaFm0m3aDs8j1aBtxuOaGVjStOgipdQ3PWDWXMERqfsFFz7biRZEmAEVi5DM0Fr/PhGwwkH98pWm6C0hjqNgl1t1iOpu/csWZhRxVRwkIKsdMGh0ak+cGBMk3HuiM3vZzFbTa6qlI5GCxfqRcnfY/HN7yREWiqKUG4hCxraceTZHLMqOGG7W+fG7jIBjKlXQGjpY9KRAjsoui1q5PGV8F7BcQv0bGCFBGtPAL2Fqy2NEFH/BcaDJpI/gJqzP1gZyVghvyN7Y0AnDwxqN6ZSuo/Yji0bAYGBRc4aJnl4dkP92kouJewhWv23H28qvH+nng3/AX1kp82robUT1 [email protected]

Scan command beans without eagerly instantiating them

Most of our command beans depend via @Inject on constructor.

When Blast Shell scans the command beans, all of these beans will be instantiated. Any beans that cannot be created will interrupt Blast Shell scanning and as a result, blast shell itself cannot be used.

I propose:

  1. Catch exceptions during command beans scanning, and log them as ERROR. However, blast shell can still be used with whatever commands are successfully loaded.
  2. Find a way to scan beans without instantiating them. This is relevant for scoped or prototype beans (we all use prototype beans, since singleton beans have a nasty effect of retaining their previous command arguments on the next invocation).

Blast-specific thread naming

Currently Blast shell uses Thread-# which is not specific.

I suggest using Blast-## which would be more specific and still concise in the log files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.