-
Notifications
You must be signed in to change notification settings - Fork 151
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
Showing
22 changed files
with
525 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
=== Crypto Server | ||
|
||
The `cryptoserver` module offers a REST (qrest based) API to encrypt and decrypt using the `cryptoservice`. | ||
|
||
It supports the following operations | ||
|
||
==== encrypt | ||
|
||
* Path: `/encrypt` | ||
* Body: | ||
|
||
[source,json] | ||
------------- | ||
{ | ||
"text" : "The quick brown fox jumps over the lazy dog 0123456789" | ||
} | ||
------------- | ||
|
||
|
||
Sample response: | ||
|
||
[source,json] | ||
------------- | ||
{ | ||
"kid": "d7e82270-7041-4434-8cf9-c4d0f26f620d", | ||
"cryptogram": "rp5uz7QMjRaEqPIbXzOZNI6bLuWYcdP0sH3I0FSKpRk2bBTUdldlZLShz6T42MIG5E4km36Xz/G8rH7mtZlVjE7OSizQzOC14h9/TNLLiRA=" | ||
} | ||
------------- | ||
|
||
|
||
==== decrypt | ||
|
||
* Path: `/decrypt` | ||
* Body: | ||
|
||
[source,json] | ||
------------- | ||
{ | ||
"kid": "d7e82270-7041-4434-8cf9-c4d0f26f620d", | ||
"cryptogram": "rp5uz7QMjRaEqPIbXzOZNI6bLuWYcdP0sH3I0FSKpRk2bBTUdldlZLShz6T42MIG5E4km36Xz/G8rH7mtZlVjE7OSizQzOC14h9/TNLLiRA=" | ||
} | ||
------------- | ||
|
||
[source,json] | ||
------------- | ||
{ | ||
"text" : "The quick brown fox jumps over the lazy dog 0123456789" | ||
} | ||
------------- | ||
|
||
[NOTE] | ||
====== | ||
The node running `cryptoserver` has to be `unlocked` (see <<cryptoservice>> module). | ||
====== | ||
|
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
description = 'jPOS-EE :: Crypto Server' | ||
|
||
dependencies { | ||
testCompile libraries.junit | ||
testCompile libraries.restAssured | ||
compile project(':modules:qrest') | ||
compile project(':modules:cryptoservice') | ||
compile project(':modules:db-mysql') | ||
compile project(':modules:logback') | ||
} | ||
|
||
apply from: "${rootProject.projectDir}/jpos-app.gradle" | ||
|
||
test { | ||
dependsOn('installApp') | ||
workingDir = "build/install/cryptoserver" | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
cd `dirname $0`/.. || exit 1 | ||
CLASSPATH=classes:$CLASSPATH | ||
CLASSPATH=`echo @jarname@ lib/*.jar | tr ' ' ':'`:$CLASSPATH | ||
exec java -cp $CLASSPATH bsh.Interpreter $* |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/sh | ||
|
||
cd `dirname $0`/.. || exit 1 | ||
rm -f deploy/shutdown.xml | ||
|
||
if [ -f jpos.pid ] && ps -p $(cat jpos.pid) > /dev/null 2>&1 | ||
then | ||
echo "Process $(cat jpos.pid) is running" | ||
else | ||
rm -f jpos.pid | ||
exec java -server \ | ||
-Xmx1G \ | ||
-Xloggc:log/gc.log \ | ||
-XX:+PrintGCDetails \ | ||
-XX:+PrintGCDateStamps \ | ||
-XX:+UseGCLogFileRotation \ | ||
-XX:NumberOfGCLogFiles=5 \ | ||
-XX:GCLogFileSize=2M \ | ||
-XX:NumberOfGCLogFiles=5 \ | ||
-Djava.net.preferIPv4Stack=true \ | ||
-Dcom.sun.management.jmxremote \ | ||
-XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses \ | ||
-XX:+UseConcMarkSweepGC \ | ||
-XX:+AggressiveOpts \ | ||
-XX:+ParallelRefProcEnabled \ | ||
-XX:+TieredCompilation \ | ||
-jar jposee-@jarname@ --pid-file='jpos.pid' "$@" | ||
fi | ||
|
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
cd `dirname $0` | ||
echo Starting Q2 | ||
nohup ./q2 > /dev/null 2>&1 & |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
echo Stopping Q2 | ||
echo '<shutdown/>' > `dirname $0`/../deploy/shutdown.xml |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# jPOS Project [http://jpos.org] | ||
# Copyright (C) 2000-2012 Alejandro P. Revilla | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
|
||
hibernate.connection.username=jpos | ||
hibernate.connection.password=password | ||
|
||
# hibernate.hbm2ddl.auto=validate | ||
# | ||
hibernate.connection.url=jdbc:mysql://localhost/jposee?autoReconnect=true | ||
hibernate.connection.driver_class=com.mysql.jdbc.Driver | ||
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect | ||
# |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
-----BEGIN PGP PRIVATE KEY BLOCK----- | ||
|
||
lQPGBFnLCHcBCADQ+LkQ0bYQwLVXPvwcr6H8ZMxfGYgI0Q8eT97djx6LFfwbLu2o | ||
30kEu6xlnJPFHWhhk/eyeIel/2+d/E61ZFSJEE2M9q96w3mWIK/Jq495lPCS2SH+ | ||
+b8UKwhkJ6+n/rB5gWRo+bkgS0FcPNYFIxKNP0yHWrjojLkTVpCtLnOx4+noUjfl | ||
TxnU5h8G1dKXELgPXIdDH81A4t0ciXtqbfB3pJ6UittVvGLMvNProicePMHyAR6f | ||
0VjZp+0Pa1uixMKXTgX2Uzs+qH+yJJiFxJ2ZrgaFMNrmn2r9/netVQKyy8lqeNqv | ||
A1McXcV1JpVpmoMPPM7Rm5radqw0qNXxjCgNABEBAAH+BwMCOWvckXYU09HT9ugX | ||
3FzZ+O/E957nxXrIwO3+Rad4SfnBlTwuMfGuCu0gtp4kRqO/bG+x1gPtER57OTiy | ||
7dsfl6zqYSXRP338qL1o4v8K2ecR9DcADBCYpNldQUrBg3BXFGxjlFrzw7y3F/j6 | ||
DAGR+MaVL+zxd96L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A1B86QjJOTGrvzWU2l+0UM | ||
80ll597nZ0fUHQ6QXITc1XX39jc4hRxhlOZC5PBR6RLkQ5OQs898rJjnBN4w5pQS | ||
v4FIf+aBnNUFcin599TZtikopLpqsU05YQLgFt6itIvok2UB0ZEXFfcAFU2zRqNQ | ||
Ga/8IRKsmusyYsc47rE+qbe48hYkkNOUCwi4ne8S+Nq5DNk0VfTuzOvvfDs7s+V1 | ||
97CSa0dGQ1ydSQnFpD5JoXYmV4DnR2UFOZDbu2T6cHYElKF9rnJRgEHr+K7QwZS4 | ||
bCzduuUfV23QHGvU6Q10udacAkx/FKjU6EZ5Yk2w/aMQMQw2EVvn8x2MYJ2htqya | ||
pgYQcIaCmrb0+olflcymFux/5go7RepdFV46xySe5hBUPnOxkgFzgyZqQPweFj9n | ||
9YfsxGLaqyKi/x06+/gLA17uxTBDwK0xnMAdVNCvcJFago0Xp90pkbZ+EYHpyiab | ||
bCYWIq1KW1Zz3w5nNBK0au+E1KSbQsiYycUHv5ufLNqVXrhDf/JElPL3hRV1FIkB | ||
NgQYAQgAIBYhBNBI/5fmvh94sVlrBKNw6GrTY6BpBQJZywh3AhsMAAoJEKNw6GrT | ||
Y6BpWMAH/2d1EaqsTJ0jfknBGAwgGO2m7nWVaLA9HI2dgU+v54SRWUdzBLgEksot | ||
NwSMaN4tt8vUfCwl+nRTqERJMKiPaqebYUsY+lw0en6O9XRLOTTZOlSgV72604dC | ||
INp8vTvweHamiLO6pWVKvJNPvg4Imd4V7dVP8ljN5KdYDTutaf5VBL/W/jXEr+Vn | ||
dqUsZn3b6hC/Bhz1CHoxSxHeac+hshs2rTd/MsQ2a7Nr/cHwKOzt0yG5OrvIIlH7 | ||
NrJ4DSWdh0wAd7g3lHNb8wfkSyYYfmVM6P01oS/MWrJBx7kwesLpG9SCwLsVcoQv | ||
0NBAG1MtMl42vS/VXuuoooevvRdJTYE= | ||
=7g5a | ||
-----END PGP PRIVATE KEY BLOCK----- |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
-----BEGIN PGP PUBLIC KEY BLOCK----- | ||
|
||
mQENBFnLCHcBCADQ+LkQ0bYQwLVXPvwcr6H8ZMxfGYgI0Q8eT97djx6LFfwbLu2o | ||
30kEu6xlnJPFHWhhk/eyeIel/2+d/E61ZFSJEE2M9q96w3mWIK/Jq495lPCS2SH+ | ||
+b8UKwhkJ6+n/rB5gWRo+bkgS0FcPNYFIxKNP0yHWrjojLkTVpCtLnOx4+noUjfl | ||
TxnU5h8G1dKXELgPXIdDH81A4t0ciXtqbfB3pJ6UittVvGLMvNProicePMHyAR6f | ||
0VjZp+0Pa1uixMKXTgX2Uzs+qH+yJJiFxJ2ZrgaFMNrmn2r9/netVQKyy8lqeNqv | ||
A1McXcV1JpVpmoMPPM7Rm5radqw0qNXxjCgNABEBAAG0GWpQT1MgRGVtbyA8ZGVt | ||
b0BqcG9zLm9yZz6JAU4EEwEIADgWIQTQSP+X5r4feLFZawSjcOhq02OgaQUCWcsI | ||
dwIbAwULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRCjcOhq02OgadxUCACgEDgN | ||
hnfe3zNgC+O52+7hu/uXLaAQQmWSiaqXnickMiPjL55ye5SvAQC6uTdfiL14LQi7 | ||
cAqNrgVVMI++5i8AyCohSLnQUKc4bTdYmTTuhUWUtXJIwU+CevJKO10tQWo+9g0R | ||
S4BN4rqBDEYF2QUDNwm4H3WaQv8/uJvIFbG1xsr0wUfPeG1L2j4ExP4H34CepsAP | ||
+L7ZTOMYYZmWcGB25OxT15BETaKkPr/eUTzCfHayO57KWMHJZYG2uxeoOB+qVypf | ||
F6FHDK+BzNX9UpMCrzRONfVKmD64LRZCBN4NdP88e7VY1PCOsdUTsZ9YG748DDGR | ||
9qaYOHEIhqn3hMG6uQENBFnLCHcBCADpYed6i4pCH2d5AA2bAkiYzkuXB5hywg2P | ||
7QSgEn6u1oQljcXYpgYGDaj0QFlfexr5oxSUt47mrIIhsBWAn6nPfHyfUrgnzAKP | ||
JK7QzWbUNQNsx0iYlug3RUHs2kEz5JXDzfy9fwBd53ckeT41J1/2fchFhpThfAu4 | ||
nup1cuzs9emHF/SYOhrmsT/Pt0lmeRVKNA6BXBU5ARo4DoUn1fob7i258Be7bomA | ||
wiNRoC9IlfXIzDbPEk/078zaLRINwiNUoST+dQO8bgVh7340WPRcVmvRwXmc2KKC | ||
Z2fI0Nz2w736kzww9V+dXLx3W7uWxYooaYQiNjkRvHtJNCUfkNH9ABEBAAGJATYE | ||
GAEIACAWIQTQSP+X5r4feLFZawSjcOhq02OgaQUCWcsIdwIbDAAKCRCjcOhq02Og | ||
aVjAB/9ndRGqrEydI35JwRgMIBjtpu51lWiwPRyNnYFPr+eEkVlHcwS4BJLKLTcE | ||
jGjeLbfL1HwsJfp0U6hESTCoj2qnm2FLGPpcNHp+jvV0Szk02TpUoFe9utOHQiDa | ||
fL078Hh2poizuqVlSryTT74OCJneFe3VT/JYzeSnWA07rWn+VQS/1v41xK/lZ3al | ||
LGZ92+oQvwYc9Qh6MUsR3mnPobIbNq03fzLENmuza/3B8Cjs7dMhuTq7yCJR+zay | ||
eA0lnYdMAHe4N5RzW/MH5EsmGH5lTOj9NaEvzFqyQce5MHrC6RvUgsC7FXKEL9DQ | ||
QBtTLTJeNr0v1V7rqKKHr70XSU2B | ||
=nioc | ||
-----END PGP PUBLIC KEY BLOCK----- |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<configuration scan="true" scanPeriod="30 seconds" debug="false"> | ||
<!-- 'Q2' Appender --> | ||
<appender name="Q2" class="org.jpos.logging.logback.LogbackAppender"/> | ||
|
||
<!-- By default all messages at level ERROR will go to the 'Q2' appender --> | ||
<root level="ERROR"> | ||
<appender-ref ref="Q2"/> | ||
</root> | ||
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"> | ||
<resetJUL>true</resetJUL> | ||
</contextListener> | ||
</configuration> |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<logger name="Q2" class="org.jpos.q2.qbean.LoggerAdaptor"> | ||
<property name="redirect" value="stdout, stderr" /> | ||
<log-listener class="org.jpos.util.SimpleLogListener" /> | ||
|
||
<log-listener class="org.jpos.util.RotateLogListener"> | ||
<property name="file" value="log/q2.log" /> | ||
<property name="window" value="86400" /> | ||
<property name="copies" value="1000" /> | ||
<property name="maxsize" value="100000000" /> | ||
</log-listener> | ||
</logger> | ||
|
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<logback name="logback-config" class="org.jpos.logging.logback.LogbackConfigurator"> | ||
<property name="config-resource" value="file:cfg/logback.xml"/> | ||
</logback> |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<crypto-service class='org.jpos.crypto.CryptoService' logger='Q2' enabled='true'> | ||
<property name="custodian" value='demo@jpos.org' /> | ||
<property name="pubkeyring" value='cfg/keyring.pub' /> | ||
<property name="privkeyring" value='cfg/keyring.priv' /> | ||
<property name="lazy" value="true" /> | ||
<property name="keylength" value="256" /> | ||
<property name="duration" value="86400000" /> | ||
<property name="unlock-password" value="demo" /> | ||
</crypto-service> |
63 changes: 63 additions & 0 deletions
63
modules/cryptoserver/src/dist/deploy/30_cryptoserver_txnmgr.xml
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<txnmgr class="org.jpos.transaction.TransactionManager" logger="Q2" realm='qrest-txnmgr'> | ||
<property name="queue" value="TXNMGR"/> | ||
<property name="sessions" value="2"/> | ||
<property name="max-sessions" value="128"/> | ||
<property name="debug" value="true"/> | ||
|
||
<participant class="org.jpos.qrest.participant.Router"> | ||
<route path="/encrypt" method="PUT" name="encrypt"/> | ||
<route path="/decrypt" method="PUT" name="decrypt"/> | ||
</participant> | ||
|
||
<group name="encrypt"> | ||
<participant class="org.jpos.qrest.ExtractJSONRequest" /> | ||
<participant class="org.jpos.qrest.ValidateParams"> | ||
<mandatory> | ||
<param name="JSON_REQUEST" type="json-schema"> | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Encrypt", | ||
"description": "Encrypt command", | ||
"type": "object", | ||
"properties": { | ||
"text": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties" : false, | ||
"required": [ "text" ] | ||
} | ||
</param> | ||
</mandatory> | ||
</participant> | ||
<participant class="org.jpos.cryptoserver.participant.Encrypt" logger="Q2" /> | ||
</group> | ||
<group name="decrypt"> | ||
<participant class="org.jpos.qrest.ExtractJSONRequest" /> | ||
<participant class="org.jpos.qrest.ValidateParams"> | ||
<mandatory> | ||
<param name="JSON_REQUEST" type="json-schema"> | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Decrypt", | ||
"description": "Decrypt command", | ||
"type": "object", | ||
"properties": { | ||
"kid": { | ||
"type": "string" | ||
}, | ||
"cryptogram": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties" : false, | ||
"required": [ "kid", "cryptogram" ] | ||
} | ||
</param> | ||
</mandatory> | ||
</participant> | ||
<participant class="org.jpos.cryptoserver.participant.Decrypt" logger="Q2" /> | ||
</group> | ||
<participant class="org.jpos.qrest.SendResponse" logger="Q2"/> | ||
</txnmgr> | ||
|
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<qrest class='org.jpos.qrest.RestServer' logger='Q2'> | ||
<property name='port' value='8081' /> | ||
<property name='queue' value='TXNMGR' /> | ||
</qrest> | ||
|
Oops, something went wrong.