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


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