diff --git a/common/defs/webauthn/apps/binance.json b/common/defs/webauthn/apps/binance.json index 39477a49e3..b57b7bca5f 100644 --- a/common/defs/webauthn/apps/binance.json +++ b/common/defs/webauthn/apps/binance.json @@ -1,5 +1,5 @@ { "label": "Binance", - "webauthn": "www.binance.com", + "webauthn": ["www.binance.com"], "use_sign_count": false } diff --git a/common/defs/webauthn/apps/bitbucket.json b/common/defs/webauthn/apps/bitbucket.json index e5e7a0bff4..309dd7888e 100644 --- a/common/defs/webauthn/apps/bitbucket.json +++ b/common/defs/webauthn/apps/bitbucket.json @@ -1,4 +1,4 @@ { "label": "Bitbucket", - "u2f": "https://bitbucket.org" + "u2f": ["https://bitbucket.org"] } diff --git a/common/defs/webauthn/apps/bitfinex.json b/common/defs/webauthn/apps/bitfinex.json index c144860bcd..21bc5935eb 100644 --- a/common/defs/webauthn/apps/bitfinex.json +++ b/common/defs/webauthn/apps/bitfinex.json @@ -1,4 +1,4 @@ { "label": "Bitfinex", - "u2f": "https://www.bitfinex.com" + "u2f": ["https://www.bitfinex.com"] } diff --git a/common/defs/webauthn/apps/bitwarden.json b/common/defs/webauthn/apps/bitwarden.json index 12f185f891..901c18bc45 100644 --- a/common/defs/webauthn/apps/bitwarden.json +++ b/common/defs/webauthn/apps/bitwarden.json @@ -1,4 +1,4 @@ { "label": "Bitwarden", - "u2f": "https://vault.bitwarden.com/app-id.json" + "u2f": ["https://vault.bitwarden.com/app-id.json"] } diff --git a/common/defs/webauthn/apps/dashlane.json b/common/defs/webauthn/apps/dashlane.json index 6969adfe37..dd8293d84e 100644 --- a/common/defs/webauthn/apps/dashlane.json +++ b/common/defs/webauthn/apps/dashlane.json @@ -1,4 +1,4 @@ { "label": "Dashlane", - "u2f": "https://www.dashlane.com" + "u2f": ["https://www.dashlane.com"] } diff --git a/common/defs/webauthn/apps/dropbox.json b/common/defs/webauthn/apps/dropbox.json index e97f52884b..a5be49143a 100644 --- a/common/defs/webauthn/apps/dropbox.json +++ b/common/defs/webauthn/apps/dropbox.json @@ -1,5 +1,5 @@ { "label": "Dropbox", - "u2f": "https://www.dropbox.com/u2f-app-id.json", - "webauthn": "www.dropbox.com" + "u2f": ["https://www.dropbox.com/u2f-app-id.json"], + "webauthn": ["www.dropbox.com"] } diff --git a/common/defs/webauthn/apps/duo.json b/common/defs/webauthn/apps/duo.json index 51d83661c5..a04432e819 100644 --- a/common/defs/webauthn/apps/duo.json +++ b/common/defs/webauthn/apps/duo.json @@ -1,4 +1,4 @@ { "label": "Duo", - "u2f": "https://api-9dcf9b83.duosecurity.com" + "u2f": ["https://api-9dcf9b83.duosecurity.com"] } diff --git a/common/defs/webauthn/apps/fastmail.json b/common/defs/webauthn/apps/fastmail.json index 2e3d2e8f32..f31f90f388 100644 --- a/common/defs/webauthn/apps/fastmail.json +++ b/common/defs/webauthn/apps/fastmail.json @@ -1,4 +1,4 @@ { "label": "FastMail", - "u2f": "https://www.fastmail.com" + "u2f": ["https://www.fastmail.com"] } diff --git a/common/defs/webauthn/apps/fedora.json b/common/defs/webauthn/apps/fedora.json index b1c9213938..3a1da08aa2 100644 --- a/common/defs/webauthn/apps/fedora.json +++ b/common/defs/webauthn/apps/fedora.json @@ -1,4 +1,4 @@ { "label": "Fedora", - "u2f": "https://id.fedoraproject.org/u2f-origins.json" + "u2f": ["https://id.fedoraproject.org/u2f-origins.json"] } diff --git a/common/defs/webauthn/apps/gandi.json b/common/defs/webauthn/apps/gandi.json index 9f27a26680..bc329c242f 100644 --- a/common/defs/webauthn/apps/gandi.json +++ b/common/defs/webauthn/apps/gandi.json @@ -1,4 +1,4 @@ { "label": "Gandi", - "u2f": "https://account.gandi.net/api/u2f/trusted_facets.json" + "u2f": ["https://account.gandi.net/api/u2f/trusted_facets.json"] } diff --git a/common/defs/webauthn/apps/github.json b/common/defs/webauthn/apps/github.json index 0f63bf22fd..123241068e 100644 --- a/common/defs/webauthn/apps/github.json +++ b/common/defs/webauthn/apps/github.json @@ -1,6 +1,6 @@ { "label": "GitHub", - "u2f": "https://github.com/u2f/trusted_facets", - "webauthn": "github.com", + "u2f": ["https://github.com/u2f/trusted_facets"], + "webauthn": ["github.com"], "use_sign_count": true } diff --git a/common/defs/webauthn/apps/gitlab.json b/common/defs/webauthn/apps/gitlab.json index 261f3fa334..7f2ba750e8 100644 --- a/common/defs/webauthn/apps/gitlab.json +++ b/common/defs/webauthn/apps/gitlab.json @@ -1,4 +1,4 @@ { "label": "GitLab", - "u2f": "https://gitlab.com" + "u2f": ["https://gitlab.com"] } diff --git a/common/defs/webauthn/apps/google.json b/common/defs/webauthn/apps/google.json index e99b2e5f9f..6449bc472a 100644 --- a/common/defs/webauthn/apps/google.json +++ b/common/defs/webauthn/apps/google.json @@ -1,5 +1,5 @@ { "label": "Google", - "u2f": "https://www.gstatic.com/securitykey/origins.json", - "webauthn": "google.com" + "u2f": ["https://www.gstatic.com/securitykey/origins.json"], + "webauthn": ["google.com"] } diff --git a/common/defs/webauthn/apps/keeper.json b/common/defs/webauthn/apps/keeper.json index 97677a061b..bec466e12f 100644 --- a/common/defs/webauthn/apps/keeper.json +++ b/common/defs/webauthn/apps/keeper.json @@ -1,4 +1,4 @@ { "label": "Keeper", - "u2f": "https://keepersecurity.com" + "u2f": ["https://keepersecurity.com"] } diff --git a/common/defs/webauthn/apps/lastpass.json b/common/defs/webauthn/apps/lastpass.json index 721de8a75d..7e312c358f 100644 --- a/common/defs/webauthn/apps/lastpass.json +++ b/common/defs/webauthn/apps/lastpass.json @@ -1,4 +1,4 @@ { "label": "LastPass", - "u2f": "https://lastpass.com" + "u2f": ["https://lastpass.com"] } diff --git a/common/defs/webauthn/apps/login.gov.json b/common/defs/webauthn/apps/login.gov.json index c892da4207..8407d00a85 100644 --- a/common/defs/webauthn/apps/login.gov.json +++ b/common/defs/webauthn/apps/login.gov.json @@ -1,4 +1,4 @@ { "label": "login.gov", - "webauthn": "secure.login.gov" + "webauthn": ["secure.login.gov"] } diff --git a/common/defs/webauthn/apps/microsoft.json b/common/defs/webauthn/apps/microsoft.json index 719023fafc..bf29641046 100644 --- a/common/defs/webauthn/apps/microsoft.json +++ b/common/defs/webauthn/apps/microsoft.json @@ -1,5 +1,5 @@ { "label": "Microsoft", - "webauthn": "login.microsoft.com", + "webauthn": ["login.microsoft.com"], "use_sign_count": false } diff --git a/common/defs/webauthn/apps/slushpool.json b/common/defs/webauthn/apps/slushpool.json index c821da7690..54fcf24565 100644 --- a/common/defs/webauthn/apps/slushpool.json +++ b/common/defs/webauthn/apps/slushpool.json @@ -1,4 +1,4 @@ { "label": "Slush Pool", - "u2f": "https://slushpool.com/static/security/u2f.json" + "u2f": ["https://slushpool.com/static/security/u2f.json"] } diff --git a/common/defs/webauthn/apps/stripe.json b/common/defs/webauthn/apps/stripe.json index 403696c7f2..7169bad37b 100644 --- a/common/defs/webauthn/apps/stripe.json +++ b/common/defs/webauthn/apps/stripe.json @@ -1,4 +1,4 @@ { "label": "Stripe", - "u2f": "https://dashboard.stripe.com" + "u2f": ["https://dashboard.stripe.com"] } diff --git a/common/defs/webauthn/apps/u2f.bin.coffee.json b/common/defs/webauthn/apps/u2f.bin.coffee.json index 6fecab4647..1edb18e707 100644 --- a/common/defs/webauthn/apps/u2f.bin.coffee.json +++ b/common/defs/webauthn/apps/u2f.bin.coffee.json @@ -1,4 +1,4 @@ { "label": "u2f.bin.coffee", - "u2f": "https://u2f.bin.coffee" + "u2f": ["https://u2f.bin.coffee"] } diff --git a/common/defs/webauthn/apps/webauthn.bin.coffee.json b/common/defs/webauthn/apps/webauthn.bin.coffee.json index 716aa0c8d6..6542db9239 100644 --- a/common/defs/webauthn/apps/webauthn.bin.coffee.json +++ b/common/defs/webauthn/apps/webauthn.bin.coffee.json @@ -1,4 +1,4 @@ { "label": "webauthn.bin.coffee", - "webauthn": "webauthn.bin.coffee" + "webauthn": ["webauthn.bin.coffee"] } diff --git a/common/defs/webauthn/apps/webauthn.io.json b/common/defs/webauthn/apps/webauthn.io.json index 71ab058571..70ec5929ca 100644 --- a/common/defs/webauthn/apps/webauthn.io.json +++ b/common/defs/webauthn/apps/webauthn.io.json @@ -1,4 +1,4 @@ { "label": "WebAuthn.io", - "webauthn": "webauthn.io" + "webauthn": ["webauthn.io"] } diff --git a/common/defs/webauthn/apps/webauthn.me.json b/common/defs/webauthn/apps/webauthn.me.json index 3d658d2771..212f0e2880 100644 --- a/common/defs/webauthn/apps/webauthn.me.json +++ b/common/defs/webauthn/apps/webauthn.me.json @@ -1,4 +1,4 @@ { "label": "WebAuthn.me", - "webauthn": "webauthn.me" + "webauthn": ["webauthn.me"] } diff --git a/common/defs/webauthn/apps/yubico-demo.json b/common/defs/webauthn/apps/yubico-demo.json index bb40392d67..34f3a25f1a 100644 --- a/common/defs/webauthn/apps/yubico-demo.json +++ b/common/defs/webauthn/apps/yubico-demo.json @@ -1,4 +1,4 @@ { "label": "demo.yubico.com", - "webauthn": "demo.yubico.com" + "webauthn": ["demo.yubico.com"] } diff --git a/common/defs/webauthn/gen.py b/common/defs/webauthn/gen.py index 994cae37a7..2202d38b32 100755 --- a/common/defs/webauthn/gen.py +++ b/common/defs/webauthn/gen.py @@ -19,17 +19,13 @@ def gen_core(data): print("_knownapps = {") print(" # U2F") for d in data: - if "u2f" in d: - url, label = d["u2f"], d["label"] + for url in d.get("u2f", []): + label = d["label"] print(' "%s": {"label": "%s", "use_sign_count": True},' % (url, label)) print(" # WebAuthn") for d in data: - if "webauthn" in d: - origin, label, use_sign_count = ( - d["webauthn"], - d["label"], - d.get("use_sign_count", None), - ) + for origin in d.get("webauthn", []): + label, use_sign_count = (d["label"], d.get("use_sign_count", None)) if use_sign_count is None: print(' "%s": {"label": "%s"},' % (origin, label)) else: @@ -42,15 +38,15 @@ def gen_core(data): def gen_mcu(data): for d in data: - if "u2f" in d: - url, label = d["u2f"], d["label"] + for url in d.get("u2f", []): + label = d["label"] h = sha256(url.encode()).digest() print( '\t{\n\t\t// U2F: %s\n\t\t%s,\n\t\t"%s"\n\t},' % (url, c_bytes(h), label) ) - if "webauthn" in d: - origin, label = d["webauthn"], d["label"] + for origin in d.get("webauthn", []): + label = d["label"] h = sha256(origin.encode()).digest() print( '\t{\n\t\t// WebAuthn: %s\n\t\t%s,\n\t\t"%s"\n\t},'