Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for dkb and consorsbank #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

version: "3"

services:
funk-server: # the funk-server to collect all log information and write them to the elasticsearchdb
networks:
services:
funk-server: # the funk-server to collect all log information and write them to the elasticsearchdb
networks:
- elk
ports:
ports:
- 3000:3000
image: fasibio/funk_server:latest
environment:
environment:
ELASTICSEARCH_USERNAME: elastic
ELASTICSEARCH_PASSWORD: MagicWord
ELASTICSEARCH_URL: http://elasticsearch:9200
CONNECTION_KEY: changeMe7894561323 # Shared Key you have to set on each agent...
USE_ILM_POLICY: "false"
labels:
"funk.log": "false" #do not log this container! IMPORTANT no ending loop!!!
labels:
"funk.log": "false" #do not log this container! IMPORTANT no ending loop!!!

# funk-agent: # the funk agent to collect the logs
# networks:
# networks:
# - elk
# image: fasibio/funk_agent:latest
# volumes:
Expand All @@ -28,11 +28,11 @@ services:
# FUNK_SERVER: ws://funk-server:3000 # the adress to the funk-server it can be external too (is a websocket so ws instance of http and wss instance of https)
# CONNECTION_KEY: changeMe7894561323 # The Shared Key configured at your funk-server installation
# ENABLE_GEO_IP_INJECT: "true" # Allow this agent to inject geo ip information and the label key funk.log.geodatafromip is now enabled see at testhttpd service
# labels:
# labels:
# "funk.searchindex": "funk_agent" # The index at your elasticseach db to collect logs from this container

kibana: #Your Kibanasystem
networks:
networks:
- elk
ports:
- 5601:5601
Expand All @@ -41,30 +41,30 @@ services:
ELASTICSEARCH_USERNAME: elastic
ELASTICSEARCH_PASSWORD: MagicWord
ELASTICSEARCH_URL: http://elasticsearch:9200
labels:
labels:
"funk.log.staticcontent": "{\"usage\": \"loganalyze\"}" # Static information to log application cases for example staging
"funk.searchindex": "kibana" # The index at your elasticseach db to collect logs from this container

elasticsearch: #Your Elasticsearchdb
platform: linux/x86_64
image: elasticsearch:7.2.0
ports:
ports:
- 127.0.0.1:9200:9200
- 9300:9300
networks:
networks:
- elk
environment:
environment:
ELASTIC_USERNAME: elastic
ELASTIC_PASSWORD: MagicWord
xpack.security.enabled: "true"
xpack.ml.enabled: "true"
xpack.watcher.enabled: "true"
discovery.type: "single-node"
labels:
labels:
"funk.log": "false" #do not log this container
volumes:
- esdata01:/usr/share/elasticsearch/data
volumes:
esdata01:
esdata01:
driver: local

networks:
Expand Down
18 changes: 10 additions & 8 deletions src/main/java/de/fasibio/hbciapp/UmsatzAbrufPinTan.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@

/**
* Demo zum Abruf von Umsaetzen per PIN/TAN-Verfahren.
*
*
* Die folgende Demo zeigt mit dem minimal noetigen Code, wie eine
* Umsatz-Abfrage
* fuer ein Konto durchgefuehrt werden kann. Hierzu wird der Einfachheit halber
* das Verfahren PIN/TAN verwendet, da es von den meisten Banken unterstuetzt
* wird.
*
*
* Trage vor dem Ausfuehren des Programms die Zugangsdaten zu deinem Konto ein.
*/
public class UmsatzAbrufPinTan {
Expand Down Expand Up @@ -351,19 +351,20 @@ public void callback(HBCIPassport passport, int reason, String msg, int datatype
// chipTAN optisch, photoTAN,...)
// I.d.R. ist das eine dreistellige mit "9" beginnende Ziffer
case NEED_PT_SECMECH:

// Als Parameter werden die verfuegbaren TAN-Verfahren uebergeben.
// Der Aufbau des String ist wie folgt:
// <code1>:<name1>|<code2>:<name2>|...
// Bsp:
// 911:smsTAN|920:chipTAN optisch|955:photoTAN
// 911:smsTAN|920:chipTAN optisch|955:photoTAN|900:SecurePlus
// Consors SecurePlus von https://wissen.consorsbank.de/t5/SecurePlus/SecurePlus-mit-aqbanking-Umsatzabruf-nicht-m%C3%B6glich/td-p/88747?poll=1669380098586
// String options = retData.toString();

// Der Callback muss den Code des zu verwendenden TAN-Verfahrens
// zurueckliefern
// In "code" muss der 3-stellige Code des vom User gemaess obigen
// Optionen ausgewaehlte Verfahren eingetragen werden
String code = "";
System.out.println("[NEET_PT_SECMECH] TAN-Verfahren: " + retData);
String code = "9xx";
retData.replace(0, retData.length(), code);
break;

Expand Down Expand Up @@ -424,8 +425,9 @@ public void callback(HBCIPassport passport, int reason, String msg, int datatype
// auszugehen, dass nur eine moegliche Option existiert. In dem
// Fall ist keine Auswahl noetig und "retData" kann unveraendert
// bleiben
String alias = null;
retData.replace(0, retData.length(), alias);
System.out.println("[NEED_PT_TANMEDIA] TAN-Medien: " + retData);
// String alias = null;
// retData.replace(0, retData.length(), alias);

break;
//
Expand Down Expand Up @@ -457,7 +459,7 @@ public void status(HBCIPassport passport, int statusTag, Object[] o) {

/**
* Beendet das Programm mit der angegebenen Fehler-Meldung.
*
*
* @param msg die Meldung.
*/
private static void error(String msg) {
Expand Down