matthoffman / blast-shell Goto Github PK
View Code? Open in Web Editor NEWAdapting Karaf's console for non-OSGi use
License: Apache License 2.0
Adapting Karaf's console for non-OSGi use
License: Apache License 2.0
The default branding says :
Blast Shell version 0.13, using Apache Felix Karaf version ${karaf.version)
The ${karaf.version}
is not replaced properly.
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]
Several pointers :
org.apache.sshd.SshServer
contains not only passwordAuthenticator
but also publickeyAuthenticator
org.apache.karaf.shell.ssh.KarafPublickeyAuthenticator
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)
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]
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:
ERROR
. However, blast shell can still be used with whatever commands are successfully loaded.prototype
beans (we all use prototype
beans, since singleton beans have a nasty effect of retaining their previous command arguments on the next invocation).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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.