mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
common/webauthn: Allow multiple URLs per app.
This commit is contained in:
parent
528ee9ccf1
commit
839c6cdac5
@ -1,5 +1,5 @@
|
||||
{
|
||||
"label": "Binance",
|
||||
"webauthn": "www.binance.com",
|
||||
"webauthn": ["www.binance.com"],
|
||||
"use_sign_count": false
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Bitbucket",
|
||||
"u2f": "https://bitbucket.org"
|
||||
"u2f": ["https://bitbucket.org"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Bitfinex",
|
||||
"u2f": "https://www.bitfinex.com"
|
||||
"u2f": ["https://www.bitfinex.com"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Bitwarden",
|
||||
"u2f": "https://vault.bitwarden.com/app-id.json"
|
||||
"u2f": ["https://vault.bitwarden.com/app-id.json"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Dashlane",
|
||||
"u2f": "https://www.dashlane.com"
|
||||
"u2f": ["https://www.dashlane.com"]
|
||||
}
|
||||
|
@ -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"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Duo",
|
||||
"u2f": "https://api-9dcf9b83.duosecurity.com"
|
||||
"u2f": ["https://api-9dcf9b83.duosecurity.com"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "FastMail",
|
||||
"u2f": "https://www.fastmail.com"
|
||||
"u2f": ["https://www.fastmail.com"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Fedora",
|
||||
"u2f": "https://id.fedoraproject.org/u2f-origins.json"
|
||||
"u2f": ["https://id.fedoraproject.org/u2f-origins.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"]
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "GitLab",
|
||||
"u2f": "https://gitlab.com"
|
||||
"u2f": ["https://gitlab.com"]
|
||||
}
|
||||
|
@ -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"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Keeper",
|
||||
"u2f": "https://keepersecurity.com"
|
||||
"u2f": ["https://keepersecurity.com"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "LastPass",
|
||||
"u2f": "https://lastpass.com"
|
||||
"u2f": ["https://lastpass.com"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "login.gov",
|
||||
"webauthn": "secure.login.gov"
|
||||
"webauthn": ["secure.login.gov"]
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"label": "Microsoft",
|
||||
"webauthn": "login.microsoft.com",
|
||||
"webauthn": ["login.microsoft.com"],
|
||||
"use_sign_count": false
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Slush Pool",
|
||||
"u2f": "https://slushpool.com/static/security/u2f.json"
|
||||
"u2f": ["https://slushpool.com/static/security/u2f.json"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Stripe",
|
||||
"u2f": "https://dashboard.stripe.com"
|
||||
"u2f": ["https://dashboard.stripe.com"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "u2f.bin.coffee",
|
||||
"u2f": "https://u2f.bin.coffee"
|
||||
"u2f": ["https://u2f.bin.coffee"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "webauthn.bin.coffee",
|
||||
"webauthn": "webauthn.bin.coffee"
|
||||
"webauthn": ["webauthn.bin.coffee"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "WebAuthn.io",
|
||||
"webauthn": "webauthn.io"
|
||||
"webauthn": ["webauthn.io"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "WebAuthn.me",
|
||||
"webauthn": "webauthn.me"
|
||||
"webauthn": ["webauthn.me"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "demo.yubico.com",
|
||||
"webauthn": "demo.yubico.com"
|
||||
"webauthn": ["demo.yubico.com"]
|
||||
}
|
||||
|
@ -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},'
|
||||
|
Loading…
Reference in New Issue
Block a user