From 01ce257683d98c372f201ca00955591281a0e384 Mon Sep 17 00:00:00 2001 From: Anatoly Karlov Date: Tue, 30 Mar 2021 15:28:59 +0700 Subject: [PATCH] actualize compose, add pseudo schedulator for init preparation flow (#15) use latest tag for images actualize README --- .gitignore | 3 --- README.md | 9 +++++---- docker-compose.yml | 33 +++++++++++++++++++-------------- three-ds-server/cert/test.p12 | Bin 0 -> 7733 bytes 4 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 three-ds-server/cert/test.p12 diff --git a/.gitignore b/.gitignore index b12b654..fb08ff7 100644 --- a/.gitignore +++ b/.gitignore @@ -76,6 +76,3 @@ fabric.properties # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* env.list - -three-ds-server/cert/ - diff --git a/README.md b/README.md index 87f34cc..363390b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # three-ds-server-compose -Проект с файлом `docker-compose.yml` для использования `RBK.money 3D Secure Server` (сервис `rbkmoney/three-ds-server`) в `Docker` +Описание файла `docker-compose.yml` для использования [RBK.money 3D Secure Server](https://github.com/rbkmoney/three-ds-server) в [Docker](https://hub.docker.com/r/rbkmoney/three-ds-server) 1. [`3DSS`](#3dss) 2. [Предварительное конфигурирование окружения перед использованием `docker-compose.yml`](#предварительное-конфигурирование-окружения-перед-использованием-docker-composeyml) @@ -21,7 +21,7 @@ Directory Server=DS ![alt text](./readme-resources/flow.jpg "3D Secure Processing Flow - Browser-based") -### Ручки для запросов +### Endpoints #### 3DS Versioning @@ -110,7 +110,8 @@ Directory Server=DS Отдельно примеры запросов находятся по пути `/three-ds-server-compose/samples/` -Актуальная модель запроса находятся по пути https://github.com/rbkmoney/three-ds-server-domain-lib/blob/master/src/main/java/com/rbkmoney/threeds/server/domain/root/rbkmoney/RBKMoneyAuthenticationRequest.java +Актуальная модель запроса описывается файлом [RBKMoneyAuthenticationRequest.java](https://raw.githubusercontent.com/rbkmoney/three-ds-server-domain-lib/master/src/main/java/com/rbkmoney/threeds/server/domain/root/rbkmoney/RBKMoneyAuthenticationRequest.java) + Запрос: @@ -119,7 +120,7 @@ Directory Server=DS "messageType": "RBKMONEY_AUTHENTICATION_REQUEST", "messageVersion": "2.1.0", "threeDSCompInd": "Y", -. +... } ``` diff --git a/docker-compose.yml b/docker-compose.yml index 4516706..b7802e1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,14 +15,16 @@ services: POSTGRES_PASSWORD: postgres POSTGRES_DB: three_ds_server_storage three-ds-server-storage: - image: index.docker.io/rbkmoney/three-ds-server-storage:41e14d6d4ee1f675fa63263f22c3cf261d656a23 + image: rbkmoney/three-ds-server-storage depends_on: postgresql: condition: service_healthy container_name: three-ds-server-storage hostname: three-ds-server-storage + ports: + - "8022:8022" healthcheck: - test: ["CMD-SHELL", "curl -f http://three-ds-server-storage:8022/actuator/health || exit 1"] + test: ["CMD-SHELL", "curl -f http://three-ds-server-storage:8023/actuator/health || exit 1"] interval: 20s timeout: 5s retries: 5 @@ -37,8 +39,9 @@ services: spring.flyway.schemas: three_ds_server_storage client.three-ds-server.url: http://three-ds-server:8080/sdk client.three-ds-server.read-timeout: 5000 + rest-endpoint.enabled: "true" three-ds-server: - image: rbkmoney/three-ds-server:3014c12050a20e3f32aaec80b956594da9080785 + image: rbkmoney/three-ds-server depends_on: three-ds-server-storage: condition: service_healthy @@ -47,7 +50,7 @@ services: ports: - "8080:8080" healthcheck: - test: ["CMD-SHELL", "curl -f http://three-ds-server:8080/actuator/health || exit 1"] + test: ["CMD-SHELL", "curl -f http://three-ds-server:8023/actuator/health || exit 1"] interval: 20s timeout: 5s retries: 5 @@ -55,24 +58,19 @@ services: - ./three-ds-server/cert:/opt/three-ds-server/cert/:ro environment: SERVICE_NAME: three-ds-server - client.ds.ssl.visa.trust-store: file:/opt/three-ds-server/cert/visa.p12 + client.ds.ssl.visa.trust-store: file:/opt/three-ds-server/cert/test.p12 client.ds.ssl.visa.trust-store-password: 76UetirwSjugZh6t - client.ds.ssl.mastercard.trust-store: file:/opt/three-ds-server/cert/mastercard.p12 + client.ds.ssl.mastercard.trust-store: file:/opt/three-ds-server/cert/test.p12 client.ds.ssl.mastercard.trust-store-password: 76UetirwSjugZh6t + client.ds.ssl.mir.trust-store: file:/opt/three-ds-server/cert/test.p12 + client.ds.ssl.mir.trust-store-password: 76UetirwSjugZh6t client.three-ds-server-storage.card-ranges.url: http://three-ds-server-storage:8022/three-ds-server-storage/card-ranges client.three-ds-server-storage.card-ranges.timeout: 5000 client.three-ds-server-storage.challenge-flow-transaction-info.url: http://three-ds-server-storage:8022/three-ds-server-storage/challenge-flow-transaction-info client.three-ds-server-storage.challenge-flow-transaction-info.timeout: 5000 storage.challenge-flow-transaction-info.size: 1000 platform.mode: RBK_MONEY_PLATFORM - rbkmoney-preparation-flow.scheduler.enabled: "true" - rbkmoney-preparation-flow.scheduler.schedule.executor-url: http://three-ds-server-storage:8022/three-ds-server-storage/preparation-flow - rbkmoney-preparation-flow.scheduler.schedule.cron: "0 0 * * * ?" - rbkmoney-preparation-flow.scheduler.schedule.timeout: 5000 - rbkmoney-preparation-flow.scheduler.ds-provider.mastercard.enabled: "true" - rbkmoney-preparation-flow.scheduler.ds-provider.mastercard.message-version: 2.1.0 - rbkmoney-preparation-flow.scheduler.ds-provider.visa.enabled: "true" - rbkmoney-preparation-flow.scheduler.ds-provider.visa.message-version: 2.1.0 + rbkmoney-preparation-flow.scheduler.enabled: "false" environment.message.message-version: 2.2.0 environment.message.valid-message-versions[0]: 2.1.0 environment.message.valid-message-versions[1]: 2.2.0 @@ -90,3 +88,10 @@ services: environment.mastercard.three-ds-server-ref-number: mastercard environment.mastercard.three-ds-server-operator-id: mastercard environment.mastercard.three-ds-server-read-timeout: 10000 + environment.mir.ds-url: http://host.docker.internal:8081/nspk/DS2/authenticate + environment.mir.three-ds-requestor-url: https://rbk.money/ + environment.mir.three-ds-requestor-prefix: nspk + environment.mir.three-ds-server-url: https://nspk.3ds.rbk.money/ds + environment.mir.three-ds-server-ref-number: nspk + environment.mir.three-ds-server-operator-id: nspk + environment.mir.three-ds-server-read-timeout: 10000 diff --git a/three-ds-server/cert/test.p12 b/three-ds-server/cert/test.p12 new file mode 100644 index 0000000000000000000000000000000000000000..6026781bb69cb2230fd75aeca5857fc04e8406fe GIT binary patch literal 7733 zcmY+IRZtv&(xq{C4ess`+}&kx4L(>1J|qwr7~I|683+!+U4pv=mk`|D`E#rO-MjnH zFXvSEQ+M^Lj~hbC0|yJw4WYP4LS+qA3cbgKMTX6XP#hpYD0ctJTig%=;{RGm`49q> ze-Z*5EDSdU|MkBPEH^n4+W$_#fJNfQLO`)i!(#2nqWB93hXNA-!Jj5Ck+M*U2XsOJ zst`H=1s}~^*a;o3YMY$+rOV~_CRJ91F*or>fD#dOV`0j8;2|!FfY?jCsQ2uP1*Q~1 zx+QyE_PF>wqE=eHPDq5J$3g34l$^VYQa0N98^=KuIqh#FP5N8-R(oU#!D=HdOTp@5 z+fBG^Xy$D16&&&KLDX|;WLTQ0^AY-1ln`nTAAO4! z+-+ot3|};t+uCq8$kxbA zk@o|&e=2d3?Mb;MnU1bUK^bO6Zt?*SRl$_RZ{!iA^vBM9+3X^bD$wWEr_dmAwQqvO zl1w@uThCqYLu=TL9J&+zm>(A2_`t`ElGDGR$nLYV5N&=$F+-*Xz$Xk0JYg3w^?$6cZF8@_Lzkkc&JEQhwF@?f{Z;u-O^p zJ|qI3BjELEO7;%(5>5|a<=YC14+~&l)8|DN{z|+9?pua0@|kf-pVIK?cATn!Nb6{L z4(oDn4qeRDqaagVKI6V3`oj`U6LrC??+c2&F~w17-4Wi8P8#Q@_C~ZxXd^)v zICTA&B=Lx7Mq9h8MbLGM#?H40tg7v2>`<)B^HQ1?R&cgXrq~O^7pZVbX*Hy_>#z%* z$y}0d6TJil>Z!xFMSBx{P>_Q;R`mM^!x_#*e23PQ7mX!;Lay;G^&3IiXXce74EvIC z23Fo1=x4q8sswj40M~(9HmnEVr7Um;n&&1*h8rzzp7-!oK#+mEjr~P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