exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

test_exchange_api.conf (11801B)


      1 # This file is in the public domain.
      2 #
      3 
      4 [PATHS]
      5 TALER_TEST_HOME = test_exchange_api_home
      6 TALER_HOME = ${TALER_TEST_HOME:-${HOME:-${USERPROFILE}}}
      7 TALER_EXCHANGE_DATA_HOME = ${XDG_DATA_HOME:-${TALER_HOME}/.local/share}/taler-exchange/
      8 TALER_AUDITOR_DATA_HOME = ${XDG_DATA_HOME:-${TALER_HOME}/.local/share}/taler-auditor/
      9 TALER_EXCHANGE_CONFIG_HOME = ${XDG_CONFIG_HOME:-${TALER_HOME}/.config}/taler-exchange/
     10 TALER_AUDITOR_CONFIG_HOME = ${XDG_CONFIG_HOME:-${TALER_HOME}/.config}/taler-auditor/
     11 TALER_EXCHANGE_CACHE_HOME = ${XDG_CACHE_HOME:-${TALER_HOME}/.cache}/taler-exchange/
     12 TALER_AUDITOR_CACHE_HOME = ${XDG_CACHE_HOME:-${TALER_HOME}/.cache}/taler-auditor/
     13 TALER_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/taler-runtime/
     14 
     15 [libeufin-bank]
     16 CURRENCY = EUR
     17 DEFAULT_CUSTOMER_DEBT_LIMIT = EUR:200
     18 DEFAULT_ADMIN_DEBT_LIMIT = EUR:2000
     19 REGISTRATION_BONUS_ENABLED = yes
     20 REGISTRATION_BONUS = EUR:100
     21 SUGGESTED_WITHDRAWAL_EXCHANGE = http://localhost:8081/
     22 WIRE_TYPE = x-taler-bank
     23 X_TALER_BANK_PAYTO_HOSTNAME = localhost
     24 ALLOW_REGISTRATION = YES
     25 IBAN_PAYTO_BIC = SANDBOXX
     26 SERVE = tcp
     27 PORT = 8082
     28 PWD_HASH_CONFIG = { "cost": 4 }
     29 PWD_AUTH_COMPAT = yes
     30 BASE_URL = http://localhost:8082/
     31 
     32 [libeufin-bankdb-postgres]
     33 CONFIG = postgresql:///talercheck
     34 
     35 [auditor]
     36 BASE_URL = "http://localhost:8083/"
     37 PORT = 8083
     38 PUBLIC_KEY = D9ZMEJCFV92GRQ29ES2MM31HEKHQXCFAACG3Q70G42X9FMWM7S50
     39 TINY_AMOUNT = EUR:0.01
     40 TALER_AUDITOR_SALT = "salt"
     41 DB = postgres
     42 
     43 # Where do we store the auditor's private key?
     44 AUDITOR_PRIV_FILE = ${TALER_AUDITOR_DATA_HOME}offline-keys/auditor.priv
     45 
     46 [auditordb-postgres]
     47 CONFIG = "postgres:///talercheck"
     48 SQL_DIR = ${DATADIR}sql/
     49 
     50 [bank]
     51 HTTP_PORT = 8082
     52 
     53 [exchange]
     54 CURRENCY = EUR
     55 CURRENCY_ROUND_UNIT = EUR:0.01
     56 TINY_AMOUNT = EUR:0.01
     57 TERMS_ETAG = exchange-tos-tops-v0
     58 PRIVACY_ETAG = 0
     59 PORT = 8081
     60 MASTER_PUBLIC_KEY = S2PF0H375EQC7C0SQ6T8VH09GA1EVFBDXKS5KRBQAW8XW5KBHT9G
     61 DB = postgres
     62 BASE_URL = "http://localhost:8081/"
     63 EXPIRE_SHARD_SIZE ="300 ms"
     64 EXPIRE_IDLE_SLEEP_INTERVAL ="1 s"
     65 STEFAN_ABS = EUR:0
     66 STEFAN_LOG = EUR:0.005
     67 ENABLE_KYC = YES
     68 DISABLE_DIRECT_DEPOSIT = NO
     69 DB = postgres
     70 BASE_URL = http://localhost:8081/
     71 AGE_RESTRICTION_ENABLED = YES
     72 #AGE_GROUPS = "8:10:12:14:16:18:21"
     73 
     74 [exchangedb-postgres]
     75 CONFIG = "postgres:///talercheck"
     76 SQL_DIR = ${DATADIR}sql/
     77 DEFAULT_PURSE_LIMIT = 1
     78 
     79 [exchangedb]
     80 IDLE_RESERVE_EXPIRATION_TIME = 4 weeks
     81 LEGAL_RESERVE_EXPIRATION_TIME = 7 years
     82 AGGREGATOR_SHIFT = 1 s
     83 DEFAULT_PURSE_LIMIT = 1
     84 MAX_AML_PROGRAM_RUNTIME = 60 s
     85 
     86 [taler-exchange-secmod-cs]
     87 LOOKAHEAD_SIGN = "24 days"
     88 
     89 [taler-exchange-secmod-rsa]
     90 LOOKAHEAD_SIGN = "24 days"
     91 
     92 [taler-exchange-secmod-eddsa]
     93 LOOKAHEAD_SIGN = "24 days"
     94 DURATION = "14 days"
     95 
     96 
     97 [exchange-account-1]
     98 PAYTO_URI = "payto://x-taler-bank/localhost/2?receiver-name=2"
     99 ENABLE_DEBIT = YES
    100 ENABLE_CREDIT = YES
    101 
    102 [exchange-accountcredentials-1]
    103 WIRE_GATEWAY_AUTH_METHOD = none
    104 WIRE_GATEWAY_URL = "http://localhost:8082/accounts/2/taler-wire-gateway/"
    105 
    106 [admin-accountcredentials-1]
    107 WIRE_GATEWAY_AUTH_METHOD = none
    108 WIRE_GATEWAY_URL = "http://localhost:8082/accounts/2/taler-wire-gateway/"
    109 
    110 [exchange-account-2]
    111 PAYTO_URI = "payto://x-taler-bank/localhost/2?receiver-name=2"
    112 ENABLE_DEBIT = YES
    113 ENABLE_CREDIT = YES
    114 
    115 [exchange-accountcredentials-2]
    116 WIRE_GATEWAY_AUTH_METHOD = basic
    117 USERNAME = Exchange
    118 PASSWORD = password
    119 WIRE_GATEWAY_URL = "http://localhost:8082/accounts/2/taler-wire-gateway/"
    120 CORE_BANK_URL = "http://localhost:8082/accounts/2/"
    121 
    122 [admin-accountcredentials-2]
    123 WIRE_GATEWAY_AUTH_METHOD = basic
    124 # For now, fakebank still checks against the Exchange account...
    125 USERNAME = Exchange
    126 PASSWORD = password
    127 WIRE_GATEWAY_URL = "http://localhost:8082/accounts/2/taler-wire-gateway/"
    128 
    129 [exchange-account-3]
    130 PAYTO_URI = "payto://x-taler-bank/localhost/exchange?receiver-name=Exchange"
    131 ENABLE_DEBIT = YES
    132 ENABLE_CREDIT = YES
    133 
    134 [exchange-accountcredentials-3]
    135 WIRE_GATEWAY_AUTH_METHOD = basic
    136 USERNAME = exchange
    137 PASSWORD = password
    138 WIRE_GATEWAY_URL = "http://localhost:8082/accounts/exchange/taler-wire-gateway/"
    139 CORE_BANK_URL = "http://localhost:8082/accounts/exchange/"
    140 
    141 [admin-accountcredentials-3]
    142 WIRE_GATEWAY_AUTH_METHOD = basic
    143 USERNAME = exchange
    144 PASSWORD = password
    145 WIRE_GATEWAY_URL = "http://localhost:8082/accounts/exchange/taler-wire-gateway/"
    146 
    147 
    148 [exchange-offline]
    149 
    150 # Where do we store the offline master private key of the exchange?
    151 MASTER_PRIV_FILE = ${TALER_EXCHANGE_DATA_HOME}offline/master.priv
    152 
    153 # Where do we store the TOFU key material?
    154 SECM_TOFU_FILE = ${TALER_EXCHANGE_DATA_HOME}offline/secm_tofus.pub
    155 
    156 # Base32-encoded public key of the RSA helper.
    157 # SECM_DENOM_PUBKEY =
    158 
    159 # Base32-encoded public key of the EdDSA helper.
    160 # SECM_ESIGN_PUBKEY =
    161 
    162 
    163 [taler-exchange-secmod-cs]
    164 
    165 # How long should generated coins overlap in their validity
    166 # periods. Should be long enough to avoid problems with
    167 # wallets picking one key and then due to network latency
    168 # another key being valid.  The DURATION_WITHDRAW period
    169 # must be longer than this value.
    170 OVERLAP_DURATION = 5 m
    171 
    172 # Where do we store the generated private keys.
    173 KEY_DIR = ${TALER_EXCHANGE_DATA_HOME}secmod-cs/keys
    174 
    175 # Where does the helper listen for requests?
    176 UNIXPATH = ${TALER_RUNTIME_DIR}secmod-cs/server.sock
    177 
    178 # Directory for clients.
    179 CLIENT_DIR = ${TALER_RUNTIME_DIR}secmod-cs/clients
    180 
    181 # Where should the security module store its own private key?
    182 SM_PRIV_KEY = ${TALER_EXCHANGE_DATA_HOME}secmod-cs/secmod-private-key
    183 
    184 
    185 [taler-exchange-secmod-rsa]
    186 
    187 # How long should generated coins overlap in their validity
    188 # periods. Should be long enough to avoid problems with
    189 # wallets picking one key and then due to network latency
    190 # another key being valid.  The DURATION_WITHDRAW period
    191 # must be longer than this value.
    192 OVERLAP_DURATION = 0 m
    193 
    194 # Where do we store the generated private keys.
    195 KEY_DIR = ${TALER_EXCHANGE_DATA_HOME}secmod-rsa/keys
    196 
    197 # Where does the helper listen for requests?
    198 UNIXPATH = ${TALER_RUNTIME_DIR}secmod-rsa/server.sock
    199 
    200 # Directory for clients.
    201 CLIENT_DIR = ${TALER_RUNTIME_DIR}secmod-rsa/clients
    202 
    203 # Where should the security module store its own private key?
    204 SM_PRIV_KEY = ${TALER_EXCHANGE_DATA_HOME}secmod-rsa/secmod-private-key
    205 
    206 # Round down anchor key start date to multiples of this time.
    207 ANCHOR_ROUND = 1 ms
    208 
    209 [taler-exchange-secmod-eddsa]
    210 
    211 # How long should generated coins overlap in their validity
    212 # periods. Should be long enough to avoid problems with
    213 # wallets picking one key and then due to network latency
    214 # another key being valid.  The DURATION_WITHDRAW period
    215 # must be longer than this value.
    216 OVERLAP_DURATION = 5m
    217 
    218 # Where do we store the private keys.
    219 KEY_DIR = ${TALER_EXCHANGE_DATA_HOME}secmod-eddsa/keys
    220 
    221 # Where does the helper listen for requests?
    222 UNIXPATH = ${TALER_RUNTIME_DIR}secmod-eddsa/server.sock
    223 
    224 # Directory for clients.
    225 CLIENT_DIR = ${TALER_RUNTIME_DIR}secmod-eddsa/clients
    226 
    227 # Where should the security module store its own private key?
    228 SM_PRIV_KEY = ${TALER_EXCHANGE_DATA_HOME}secmod-eddsa/secmod-private-key
    229 
    230 # For how long are signing keys valid?
    231 DURATION = 12 weeks
    232 
    233 [kyc-provider-test-oauth2]
    234 LOGIC = oauth2
    235 KYC_OAUTH2_VALIDITY = forever
    236 KYC_OAUTH2_TOKEN_URL = http://localhost:6666/oauth/v2/token
    237 KYC_OAUTH2_AUTHORIZE_URL = http://localhost:6666/oauth/v2/login
    238 KYC_OAUTH2_INFO_URL = http://localhost:6666/api/user/me
    239 KYC_OAUTH2_CLIENT_ID = taler-exchange
    240 KYC_OAUTH2_CLIENT_SECRET = exchange-secret
    241 KYC_OAUTH2_POST_URL = http://example.com/
    242 KYC_OAUTH2_CONVERTER_HELPER = taler-exchange-kyc-oauth2-test-converter.sh
    243 
    244 [kyc-check-oauth-test-id]
    245 VOLUNTARY = NO
    246 # We use an external provider
    247 TYPE = LINK
    248 DESCRIPTION = "Oauth2 dummy authentication"
    249 DESCRIPTION_I18N = {}
    250 # No context requirements
    251 REQUIRES =
    252 # Measure to execute if check failed.
    253 FALLBACK = manual-freeze
    254 # This check runs on oauth2
    255 PROVIDER_ID = test-oauth2
    256 # Outputs from this check
    257 OUTPUTS = FULL_NAME DATE_OF_BIRTH
    258 
    259 
    260 [kyc-check-test-form]
    261 VOLUNTARY = NO
    262 # We use an external provider
    263 TYPE = FORM
    264 DESCRIPTION = "Test form"
    265 DESCRIPTION_I18N = {}
    266 # No context requirements
    267 REQUIRES =
    268 # Measure to execute if check failed.
    269 FALLBACK = manual-freeze
    270 # This check runs on oauth2
    271 FORM_NAME = full_name_and_birthdate
    272 # Outputs from this check
    273 OUTPUTS = FULL_NAME DATE_OF_BIRTH
    274 
    275 
    276 # This is the "default" setting for an account if
    277 # it has not yet triggered anything.
    278 [kyc-check-default]
    279 VOLUNTARY = NO
    280 TYPE = INFO
    281 DESCRIPTION = "Your account is operating normally"
    282 DESCRIPTION_I18N = {}
    283 # No context requirements
    284 REQUIRES =
    285 # Measure to execute if check failed. Well,
    286 # this check cannot really fail, but the
    287 # conservative answer is to freeze.
    288 FALLBACK = manual-freeze
    289 
    290 # If this "check" is triggered, we merely inform
    291 # the user that their account has been frozen. The
    292 # user cannot proceed manually.
    293 [kyc-check-info-frozen]
    294 VOLUNTARY = NO
    295 TYPE = INFO
    296 DESCRIPTION = "Your account is frozen pending investigation"
    297 DESCRIPTION_I18N = {}
    298 # No context requirements
    299 REQUIRES =
    300 # Measure to execute if check failed. Well,
    301 # this check cannot really fail, but we stay
    302 # where we are: frozen.
    303 FALLBACK = manual-freeze
    304 
    305 [kyc-measure-info-frozen]
    306 CHECK_NAME = info-frozen
    307 # No context
    308 CONTEXT = {}
    309 # Command if INFO check will never be run.
    310 PROGRAM = none
    311 
    312 # If this "check" is triggered, we merely inform
    313 # the user that we got their oauth-test data on file.
    314 [kyc-check-info-oauth-test-passed]
    315 VOLUNTARY = NO
    316 TYPE = INFO
    317 DESCRIPTION = "You passed the OAuth2 check. Thank you."
    318 DESCRIPTION_I18N = {}
    319 # No context requirements
    320 REQUIRES =
    321 # Measure to execute if check failed. Well,
    322 # this check cannot really fail, but we stay
    323 # where we are: frozen.
    324 FALLBACK = manual-freeze
    325 
    326 
    327 [kyc-measure-info-oauth-test-passed]
    328 CHECK_NAME = info-oauth-test-passed
    329 # No context
    330 CONTEXT = {}
    331 # Command if INFO check will never be run.
    332 PROGRAM = none
    333 
    334 [aml-program-none]
    335 DESCRIPTION = "Dummy AML program used for INFO checks, always fails"
    336 COMMAND = taler-exchange-helper-measure-none
    337 FALLBACK = manual-freeze
    338 
    339 [aml-program-freeze]
    340 DESCRIPTION = "Freeze the account"
    341 COMMAND = taler-exchange-helper-measure-freeze
    342 FALLBACK = manual-freeze
    343 
    344 [aml-program-oauth-output-check]
    345 DESCRIPTION = "Validates the output from OAauth2 and then increases all limits to EUR:1000"
    346 # Command that runs on the output of the OAuth provider
    347 # to decide what rules should apply next.
    348 COMMAND = taler-exchange-helper-measure-test-oauth
    349 # What measure to take if the COMMAND failed.
    350 FALLBACK = manual-freeze
    351 
    352 
    353 [aml-program-test-form-check]
    354 DESCRIPTION = "Validates the output from the test-form and then increases all limits to EUR:1000"
    355 # Command that runs on the output of the form
    356 # to decide what rules should apply next.
    357 COMMAND = taler-exchange-helper-measure-test-form
    358 # What measure to take if the COMMAND failed.
    359 FALLBACK = manual-freeze
    360 
    361 
    362 [kyc-measure-run-oauth]
    363 # Get client ID via the OAuth test provider
    364 CHECK_NAME = oauth-test-id
    365 # AML program to run on the output of the OAuth provider
    366 # to decide what rules should apply next.
    367 PROGRAM = oauth-output-check
    368 # Context to provide for check and program; empty.
    369 CONTEXT = {}
    370 
    371 # This is a base-measure that is being triggered
    372 # whenever something goes wrong. We freeze the
    373 # account and ask AML staff to investigate.
    374 [kyc-measure-manual-freeze]
    375 CHECK_NAME = skip
    376 # AML program that freezes the account and flags
    377 # it for investigation.
    378 PROGRAM = freeze
    379 # Context to provide for check and program; empty.
    380 CONTEXT = {}
    381 
    382 # This rule requests that the users passes KYC
    383 # when closing the reserve.
    384 [kyc-rule-close]
    385 ENABLED = YES
    386 # This is a public rule.
    387 EXPOSED = YES
    388 # All checks listed must be done (well, there is only one...)
    389 IS_AND_COMBINATOR = YES
    390 # This happens if the reserve is closed.
    391 OPERATION_TYPE = CLOSE
    392 # Threshold is 0, so any amount.
    393 THRESHOLD = EUR:0
    394 # Timeframe doesn't exactly matter with a threshold of EUR:0.
    395 TIMEFRAME = 1d
    396 # If the rule is triggered, ask the user to provide
    397 # personal data via OAuth2
    398 NEXT_MEASURES = run-oauth
    399