exchange

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

generate-kyc-basedb.conf (3130B)


      1 # This file is in the public domain.
      2 #
      3 # Configuration for the KYC/AML reference database used by test-kyc.sh.
      4 # It is the ordinary auditor reference configuration plus a KYC setup that
      5 # is deliberately easy to drive from a shell script: every rule that we
      6 # trigger resolves to a FORM measure, and a form can be satisfied with two
      7 # plain HTTP requests (GET /kyc-info/$TOKEN, POST /kyc-upload/$ID).
      8 @INLINE@ generate-auditor-basedb.conf
      9 
     10 [exchange]
     11 ENABLE_KYC = YES
     12 
     13 
     14 # ------------------------------------------------------------------
     15 # Boilerplate that every KYC configuration needs: the FREEZE measure
     16 # is the fallback whenever an AML program fails or a check expires,
     17 # and NONE is a program that imposes no new rules at all.
     18 # ------------------------------------------------------------------
     19 
     20 [KYC-MEASURE-FREEZE]
     21 CHECK_NAME = SKIP
     22 CONTEXT = {}
     23 PROGRAM = FREEZE
     24 
     25 [AML-PROGRAM-FREEZE]
     26 COMMAND = taler-exchange-helper-measure-freeze
     27 ENABLED = true
     28 DESCRIPTION = Freeze the account
     29 DESCRIPTION_I18N = {}
     30 FALLBACK = FREEZE
     31 
     32 [AML-PROGRAM-NONE]
     33 COMMAND = /bin/true
     34 ENABLED = true
     35 DESCRIPTION = Impose no new rules
     36 DESCRIPTION_I18N = {}
     37 FALLBACK = FREEZE
     38 
     39 
     40 # ------------------------------------------------------------------
     41 # C1/M1/P1: ask for a full name and a date of birth.  Once the form
     42 # has been submitted, taler-exchange-helper-measure-test-form raises
     43 # every limit to TESTKUDOS:1000, which un-blocks the account.
     44 # ------------------------------------------------------------------
     45 
     46 [KYC-CHECK-C1]
     47 TYPE = FORM
     48 FORM_NAME = full_name_and_birthdate
     49 DESCRIPTION = Provide your full name and date of birth
     50 DESCRIPTION_I18N = {}
     51 OUTPUTS = FULL_NAME DATE_OF_BIRTH
     52 FALLBACK = FREEZE
     53 
     54 [KYC-MEASURE-M1]
     55 CHECK_NAME = C1
     56 CONTEXT = {}
     57 PROGRAM = P1
     58 
     59 [AML-PROGRAM-P1]
     60 COMMAND = taler-exchange-helper-measure-test-form
     61 ENABLED = true
     62 DESCRIPTION = Check FULL_NAME and DATE_OF_BIRTH
     63 DESCRIPTION_I18N = {}
     64 FALLBACK = FREEZE
     65 
     66 
     67 # ------------------------------------------------------------------
     68 # The rules.  The AGGREGATE threshold sits below the TESTKUDOS:4 that
     69 # the reference wallet pays each merchant but above zero, which is
     70 # what makes the two interesting states reachable from a script: a
     71 # merchant may still accept the order (nothing has been aggregated
     72 # yet, so it is within its limit), the exchange accepts the coins,
     73 # and only the wire transfer is held back until measure M1 has been
     74 # passed.  That held-back transfer is the KYC-induced lag the auditor
     75 # has to report.
     76 #
     77 # WITHDRAW has a threshold well above what the reference wallet ever
     78 # withdraws, so the rule is recorded in the configuration -- and thus
     79 # exercised by the exchange -- without blocking the interaction that
     80 # produces the rest of the reference database.
     81 # ------------------------------------------------------------------
     82 
     83 [KYC-RULE-AGGREGATE]
     84 OPERATION_TYPE = AGGREGATE
     85 ENABLED = YES
     86 EXPOSED = YES
     87 IS_AND_COMBINATOR = YES
     88 THRESHOLD = TESTKUDOS:3
     89 TIMEFRAME = 1d
     90 NEXT_MEASURES = M1
     91 
     92 [KYC-RULE-WITHDRAW]
     93 OPERATION_TYPE = WITHDRAW
     94 ENABLED = YES
     95 EXPOSED = YES
     96 IS_AND_COMBINATOR = YES
     97 THRESHOLD = TESTKUDOS:100
     98 TIMEFRAME = 1d
     99 NEXT_MEASURES = M1