mirror of
https://github.com/valitydev/fraudbusters-compose.git
synced 2024-11-06 16:35:23 +00:00
commit
4a1f514ffd
@ -14,7 +14,9 @@ When analyzing the results, it enriches the data from the storage location servi
|
|||||||
|
|
||||||
### Run
|
### Run
|
||||||
|
|
||||||
```docker-compose up -d```
|
1. ```docker-compose up -d```
|
||||||
|
|
||||||
|
2. [Simple use case](docs/simple_use_case_1.md)
|
||||||
|
|
||||||
### Service live at:
|
### Service live at:
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ services:
|
|||||||
- 8991:8022
|
- 8991:8022
|
||||||
|
|
||||||
fraudbusters:
|
fraudbusters:
|
||||||
image: rbkmoney/fraudbusters:deea70133e6de41b6a46194b210ae7c3b313a1a8
|
image: rbkmoney/fraudbusters:9e5546d61d510adb69726c1f6cb3c7a6cc1574f5
|
||||||
hostname: fraudbusters
|
hostname: fraudbusters
|
||||||
container_name: fraudbusters
|
container_name: fraudbusters
|
||||||
environment:
|
environment:
|
||||||
@ -156,7 +156,6 @@ services:
|
|||||||
geo.ip.service.url: "http://columbus:8022/repo"
|
geo.ip.service.url: "http://columbus:8022/repo"
|
||||||
wb.list.service.url: "http://wblist:8022/v1/wb_list"
|
wb.list.service.url: "http://wblist:8022/v1/wb_list"
|
||||||
clickhouse.db.url: "jdbc:clickhouse://clickhouse:8123/default"
|
clickhouse.db.url: "jdbc:clickhouse://clickhouse:8123/default"
|
||||||
spring.profiles.active: "full-prod"
|
|
||||||
logging.config: "tmp/logback-test.xml"
|
logging.config: "tmp/logback-test.xml"
|
||||||
clickhouse.db.user: ''
|
clickhouse.db.user: ''
|
||||||
clickhouse.db.password: ''
|
clickhouse.db.password: ''
|
||||||
@ -185,7 +184,7 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
fb-management:
|
fb-management:
|
||||||
image: rbkmoney/fraudbusters-management:8022324b0f39d9da43db1911f5b7565617315a77
|
image: rbkmoney/fraudbusters-management:4f7a141ac8e1cd4b69841448dfa6be5416f5f7bb
|
||||||
hostname: fb-management
|
hostname: fb-management
|
||||||
container_name: fb-management
|
container_name: fb-management
|
||||||
environment:
|
environment:
|
||||||
@ -197,7 +196,7 @@ services:
|
|||||||
spring.datasource.url: "jdbc:postgresql://postgres-fb:5432/wblist"
|
spring.datasource.url: "jdbc:postgresql://postgres-fb:5432/wblist"
|
||||||
logging.config: "./tmp/logback-test.xml"
|
logging.config: "./tmp/logback-test.xml"
|
||||||
management.metrics.binders.jvm.enabled: 'false'
|
management.metrics.binders.jvm.enabled: 'false'
|
||||||
service.validate.payment.url: 'http://fraudbusters:8022/fraud_payment/v1/'
|
service.payment.url: 'http://fraudbusters:8022/fraud_payment/v1/'
|
||||||
depends_on:
|
depends_on:
|
||||||
- fraudbusters
|
- fraudbusters
|
||||||
- broker
|
- broker
|
||||||
|
50
docs/simple_use_case_1.md
Normal file
50
docs/simple_use_case_1.md
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
## Simple use case
|
||||||
|
|
||||||
|
![alt text](../images/fraudbusters_sequence_diagram.png)
|
||||||
|
|
||||||
|
1. Check all containers is running
|
||||||
|
2. Open swagger api http://localhost:8080/fb-management/v1/swagger-ui.html
|
||||||
|
3. Create new template:
|
||||||
|
|
||||||
|
Template:
|
||||||
|
```
|
||||||
|
rule:inWhiteList("email")->accept; // Check in white list by email, accept if exist
|
||||||
|
rule:count("card_token",1444)>=9->decline; // Check count
|
||||||
|
```
|
||||||
|
JSON template command:
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"id": "test",
|
||||||
|
"template": "rule:inWhiteList(\"email\")->accept;rule:count(\"card_token\",1444)>=9->decline;"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
http://localhost:8080/fb-management/v1/swagger-ui.html#/payment-template-command-resource/insertTemplateUsingPOST_1
|
||||||
|
|
||||||
|
![alt text](../images/template.jpg)
|
||||||
|
|
||||||
|
4. Create reference for party and shop:
|
||||||
|
|
||||||
|
JSON template command:
|
||||||
|
```
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id": "testRef",
|
||||||
|
"isDefault": false,
|
||||||
|
"isGlobal": false,
|
||||||
|
"partyId": "partyTest",
|
||||||
|
"shopId": "shopTest",
|
||||||
|
"templateId": "test"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
http://localhost:8080/fb-management/v1/swagger-ui.html#/payment-template-command-resource/insertReferenceUsingPOST_1
|
||||||
|
|
||||||
|
![alt text](../images/reference.jpg)
|
||||||
|
|
||||||
|
5. Use simple example test https://github.com/rbkmoney/fraudbusters-examples for emulate user
|
||||||
|
|
||||||
|
6. Open grafana admin/admin by url http://localhost:3000/d/EAj2Hjwix/antifraud-prod?orgId=1&from=now%2Fy&to=now%2Fy&var-partyId=.&var-shopId=.&var-resultStatus=.&var-email=.&var-maskedPan=.*&var-invoiceId=.&var-bankCountry=.&var-cardToken=4J8vmnlYPwzYzia74fny81&var-fingerprint=.
|
||||||
|
|
||||||
|
![alt text](../images/result-grafana.jpg)
|
BIN
images/fraudbusters_sequence_diagram.png
Normal file
BIN
images/fraudbusters_sequence_diagram.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
BIN
images/reference.jpg
Normal file
BIN
images/reference.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
BIN
images/result-grafana.jpg
Normal file
BIN
images/result-grafana.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 91 KiB |
BIN
images/template.jpg
Normal file
BIN
images/template.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
Loading…
Reference in New Issue
Block a user