Fix docs
@ -93,20 +93,20 @@ services:
|
||||
volumes:
|
||||
- ./clickhouse/data:/var/lib/clickhouse
|
||||
- ./clickhouse/docker-entrypoint-initdb.d/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:5.1.0
|
||||
hostname: grafana
|
||||
container_name: grafana
|
||||
ports:
|
||||
- 3000:3000
|
||||
environment:
|
||||
GF_INSTALL_PLUGINS: "grafana-piechart-panel,vertamedia-clickhouse-datasource"
|
||||
GF_SECURITY_ADMIN_USER: "admin"
|
||||
GF_SECURITY_ADMIN_PASSWORD: "admin"
|
||||
volumes:
|
||||
- ./grafana/dashboards:/etc/grafana/provisioning/dashboards
|
||||
- ./grafana/datasources:/etc/grafana/provisioning/datasources
|
||||
#
|
||||
# grafana:
|
||||
# image: grafana/grafana:5.1.0
|
||||
# hostname: grafana
|
||||
# container_name: grafana
|
||||
# ports:
|
||||
# - 3000:3000
|
||||
# environment:
|
||||
# GF_INSTALL_PLUGINS: "grafana-piechart-panel,vertamedia-clickhouse-datasource"
|
||||
# GF_SECURITY_ADMIN_USER: "admin"
|
||||
# GF_SECURITY_ADMIN_PASSWORD: "admin"
|
||||
# volumes:
|
||||
# - ./grafana/dashboards:/etc/grafana/provisioning/dashboards
|
||||
# - ./grafana/datasources:/etc/grafana/provisioning/datasources
|
||||
|
||||
postgres-columbus:
|
||||
image: rbkmoney/postgres-geodata:0eb52256576ec22f89fadc3e7fe505b692e838a3
|
||||
@ -199,11 +199,11 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
fb-management:
|
||||
image: dr2.rbkmoney.com/rbkmoney/fraudbusters-management:1613785de7c551de4ab89ad74c18e116c4957a2c
|
||||
image: rbkmoney/fraudbusters-management:1613785de7c551de4ab89ad74c18e116c4957a2c
|
||||
hostname: fb-management
|
||||
container_name: fb-management
|
||||
environment:
|
||||
kafka.bootstrap.servers: "broker:9092"
|
||||
kafka.bootstrap-servers: "broker:9092"
|
||||
kafka.wblist.topic.command: "wb-list-command"
|
||||
kafka.wblist.topic.event.sink: "wb-list-event-sink"
|
||||
kafka.fraudbusters.template: "template"
|
||||
@ -227,7 +227,7 @@ services:
|
||||
depends_on:
|
||||
- fraudbusters
|
||||
- broker
|
||||
- wblist
|
||||
# - wblist
|
||||
- postgres-fb
|
||||
- kafka-setup
|
||||
- fb-notificator
|
||||
@ -235,7 +235,7 @@ services:
|
||||
- ./log-java:/opt/fraudbusters-management/tmp
|
||||
|
||||
fb-notificator:
|
||||
image: dr2.rbkmoney.com/rbkmoney/fraudbusters-notificator:baf2332c3ca6d0860e30dacc10f7c9c60a726700
|
||||
image: rbkmoney/fraudbusters-notificator:baf2332c3ca6d0860e30dacc10f7c9c60a726700
|
||||
hostname: fb-notificator
|
||||
container_name: fb-notificator
|
||||
environment:
|
||||
@ -262,13 +262,13 @@ services:
|
||||
POSTGRES_DB: fb_notificator
|
||||
PGDATA: /data/postgres
|
||||
ports:
|
||||
- 6433:5432
|
||||
- 6435:5432
|
||||
volumes:
|
||||
- ./postgres/data/4:/data/postgres
|
||||
restart: unless-stopped
|
||||
|
||||
fb-warehouse:
|
||||
image: dr2.rbkmoney.com/rbkmoney/fraudbusters-warehouse:69ddadd89f84ec2afddc59f1c6074524367faf3e
|
||||
image: rbkmoney/fraudbusters-warehouse:69ddadd89f84ec2afddc59f1c6074524367faf3e
|
||||
hostname: fb-warehouse
|
||||
container_name: fb-warehouse
|
||||
environment:
|
||||
@ -286,7 +286,7 @@ services:
|
||||
- ./log-java:/opt/fraudbusters-warehouse/tmp
|
||||
|
||||
fraudbusters-ui:
|
||||
image: dr2.rbkmoney.com/rbkmoney/fraudbusters-ui:f0d4b45c0726f6b45f8ad42b77fb7f7750bd86b1
|
||||
image: rbkmoney/fraudbusters-ui:f0d4b45c0726f6b45f8ad42b77fb7f7750bd86b1
|
||||
hostname: fraudbusters-ui
|
||||
container_name: fraudbusters-ui
|
||||
ports:
|
||||
@ -299,7 +299,7 @@ services:
|
||||
- ./fraudbusters-ui/authConfig.json:/usr/share/nginx/html/assets/authConfig.json
|
||||
|
||||
keyclock:
|
||||
image: dr2.rbkmoney.com/rbkmoney/keycloak:325c3260863fa16cf652911fe97df8b3e16c45ff
|
||||
image: rbkmoney/keycloak:aae54b7dbcfdd28056634e66df27beab78aaf144
|
||||
hostname: keyclock
|
||||
container_name: keyclock
|
||||
ports:
|
||||
|
@ -3,48 +3,71 @@
|
||||
![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:
|
||||
2. Open keycloak http://localhost:8080
|
||||
3. Go to admin (admin/admin)
|
||||
|
||||
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;"
|
||||
}
|
||||
```
|
||||
|
||||
![alt text](../images/keycloak-admin.png)
|
||||
|
||||
4. Link to add realm button
|
||||
|
||||
http://localhost:8080/fb-management/v1/swagger-ui.html#/payment-template-command-resource/insertTemplateUsingPOST_1
|
||||
|
||||
![alt text](../images/template.jpg)
|
||||
|
||||
![alt text](../images/add-realm.png)
|
||||
|
||||
5. Load realm from package - keycloak/realm-export.json
|
||||
|
||||
4. Create reference for party and shop:
|
||||
|
||||
![alt text](../images/add-realm-2.png)
|
||||
|
||||
6. Add pattern for web origin
|
||||
|
||||
JSON template command:
|
||||
```
|
||||
[
|
||||
{
|
||||
"id": "testRef",
|
||||
"isDefault": false,
|
||||
"isGlobal": false,
|
||||
"partyId": "partyTest",
|
||||
"shopId": "shopTest",
|
||||
"templateId": "test"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
![alt text](../images/add-web-origin-pattern.png)
|
||||
|
||||
7. Go to users
|
||||
|
||||
http://localhost:8080/fb-management/v1/swagger-ui.html#/payment-template-command-resource/insertReferenceUsingPOST_1
|
||||
|
||||
![alt text](../images/go-user.png)
|
||||
|
||||
|
||||
![alt text](../images/reference.jpg)
|
||||
8. Click add user
|
||||
9. Add credentials
|
||||
|
||||
5. Use simple example test https://github.com/rbkmoney/fraudbusters-examples for emulate user
|
||||
![alt text](../images/set-cred.png)
|
||||
10. Add roles for 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/add-role.png)
|
||||
11. Add to /etc/hosts - 127.0.0.1 keyclock
|
||||
12. Go to user interface and login as your user
|
||||
|
||||
![alt text](../images/result-grafana.jpg)
|
||||
![alt text](../images/add-role.png)
|
||||
13. Templates -> Create template
|
||||
name -
|
||||
```test```
|
||||
template -
|
||||
```rule:amount_test:amount >=1 -> decline;```
|
||||
|
||||
|
||||
|
||||
![alt text](../images/created-template.png)
|
||||
|
||||
14. Reference -> Create reference
|
||||
Template id -
|
||||
```test```
|
||||
Party id -
|
||||
```partyTest```
|
||||
Shop id -
|
||||
```shopTest```
|
||||
|
||||
|
||||
|
||||
![alt text](../images/created-reference.png)
|
||||
|
||||
15. Use simple example test https://github.com/rbkmoney/fraudbusters-examples for emulate user
|
||||
|
||||
16. Historical data -> Inspect result
|
||||
|
||||
|
||||
|
||||
![alt text](../images/result-data.png)
|
||||
|
BIN
images/add-realm-2.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
images/add-realm.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
images/add-role.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
images/add-web-origin-pattern.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
images/created-reference.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
images/created-template.png
Normal file
After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 583 KiB |
BIN
images/find-app.png
Normal file
After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 80 KiB |
BIN
images/go-user.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
images/keycloak-admin.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
images/result-data.png
Normal file
After Width: | Height: | Size: 138 KiB |
BIN
images/set-cred.png
Normal file
After Width: | Height: | Size: 21 KiB |