commit d71302673998390b23a53e457637712dcf7a6088
parent 5ce2331ee60c82e4edf45c9d681519a821eb42d1
Author: Christian Grothoff <christian@grothoff.org>
Date: Tue, 4 Aug 2026 19:57:07 +0200
modernize backup resources
Diffstat:
11 files changed, 531 insertions(+), 482 deletions(-)
diff --git a/src/cli/resources/00-backup.json b/src/cli/resources/00-backup.json
@@ -1,9 +1,21 @@
{
"continents": [
- "Europe",
- "North America",
- "Demoworld"
+ {
+ "name": "Europe"
+ },
+ {
+ "name": "India"
+ },
+ {
+ "name": "Asia"
+ },
+ {
+ "name": "North America"
+ },
+ {
+ "name": "Demoworld"
+ }
],
- "backup_state": "CONTINENT_SELECTING",
- "reducer_type": "backup"
+ "reducer_type": "backup",
+ "backup_state": "CONTINENT_SELECTING"
}
diff --git a/src/cli/resources/00-recovery.json b/src/cli/resources/00-recovery.json
@@ -1,8 +1,20 @@
{
"continents": [
- "Europe",
- "North America",
- "Testcontinent"
+ {
+ "name": "Europe"
+ },
+ {
+ "name": "India"
+ },
+ {
+ "name": "Asia"
+ },
+ {
+ "name": "North America"
+ },
+ {
+ "name": "Demoworld"
+ }
],
"reducer_type": "recovery",
"recovery_state": "CONTINENT_SELECTING"
diff --git a/src/cli/resources/01-backup.json b/src/cli/resources/01-backup.json
@@ -1,26 +1,30 @@
{
+ "reducer_type": "backup",
+ "backup_state": "COUNTRY_SELECTING",
"continents": [
- "Europe",
- "North America",
- "Demoworld"
+ {
+ "name": "Europe"
+ },
+ {
+ "name": "India"
+ },
+ {
+ "name": "Asia"
+ },
+ {
+ "name": "North America"
+ },
+ {
+ "name": "Demoworld"
+ }
],
- "backup_state": "COUNTRY_SELECTING",
- "reducer_type": "backup",
- "selected_continent": "Demoworld",
"countries": [
{
"code": "xx",
"name": "Testland",
"continent": "Demoworld",
- "continent_i18n": {
- "xx": "Testkontinent"
- },
- "name_i18n": {
- "de_DE": "Testlandt",
- "de_CH": "Testlandi",
- "fr": "Testpais",
- "en": "Testland"
- }
+ "call_code": "+0"
}
- ]
+ ],
+ "selected_continent": "Demoworld"
}
diff --git a/src/cli/resources/01-recovery.json b/src/cli/resources/01-recovery.json
@@ -1,42 +1,30 @@
{
+ "reducer_type": "recovery",
+ "recovery_state": "COUNTRY_SELECTING",
"continents": [
- "Europe",
- "North America",
- "Testcontinent"
+ {
+ "name": "Europe"
+ },
+ {
+ "name": "India"
+ },
+ {
+ "name": "Asia"
+ },
+ {
+ "name": "North America"
+ },
+ {
+ "name": "Demoworld"
+ }
],
- "recovery_state": "COUNTRY_SELECTING",
- "reducer_type": "recovery",
- "selected_continent": "Testcontinent",
"countries": [
{
"code": "xx",
"name": "Testland",
- "continent": "Testcontinent",
- "continent_i18n": {
- "xx": "Testkontinent"
- },
- "name_i18n": {
- "de_DE": "Testlandt",
- "de_CH": "Testlandi",
- "fr": "Testpais",
- "en": "Testland"
- },
- "currency": "TESTKUDOS"
- },
- {
- "code": "xy",
- "name": "Demoland",
- "continent": "Testcontinent",
- "continent_i18n": {
- "xx": "Testkontinent"
- },
- "name_i18n": {
- "de_DE": "Demolandt",
- "de_CH": "Demolandi",
- "fr": "Demopais",
- "en": "Demoland"
- },
- "currency": "KUDOS"
+ "continent": "Demoworld",
+ "call_code": "+0"
}
- ]
+ ],
+ "selected_continent": "Demoworld"
}
diff --git a/src/cli/resources/02-backup.json b/src/cli/resources/02-backup.json
@@ -1,64 +1,82 @@
{
+ "reducer_type": "backup",
+ "backup_state": "USER_ATTRIBUTES_COLLECTING",
"continents": [
- "Europe",
- "North America",
- "Demoworld"
+ {
+ "name": "Europe"
+ },
+ {
+ "name": "India"
+ },
+ {
+ "name": "Asia"
+ },
+ {
+ "name": "North America"
+ },
+ {
+ "name": "Demoworld"
+ }
],
- "backup_state": "USER_ATTRIBUTES_COLLECTING",
- "reducer_type": "backup",
- "selected_continent": "Testcontinent",
"countries": [
{
"code": "xx",
"name": "Testland",
"continent": "Demoworld",
- "name_i18n": {
- "de_DE": "Testlandt",
- "de_CH": "Testlandi",
- "fr": "Testpais",
- "en": "Testland"
- }
+ "call_code": "+0"
}
],
- "authentication_providers": {
- "http://localhost:8086/": { "status" : "not-contacted" },
- "http://localhost:8087/": { "status" : "not-contacted" },
- "http://localhost:8088/": { "status" : "not-contacted" },
- "http://localhost:8089/": { "status" : "not-contacted" }
- },
- "selected_country": "xx",
"required_attributes": [
{
"type": "string",
"name": "full_name",
"label": "Full name",
- "label_i18n": {
- "de_DE": "Vollstaendiger Name",
- "de_CH": "Vollstaendiger Name"
- },
- "widget": "anastasis_gtk_ia_full_name"
+ "widget": "anastasis_gtk_ia_full_name",
+ "uuid": "9e8f463f-575f-42cb-85f3-759559997331"
},
{
"type": "date",
"name": "birthdate",
"label": "Birthdate",
- "label_i18n": {
- "de_CH": "Geburtsdatum"
- },
- "widget": "anastasis_gtk_ia_birthdate"
+ "widget": "anastasis_gtk_ia_birthdate",
+ "uuid": "83d655c7-bdb6-484d-904e-80c1058c8854"
},
{
- "type": "string",
- "name": "sq_number",
- "label": "Square number",
- "label_i18n":{
- "de_DE":"Quadratzahl",
- "de_CH":"Quadratzahl"
- },
- "widget": "anastasis_gtk_xx_square",
- "uuid" : "ed790bca-89bf-11eb-96f2-233996cf644e",
- "validation-regex": "^[0-9]+$",
- "validation-logic": "XX_SQUARE_check"
+ "type": "string",
+ "name": "prime_number",
+ "label": "Prime number",
+ "widget": "anastasis_gtk_xx_prime",
+ "uuid": "39190a95-cacb-4412-8bae-1f7da3f980b4",
+ "tooltip": "Mathematics is fun",
+ "validation-regex": "^[0-9]+$",
+ "validation-logic": "XY_PRIME_check",
+ "optional": true
+ },
+ {
+ "type": "string",
+ "name": "sq_number",
+ "label": "Square number",
+ "widget": "anastasis_gtk_xx_square",
+ "uuid": "ed790bca-89bf-11eb-96f2-233996cf644e",
+ "tooltip": "Mathematics is fun",
+ "validation-regex": "^[0-9]+$",
+ "validation-logic": "XX_SQUARE_check"
}
- ]
+ ],
+ "authentication_providers": {
+ "http://localhost:8086/": {
+ "status": "not-contacted"
+ },
+ "http://localhost:8087/": {
+ "status": "not-contacted"
+ },
+ "http://localhost:8088/": {
+ "status": "not-contacted"
+ },
+ "http://localhost:8089/": {
+ "status": "not-contacted"
+ }
+ },
+ "selected_continent": "Demoworld",
+ "selected_country": "xx"
}
diff --git a/src/cli/resources/02-recovery.json b/src/cli/resources/02-recovery.json
@@ -1,84 +1,82 @@
{
+ "reducer_type": "recovery",
+ "recovery_state": "USER_ATTRIBUTES_COLLECTING",
"continents": [
- "Europe",
- "North America",
- "Testcontinent"
+ {
+ "name": "Europe"
+ },
+ {
+ "name": "India"
+ },
+ {
+ "name": "Asia"
+ },
+ {
+ "name": "North America"
+ },
+ {
+ "name": "Demoworld"
+ }
],
- "recovery_state": "USER_ATTRIBUTES_COLLECTING",
- "reducer_type": "recovery",
- "selected_continent": "Testcontinent",
"countries": [
{
"code": "xx",
"name": "Testland",
- "continent": "Testcontinent",
- "continent_i18n": {
- "xx": "Testkontinent"
- },
- "name_i18n": {
- "de_DE": "Testlandt",
- "de_CH": "Testlandi",
- "fr": "Testpais",
- "en": "Testland"
- },
- "currency": "TESTKUDOS"
- },
- {
- "code": "xy",
- "name": "Demoland",
- "continent": "Testcontinent",
- "continent_i18n": {
- "xx": "Testkontinent"
- },
- "name_i18n": {
- "de_DE": "Demolandt",
- "de_CH": "Demolandi",
- "fr": "Demopais",
- "en": "Demoland"
- },
- "currency": "KUDOS"
+ "continent": "Demoworld",
+ "call_code": "+0"
}
],
- "authentication_providers": {
- "http://localhost:8086/": { "status" : "not-contacted" },
- "http://localhost:8087/": { "status" : "not-contacted" },
- "http://localhost:8088/": { "status" : "not-contacted" },
- "http://localhost:8089/": { "status" : "not-contacted" }
- },
- "selected_country": "xx",
- "currencies": [ "TESTKUDOS" ],
"required_attributes": [
{
"type": "string",
"name": "full_name",
"label": "Full name",
- "label_i18n": {
- "de_DE": "Vollstaendiger Name",
- "de_CH": "Vollstaendiger Name"
- },
- "widget": "anastasis_gtk_ia_full_name"
+ "widget": "anastasis_gtk_ia_full_name",
+ "uuid": "9e8f463f-575f-42cb-85f3-759559997331"
},
{
"type": "date",
"name": "birthdate",
"label": "Birthdate",
- "label_i18n": {
- "de_CH": "Geburtsdatum"
- },
- "widget": "anastasis_gtk_ia_birthdate"
+ "widget": "anastasis_gtk_ia_birthdate",
+ "uuid": "83d655c7-bdb6-484d-904e-80c1058c8854"
},
{
- "type": "string",
- "name": "sq_number",
- "label": "Square number",
- "label_i18n":{
- "de_DE":"Quadratzahl",
- "de_CH":"Quadratzahl"
- },
- "widget": "anastasis_gtk_xx_square",
- "uuid" : "ed790bca-89bf-11eb-96f2-233996cf644e",
- "validation-regex": "^[0-9]+$",
- "validation-logic": "XX_SQUARE_check"
+ "type": "string",
+ "name": "prime_number",
+ "label": "Prime number",
+ "widget": "anastasis_gtk_xx_prime",
+ "uuid": "39190a95-cacb-4412-8bae-1f7da3f980b4",
+ "tooltip": "Mathematics is fun",
+ "validation-regex": "^[0-9]+$",
+ "validation-logic": "XY_PRIME_check",
+ "optional": true
+ },
+ {
+ "type": "string",
+ "name": "sq_number",
+ "label": "Square number",
+ "widget": "anastasis_gtk_xx_square",
+ "uuid": "ed790bca-89bf-11eb-96f2-233996cf644e",
+ "tooltip": "Mathematics is fun",
+ "validation-regex": "^[0-9]+$",
+ "validation-logic": "XX_SQUARE_check"
}
- ]
+ ],
+ "authentication_providers": {
+ "http://localhost:8086/": {
+ "status": "not-contacted"
+ },
+ "http://localhost:8087/": {
+ "status": "not-contacted"
+ },
+ "http://localhost:8088/": {
+ "status": "not-contacted"
+ },
+ "http://localhost:8089/": {
+ "status": "not-contacted"
+ }
+ },
+ "selected_continent": "Demoworld",
+ "selected_country": "xx"
}
diff --git a/src/cli/resources/03-backup.json b/src/cli/resources/03-backup.json
@@ -1,28 +1,71 @@
{
+ "reducer_type": "backup",
+ "backup_state": "AUTHENTICATIONS_EDITING",
"continents": [
- "Europe",
- "North America",
- "Demoworld"
+ {
+ "name": "Europe"
+ },
+ {
+ "name": "India"
+ },
+ {
+ "name": "Asia"
+ },
+ {
+ "name": "North America"
+ },
+ {
+ "name": "Demoworld"
+ }
],
- "backup_state": "AUTHENTICATIONS_EDITING",
- "reducer_type": "backup",
- "selected_continent": "Demoworld",
"countries": [
{
"code": "xx",
"name": "Testland",
"continent": "Demoworld",
- "name_i18n": {
- "de_DE": "Testlandt",
- "de_CH": "Testlandi",
- "fr": "Testpais",
- "en": "Testland"
- }
+ "call_code": "+0"
+ }
+ ],
+ "required_attributes": [
+ {
+ "type": "string",
+ "name": "full_name",
+ "label": "Full name",
+ "widget": "anastasis_gtk_ia_full_name",
+ "uuid": "9e8f463f-575f-42cb-85f3-759559997331"
+ },
+ {
+ "type": "date",
+ "name": "birthdate",
+ "label": "Birthdate",
+ "widget": "anastasis_gtk_ia_birthdate",
+ "uuid": "83d655c7-bdb6-484d-904e-80c1058c8854"
+ },
+ {
+ "type": "string",
+ "name": "prime_number",
+ "label": "Prime number",
+ "widget": "anastasis_gtk_xx_prime",
+ "uuid": "39190a95-cacb-4412-8bae-1f7da3f980b4",
+ "tooltip": "Mathematics is fun",
+ "validation-regex": "^[0-9]+$",
+ "validation-logic": "XY_PRIME_check",
+ "optional": true
+ },
+ {
+ "type": "string",
+ "name": "sq_number",
+ "label": "Square number",
+ "widget": "anastasis_gtk_xx_square",
+ "uuid": "ed790bca-89bf-11eb-96f2-233996cf644e",
+ "tooltip": "Mathematics is fun",
+ "validation-regex": "^[0-9]+$",
+ "validation-logic": "XX_SQUARE_check"
}
],
"authentication_providers": {
"http://localhost:8086/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -34,11 +77,11 @@
"liability_limit": "TESTKUDOS:1",
"business_name": "Data loss #1 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "F0HEYJQW81ZAZ3VYMZHFG8T1Z0",
+ "provider_salt": "7QK4QVG6HBDJVGFMDGC1AJMSCG",
"http_status": 200
},
"http://localhost:8087/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -50,11 +93,11 @@
"liability_limit": "TESTKUDOS:1",
"business_name": "Data loss #2 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "D378FWXHJB8JHPQFQRZGGV9PWG",
+ "provider_salt": "C0X46TB9ENWDD5VFW1NXQEGDQ8",
"http_status": 200
},
"http://localhost:8088/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -66,11 +109,11 @@
"liability_limit": "TESTKUDOS:1",
"business_name": "Data loss #3 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "7W9W4A4TTWSWRPJ76RNDPJHSPR",
+ "provider_salt": "65S8KJ1AEJGJTG3DCT9FSPDQDR",
"http_status": 200
},
"http://localhost:8089/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -82,47 +125,15 @@
"liability_limit": "TESTKUDOS:1",
"business_name": "Data loss #4 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "PN0VJF6KDSBYN40SGRCEXPB07M",
+ "provider_salt": "NJ7KTFQMAZVB835VBHCGDKCTF0",
"http_status": 200
}
},
- "selected_country": "xx",
- "required_attributes": [
- {
- "type": "string",
- "name": "full_name",
- "label": "Full name",
- "label_i18n": {
- "de_DE": "Vollstaendiger Name",
- "de_CH": "Vollstaendiger Name"
- },
- "widget": "anastasis_gtk_ia_full_name"
- },
- {
- "type": "date",
- "name": "birthdate",
- "label": "Birthdate",
- "label_i18n": {
- "de_CH": "Geburtsdatum"
- },
- "widget": "anastasis_gtk_ia_birthdate"
- },
- {
- "type": "string",
- "name": "ahv_number",
- "label": "AHV number",
- "label_i18n": {
- "de_DE": "AHV-Nummer",
- "de_CH": "AHV-Nummer"
- },
- "widget": "anastasis_gtk_ia_ahv",
- "validation-regex": "^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
- "validation-logic": "CH_AHV_check"
- }
- ],
"identity_attributes": {
"full_name": "Max Musterman",
- "sq_number": 4,
+ "sq_number": "4",
"birthdate": "2000-01-01"
- }
+ },
+ "selected_continent": "Demoworld",
+ "selected_country": "xx"
}
diff --git a/src/cli/resources/04-backup.json b/src/cli/resources/04-backup.json
@@ -1,28 +1,71 @@
{
+ "reducer_type": "backup",
+ "backup_state": "AUTHENTICATIONS_EDITING",
"continents": [
- "Europe",
- "North America",
- "Demoworld"
+ {
+ "name": "Europe"
+ },
+ {
+ "name": "India"
+ },
+ {
+ "name": "Asia"
+ },
+ {
+ "name": "North America"
+ },
+ {
+ "name": "Demoworld"
+ }
],
- "backup_state": "AUTHENTICATIONS_EDITING",
- "reducer_type": "backup",
- "selected_continent": "Demoworld",
"countries": [
{
"code": "xx",
"name": "Testland",
"continent": "Demoworld",
- "name_i18n": {
- "de_DE": "Testlandt",
- "de_CH": "Testlandi",
- "fr": "Testpais",
- "en": "Testland"
- }
+ "call_code": "+0"
+ }
+ ],
+ "required_attributes": [
+ {
+ "type": "string",
+ "name": "full_name",
+ "label": "Full name",
+ "widget": "anastasis_gtk_ia_full_name",
+ "uuid": "9e8f463f-575f-42cb-85f3-759559997331"
+ },
+ {
+ "type": "date",
+ "name": "birthdate",
+ "label": "Birthdate",
+ "widget": "anastasis_gtk_ia_birthdate",
+ "uuid": "83d655c7-bdb6-484d-904e-80c1058c8854"
+ },
+ {
+ "type": "string",
+ "name": "prime_number",
+ "label": "Prime number",
+ "widget": "anastasis_gtk_xx_prime",
+ "uuid": "39190a95-cacb-4412-8bae-1f7da3f980b4",
+ "tooltip": "Mathematics is fun",
+ "validation-regex": "^[0-9]+$",
+ "validation-logic": "XY_PRIME_check",
+ "optional": true
+ },
+ {
+ "type": "string",
+ "name": "sq_number",
+ "label": "Square number",
+ "widget": "anastasis_gtk_xx_square",
+ "uuid": "ed790bca-89bf-11eb-96f2-233996cf644e",
+ "tooltip": "Mathematics is fun",
+ "validation-regex": "^[0-9]+$",
+ "validation-logic": "XX_SQUARE_check"
}
],
"authentication_providers": {
"http://localhost:8086/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -34,11 +77,11 @@
"liability_limit": "TESTKUDOS:1",
"business_name": "Data loss #1 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "F0HEYJQW81ZAZ3VYMZHFG8T1Z0",
+ "provider_salt": "7QK4QVG6HBDJVGFMDGC1AJMSCG",
"http_status": 200
},
"http://localhost:8087/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -50,11 +93,11 @@
"liability_limit": "TESTKUDOS:1",
"business_name": "Data loss #2 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "D378FWXHJB8JHPQFQRZGGV9PWG",
+ "provider_salt": "C0X46TB9ENWDD5VFW1NXQEGDQ8",
"http_status": 200
},
"http://localhost:8088/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -66,11 +109,11 @@
"liability_limit": "TESTKUDOS:1",
"business_name": "Data loss #3 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "7W9W4A4TTWSWRPJ76RNDPJHSPR",
+ "provider_salt": "65S8KJ1AEJGJTG3DCT9FSPDQDR",
"http_status": 200
},
"http://localhost:8089/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -82,65 +125,32 @@
"liability_limit": "TESTKUDOS:1",
"business_name": "Data loss #4 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "PN0VJF6KDSBYN40SGRCEXPB07M",
+ "provider_salt": "NJ7KTFQMAZVB835VBHCGDKCTF0",
"http_status": 200
}
},
- "selected_country": "xx",
- "currencies": [ "TESTKUDOS" ],
- "required_attributes": [
- {
- "type": "string",
- "name": "full_name",
- "label": "Full name",
- "label_i18n": {
- "de_DE": "Vollstaendiger Name",
- "de_CH": "Vollstaendiger Name"
- },
- "widget": "anastasis_gtk_ia_full_name"
- },
- {
- "type": "date",
- "name": "birthdate",
- "label": "Birthdate",
- "label_i18n": {
- "de_CH": "Geburtsdatum"
- },
- "widget": "anastasis_gtk_ia_birthdate"
- },
- {
- "type": "string",
- "name": "ahv_number",
- "label": "AHV number",
- "label_i18n": {
- "de_DE": "AHV-Nummer",
- "de_CH": "AHV-Nummer"
- },
- "widget": "anastasis_gtk_ia_ahv",
- "validation-regex": "^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
- "validation-logic": "CH_AHV_check"
- }
- ],
"identity_attributes": {
"full_name": "Max Musterman",
- "sq_number": 4,
+ "sq_number": "4",
"birthdate": "2000-01-01"
},
+ "selected_continent": "Demoworld",
+ "selected_country": "xx",
"authentication_methods": [
{
"type": "question",
- "instructions": "What's your name?",
- "challenge": "Hans"
+ "instructions": "What is your name?",
+ "challenge": "91GPWWR"
},
{
"type": "question",
- "instructions": "What's your X name?",
- "challenge": "Hansx"
+ "instructions": "How old are you?",
+ "challenge": "6GS0"
},
{
"type": "question",
"instructions": "Where do you live?",
- "challenge": "Mars"
+ "challenge": "89JQ4VG"
}
]
}
diff --git a/src/cli/resources/05-backup.json b/src/cli/resources/05-backup.json
@@ -1,47 +1,71 @@
{
+ "reducer_type": "backup",
+ "backup_state": "POLICIES_REVIEWING",
"continents": [
- "Europe",
- "North America",
- "Testcontinent"
+ {
+ "name": "Europe"
+ },
+ {
+ "name": "India"
+ },
+ {
+ "name": "Asia"
+ },
+ {
+ "name": "North America"
+ },
+ {
+ "name": "Demoworld"
+ }
],
- "backup_state": "POLICIES_REVIEWING",
- "reducer_type": "backup",
- "selected_continent": "Testcontinent",
"countries": [
{
"code": "xx",
"name": "Testland",
- "continent": "Testcontinent",
- "continent_i18n": {
- "xx": "Testkontinent"
- },
- "name_i18n": {
- "de_DE": "Testlandt",
- "de_CH": "Testlandi",
- "fr": "Testpais",
- "en": "Testland"
- },
- "currency": "TESTKUDOS"
- },
- {
- "code": "xy",
- "name": "Demoland",
- "continent": "Testcontinent",
- "continent_i18n": {
- "xx": "Testkontinent"
- },
- "name_i18n": {
- "de_DE": "Demolandt",
- "de_CH": "Demolandi",
- "fr": "Demopais",
- "en": "Demoland"
- },
- "currency": "KUDOS"
+ "continent": "Demoworld",
+ "call_code": "+0"
+ }
+ ],
+ "required_attributes": [
+ {
+ "type": "string",
+ "name": "full_name",
+ "label": "Full name",
+ "widget": "anastasis_gtk_ia_full_name",
+ "uuid": "9e8f463f-575f-42cb-85f3-759559997331"
+ },
+ {
+ "type": "date",
+ "name": "birthdate",
+ "label": "Birthdate",
+ "widget": "anastasis_gtk_ia_birthdate",
+ "uuid": "83d655c7-bdb6-484d-904e-80c1058c8854"
+ },
+ {
+ "type": "string",
+ "name": "prime_number",
+ "label": "Prime number",
+ "widget": "anastasis_gtk_xx_prime",
+ "uuid": "39190a95-cacb-4412-8bae-1f7da3f980b4",
+ "tooltip": "Mathematics is fun",
+ "validation-regex": "^[0-9]+$",
+ "validation-logic": "XY_PRIME_check",
+ "optional": true
+ },
+ {
+ "type": "string",
+ "name": "sq_number",
+ "label": "Square number",
+ "widget": "anastasis_gtk_xx_square",
+ "uuid": "ed790bca-89bf-11eb-96f2-233996cf644e",
+ "tooltip": "Mathematics is fun",
+ "validation-regex": "^[0-9]+$",
+ "validation-logic": "XX_SQUARE_check"
}
],
"authentication_providers": {
"http://localhost:8086/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -51,14 +75,13 @@
"annual_fee": "TESTKUDOS:4.99",
"truth_upload_fee": "TESTKUDOS:0.01",
"liability_limit": "TESTKUDOS:1",
- "currency": "TESTKUDOS",
"business_name": "Data loss #1 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "F0HEYJQW81ZAZ3VYMZHFG8T1Z0",
+ "provider_salt": "7QK4QVG6HBDJVGFMDGC1AJMSCG",
"http_status": 200
},
"http://localhost:8087/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -68,14 +91,13 @@
"annual_fee": "TESTKUDOS:4.99",
"truth_upload_fee": "TESTKUDOS:0.01",
"liability_limit": "TESTKUDOS:1",
- "currency": "TESTKUDOS",
"business_name": "Data loss #2 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "D378FWXHJB8JHPQFQRZGGV9PWG",
+ "provider_salt": "C0X46TB9ENWDD5VFW1NXQEGDQ8",
"http_status": 200
},
"http://localhost:8088/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -85,14 +107,13 @@
"annual_fee": "TESTKUDOS:4.99",
"truth_upload_fee": "TESTKUDOS:0.01",
"liability_limit": "TESTKUDOS:1",
- "currency": "TESTKUDOS",
"business_name": "Data loss #3 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "7W9W4A4TTWSWRPJ76RNDPJHSPR",
+ "provider_salt": "65S8KJ1AEJGJTG3DCT9FSPDQDR",
"http_status": 200
},
"http://localhost:8089/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -102,90 +123,54 @@
"annual_fee": "TESTKUDOS:4.99",
"truth_upload_fee": "TESTKUDOS:0.01",
"liability_limit": "TESTKUDOS:1",
- "currency": "TESTKUDOS",
"business_name": "Data loss #4 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "PN0VJF6KDSBYN40SGRCEXPB07M",
+ "provider_salt": "NJ7KTFQMAZVB835VBHCGDKCTF0",
"http_status": 200
}
},
- "selected_country": "xx",
- "currencies": [ "TESTKUDOS" ],
- "required_attributes": [
- {
- "type": "string",
- "name": "full_name",
- "label": "Full name",
- "label_i18n": {
- "de_DE": "Vollstaendiger Name",
- "de_CH": "Vollstaendiger Name"
- },
- "widget": "anastasis_gtk_ia_full_name"
- },
- {
- "type": "date",
- "name": "birthdate",
- "label": "Birthdate",
- "label_i18n": {
- "de_CH": "Geburtsdatum"
- },
- "widget": "anastasis_gtk_ia_birthdate"
- },
- {
- "type": "string",
- "name": "ahv_number",
- "label": "AHV number",
- "label_i18n": {
- "de_DE": "AHV-Nummer",
- "de_CH": "AHV-Nummer"
- },
- "widget": "anastasis_gtk_ia_ahv",
- "validation-regex": "^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
- "validation-logic": "CH_AHV_check"
- }
- ],
"identity_attributes": {
"full_name": "Max Musterman",
- "sq_number": 4,
+ "sq_number": "4",
"birthdate": "2000-01-01"
},
+ "selected_continent": "Demoworld",
+ "selected_country": "xx",
"authentication_methods": [
{
"type": "question",
- "instructions": "What's your name?",
- "challenge": "Hans"
+ "instructions": "What is your name?",
+ "challenge": "91GPWWR"
},
{
"type": "question",
- "instructions": "What's your X name?",
- "challenge": "Hansx"
+ "instructions": "How old are you?",
+ "challenge": "6GS0"
},
{
"type": "question",
"instructions": "Where do you live?",
- "challenge": "Mars"
+ "challenge": "89JQ4VG"
}
],
"policies": [
{
- "recovery_cost": "TESTKUDOS:0",
"methods": [
{
- "authentication_method": 0,
- "provider": "http://localhost:8089/"
+ "authentication_method": 1,
+ "provider": "http://localhost:8087/"
},
{
- "authentication_method": 1,
+ "authentication_method": 2,
"provider": "http://localhost:8088/"
}
]
},
{
- "recovery_cost": "TESTKUDOS:0",
"methods": [
{
"authentication_method": 0,
- "provider": "http://localhost:8089/"
+ "provider": "http://localhost:8086/"
},
{
"authentication_method": 2,
@@ -194,17 +179,30 @@
]
},
{
- "recovery_cost": "TESTKUDOS:0",
"methods": [
{
- "authentication_method": 1,
- "provider": "http://localhost:8089/"
+ "authentication_method": 0,
+ "provider": "http://localhost:8086/"
},
{
- "authentication_method": 2,
- "provider": "http://localhost:8088/"
+ "authentication_method": 1,
+ "provider": "http://localhost:8087/"
}
]
}
+ ],
+ "policy_providers": [
+ {
+ "provider_url": "http://localhost:8086/"
+ },
+ {
+ "provider_url": "http://localhost:8087/"
+ },
+ {
+ "provider_url": "http://localhost:8088/"
+ },
+ {
+ "provider_url": "http://localhost:8089/"
+ }
]
}
diff --git a/src/cli/resources/06-backup.json b/src/cli/resources/06-backup.json
@@ -1,47 +1,71 @@
{
+ "reducer_type": "backup",
+ "backup_state": "SECRET_EDITING",
"continents": [
- "Europe",
- "North America",
- "Testcontinent"
+ {
+ "name": "Europe"
+ },
+ {
+ "name": "India"
+ },
+ {
+ "name": "Asia"
+ },
+ {
+ "name": "North America"
+ },
+ {
+ "name": "Demoworld"
+ }
],
- "backup_state": "SECRET_EDITING",
- "reducer_type": "backup",
- "selected_continent": "Testcontinent",
"countries": [
{
"code": "xx",
"name": "Testland",
- "continent": "Testcontinent",
- "continent_i18n": {
- "xx": "Testkontinent"
- },
- "name_i18n": {
- "de_DE": "Testlandt",
- "de_CH": "Testlandi",
- "fr": "Testpais",
- "en": "Testland"
- },
- "currency": "TESTKUDOS"
- },
- {
- "code": "xy",
- "name": "Demoland",
- "continent": "Testcontinent",
- "continent_i18n": {
- "xx": "Testkontinent"
- },
- "name_i18n": {
- "de_DE": "Demolandt",
- "de_CH": "Demolandi",
- "fr": "Demopais",
- "en": "Demoland"
- },
- "currency": "KUDOS"
+ "continent": "Demoworld",
+ "call_code": "+0"
+ }
+ ],
+ "required_attributes": [
+ {
+ "type": "string",
+ "name": "full_name",
+ "label": "Full name",
+ "widget": "anastasis_gtk_ia_full_name",
+ "uuid": "9e8f463f-575f-42cb-85f3-759559997331"
+ },
+ {
+ "type": "date",
+ "name": "birthdate",
+ "label": "Birthdate",
+ "widget": "anastasis_gtk_ia_birthdate",
+ "uuid": "83d655c7-bdb6-484d-904e-80c1058c8854"
+ },
+ {
+ "type": "string",
+ "name": "prime_number",
+ "label": "Prime number",
+ "widget": "anastasis_gtk_xx_prime",
+ "uuid": "39190a95-cacb-4412-8bae-1f7da3f980b4",
+ "tooltip": "Mathematics is fun",
+ "validation-regex": "^[0-9]+$",
+ "validation-logic": "XY_PRIME_check",
+ "optional": true
+ },
+ {
+ "type": "string",
+ "name": "sq_number",
+ "label": "Square number",
+ "widget": "anastasis_gtk_xx_square",
+ "uuid": "ed790bca-89bf-11eb-96f2-233996cf644e",
+ "tooltip": "Mathematics is fun",
+ "validation-regex": "^[0-9]+$",
+ "validation-logic": "XX_SQUARE_check"
}
],
"authentication_providers": {
"http://localhost:8086/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -51,14 +75,13 @@
"annual_fee": "TESTKUDOS:4.99",
"truth_upload_fee": "TESTKUDOS:0.01",
"liability_limit": "TESTKUDOS:1",
- "currency": "TESTKUDOS",
"business_name": "Data loss #1 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "F0HEYJQW81ZAZ3VYMZHFG8T1Z0",
+ "provider_salt": "7QK4QVG6HBDJVGFMDGC1AJMSCG",
"http_status": 200
},
"http://localhost:8087/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -68,14 +91,13 @@
"annual_fee": "TESTKUDOS:4.99",
"truth_upload_fee": "TESTKUDOS:0.01",
"liability_limit": "TESTKUDOS:1",
- "currency": "TESTKUDOS",
"business_name": "Data loss #2 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "D378FWXHJB8JHPQFQRZGGV9PWG",
+ "provider_salt": "C0X46TB9ENWDD5VFW1NXQEGDQ8",
"http_status": 200
},
"http://localhost:8088/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -85,14 +107,13 @@
"annual_fee": "TESTKUDOS:4.99",
"truth_upload_fee": "TESTKUDOS:0.01",
"liability_limit": "TESTKUDOS:1",
- "currency": "TESTKUDOS",
"business_name": "Data loss #3 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "7W9W4A4TTWSWRPJ76RNDPJHSPR",
+ "provider_salt": "65S8KJ1AEJGJTG3DCT9FSPDQDR",
"http_status": 200
},
"http://localhost:8089/": {
- "status" : "ok",
+ "status": "ok",
"methods": [
{
"type": "question",
@@ -102,100 +123,54 @@
"annual_fee": "TESTKUDOS:4.99",
"truth_upload_fee": "TESTKUDOS:0.01",
"liability_limit": "TESTKUDOS:1",
- "currency": "TESTKUDOS",
"business_name": "Data loss #4 Inc.",
"storage_limit_in_megabytes": 1,
- "provider_salt": "PN0VJF6KDSBYN40SGRCEXPB07M",
+ "provider_salt": "NJ7KTFQMAZVB835VBHCGDKCTF0",
"http_status": 200
}
},
- "selected_country": "xx",
- "currencies": ["TESTKUDOS"],
- "required_attributes": [
- {
- "type": "string",
- "name": "full_name",
- "label": "Full name",
- "label_i18n": {
- "de_DE": "Vollstaendiger Name",
- "de_CH": "Vollstaendiger Name"
- },
- "widget": "anastasis_gtk_ia_full_name"
- },
- {
- "type": "date",
- "name": "birthdate",
- "label": "Birthdate",
- "label_i18n": {
- "de_CH": "Geburtsdatum"
- },
- "widget": "anastasis_gtk_ia_birthdate"
- },
- {
- "type": "string",
- "name": "ahv_number",
- "label": "AHV number",
- "label_i18n": {
- "de_DE": "AHV-Nummer",
- "de_CH": "AHV-Nummer"
- },
- "widget": "anastasis_gtk_ia_ahv",
- "validation-regex": "^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
- "validation-logic": "CH_AHV_check"
- }
- ],
"identity_attributes": {
"full_name": "Max Musterman",
- "ahv_number": "756.9217.0769.85",
- "birth_year": 2000,
- "birth_month": 1,
- "birth_day": 1
+ "sq_number": "4",
+ "birthdate": "2000-01-01"
},
+ "selected_continent": "Demoworld",
+ "selected_country": "xx",
"authentication_methods": [
{
"type": "question",
- "instructions": "What's your name?",
- "challenge": "Hans"
+ "instructions": "What is your name?",
+ "challenge": "91GPWWR"
},
{
"type": "question",
- "instructions": "What's your X name?",
- "challenge": "Hansx"
+ "instructions": "How old are you?",
+ "challenge": "6GS0"
},
{
"type": "question",
"instructions": "Where do you live?",
- "challenge": "Mars"
- }
- ],
- "policy_providers" : [
- {
- "provider_url": "http://localhost:8089/"
- },
- {
- "provider_url": "http://localhost:8089/"
+ "challenge": "89JQ4VG"
}
],
"policies": [
{
- "recovery_cost": "TESTKUDOS:0",
"methods": [
{
- "authentication_method": 0,
- "provider": "http://localhost:8089/"
+ "authentication_method": 1,
+ "provider": "http://localhost:8087/"
},
{
- "authentication_method": 1,
+ "authentication_method": 2,
"provider": "http://localhost:8088/"
}
]
},
{
- "recovery_cost": "TESTKUDOS:0",
"methods": [
{
"authentication_method": 0,
- "provider": "http://localhost:8089/"
+ "provider": "http://localhost:8086/"
},
{
"authentication_method": 2,
@@ -204,17 +179,38 @@
]
},
{
- "recovery_cost": "TESTKUDOS:0",
"methods": [
{
- "authentication_method": 1,
- "provider": "http://localhost:8089/"
+ "authentication_method": 0,
+ "provider": "http://localhost:8086/"
},
{
- "authentication_method": 2,
- "provider": "http://localhost:8088/"
+ "authentication_method": 1,
+ "provider": "http://localhost:8087/"
}
]
}
- ]
+ ],
+ "policy_providers": [
+ {
+ "provider_url": "http://localhost:8086/"
+ },
+ {
+ "provider_url": "http://localhost:8087/"
+ },
+ {
+ "provider_url": "http://localhost:8088/"
+ },
+ {
+ "provider_url": "http://localhost:8089/"
+ }
+ ],
+ "upload_fees": [
+ {
+ "fee": "TESTKUDOS:19.99"
+ }
+ ],
+ "expiration": {
+ "t_s": 1817401537
+ }
}
diff --git a/src/cli/test_anastasis_reducer_enter_secret.sh b/src/cli/test_anastasis_reducer_enter_secret.sh
@@ -190,11 +190,13 @@ then
fi
FEES=$(jq -r -e '.upload_fees[0].fee' < "$UFILE")
-# 4x 4.99 for annual fees, plus 4x0.01 for truth uploads
-if [ "$FEES" != "TESTKUDOS:20" ]
+# 4x 4.99 for the annual fee of each of the four providers in the state,
+# plus 3x0.01 for the truth uploads: 06-backup.json has three authentication
+# methods and the reducer places each of them at a provider of its own.
+if [ "$FEES" != "TESTKUDOS:19.99" ]
then
jq -e . "$UFILE"
- exit_fail "Expected upload fees to be 'TESTKUDOS:20', got '$FEES'"
+ exit_fail "Expected upload fees to be 'TESTKUDOS:19.99', got '$FEES'"
fi