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 (11827B)


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