taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit 0286614a17a10b77031c7e514bd97af5ac4cd854
parent 9023ae3c4dc7aabc7e7327b481cfdc60d7947d35
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 21 Nov 2026 23:26:09 +0100

KYC: allow an OAuth 2.0 converter to return attribute sets for multiple forms

Providers such as Beekeeper collect several forms in one KYC process; the
exchange stores each set with its form index.

Diffstat:
Mmanpages/taler-exchange.conf.5.rst | 1+
Mtaler-kyc-manual.rst | 30++++++++++++++++++++++++++++--
2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/manpages/taler-exchange.conf.5.rst b/manpages/taler-exchange.conf.5.rst @@ -312,6 +312,7 @@ KYC_OAUTH2_POST_URL KYC_OAUTH2_CONVERTER_HELPER Helper to convert JSON with KYC data returned by the OAuth2.0 info endpoint into GNU Taler internal format. Specific to the OAuth 2.0 provider. + The helper outputs a JSON object with the attributes, including ``id`` and ``FORM_ID``, or a non-empty array of such objects, one per form, of which only the first needs ``id``; the exchange stores each as an attribute set of its own, the first being the primary one. KYC_OAUTH2_DEBUG_MODE Set to YES to allow error responses to include potentially diff --git a/taler-kyc-manual.rst b/taler-kyc-manual.rst @@ -252,6 +252,23 @@ service into the KYC attributes (also in JSON) expected by the exchange. The script will need to be adjusted based on the attributes collected by the specific backend. +The converter reads the JSON returned by the info endpoint from its standard +input and writes the attributes to its standard output: a JSON object with +the ID of the user at the provider in ``id`` and the name of the form in +``FORM_ID`` (see `CustomerKycAttributes`). A provider that collects several +forms in one KYC process, such as Beekeeper, may instead have its converter +output a non-empty array of such objects, one *attribute set* per form; only +the first object needs ``id``. The exchange then stores each set as a +record of its own, all in one transaction and with the same collection +time, and numbers them in the order of the array (the *form index*, from +0). The first set is the *primary* one: it becomes the current attributes +of the account, which AML programs get as ``attributes``. AML programs +find the other sets in ``kyc_history``, and AML officers see each set as an +entry of its own. With age restriction, the birthday of the account's +reserves is taken from the ``DATE_OF_BIRTH`` of the first set (as for a +single set, which clears the birthday if it has none), and from any further +set that has one. Only the OAuth 2.0 logic accepts such an array. + The Challenger service for address validation supports OAuth2.0, but does not have a static AUTHORIZE_URL. Instead, the AUTHORIZE_URL must be enabled by the client using a special authenticated request to the Challenger's ``/setup`` endpoint. @@ -465,7 +482,10 @@ used in measures where the AML program must be run immediately without any input. The outcome of *any* check is stored encrypted in the ``kyc_attributes`` -table. It MUST include an ``expiration_time``. +table. It MUST include an ``expiration_time``. A KYC process that returned +several attribute sets (see the OAuth 2.0 converter above) stores one row +per set, with its position in the column ``form_index``; each set of a +process is stored only once. The INFO Type ^^^^^^^^^^^^^ @@ -744,6 +764,9 @@ administrator. // names and the values must be strings representing // the data. In the case of file uploads, the data // MUST be base64-encoded or be an external upload. + // If the provider returned several attribute sets, + // these are the first (primary) one; the others are + // in ``kyc_history``. // Attributes are only provided if the AML program // specifies "attributes" for its input requirements. attributes?: Object; @@ -756,7 +779,10 @@ administrator. aml_history?: AmlHistoryEntry[]; // JSON array with the results of historic - // KYC data about the account. + // KYC data about the account, newest first, one entry + // per attribute set. The sets of a KYC process that + // returned several are consecutive entries, in the + // order the provider returned them. // // KYC history is only provided if the AML program // specifies "kyc_history" for its input requirements.