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


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