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",
|
"label": "Binance",
|
||||||
"webauthn": "www.binance.com",
|
"webauthn": ["www.binance.com"],
|
||||||
"use_sign_count": false
|
"use_sign_count": false
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "Bitbucket",
|
"label": "Bitbucket",
|
||||||
"u2f": "https://bitbucket.org"
|
"u2f": ["https://bitbucket.org"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "Bitfinex",
|
"label": "Bitfinex",
|
||||||
"u2f": "https://www.bitfinex.com"
|
"u2f": ["https://www.bitfinex.com"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "Bitwarden",
|
"label": "Bitwarden",
|
||||||
"u2f": "https://vault.bitwarden.com/app-id.json"
|
"u2f": ["https://vault.bitwarden.com/app-id.json"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "Dashlane",
|
"label": "Dashlane",
|
||||||
"u2f": "https://www.dashlane.com"
|
"u2f": ["https://www.dashlane.com"]
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"label": "Dropbox",
|
"label": "Dropbox",
|
||||||
"u2f": "https://www.dropbox.com/u2f-app-id.json",
|
"u2f": ["https://www.dropbox.com/u2f-app-id.json"],
|
||||||
"webauthn": "www.dropbox.com"
|
"webauthn": ["www.dropbox.com"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "Duo",
|
"label": "Duo",
|
||||||
"u2f": "https://api-9dcf9b83.duosecurity.com"
|
"u2f": ["https://api-9dcf9b83.duosecurity.com"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "FastMail",
|
"label": "FastMail",
|
||||||
"u2f": "https://www.fastmail.com"
|
"u2f": ["https://www.fastmail.com"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "Fedora",
|
"label": "Fedora",
|
||||||
"u2f": "https://id.fedoraproject.org/u2f-origins.json"
|
"u2f": ["https://id.fedoraproject.org/u2f-origins.json"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "Gandi",
|
"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",
|
"label": "GitHub",
|
||||||
"u2f": "https://github.com/u2f/trusted_facets",
|
"u2f": ["https://github.com/u2f/trusted_facets"],
|
||||||
"webauthn": "github.com",
|
"webauthn": ["github.com"],
|
||||||
"use_sign_count": true
|
"use_sign_count": true
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "GitLab",
|
"label": "GitLab",
|
||||||
"u2f": "https://gitlab.com"
|
"u2f": ["https://gitlab.com"]
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"label": "Google",
|
"label": "Google",
|
||||||
"u2f": "https://www.gstatic.com/securitykey/origins.json",
|
"u2f": ["https://www.gstatic.com/securitykey/origins.json"],
|
||||||
"webauthn": "google.com"
|
"webauthn": ["google.com"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "Keeper",
|
"label": "Keeper",
|
||||||
"u2f": "https://keepersecurity.com"
|
"u2f": ["https://keepersecurity.com"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "LastPass",
|
"label": "LastPass",
|
||||||
"u2f": "https://lastpass.com"
|
"u2f": ["https://lastpass.com"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "login.gov",
|
"label": "login.gov",
|
||||||
"webauthn": "secure.login.gov"
|
"webauthn": ["secure.login.gov"]
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"label": "Microsoft",
|
"label": "Microsoft",
|
||||||
"webauthn": "login.microsoft.com",
|
"webauthn": ["login.microsoft.com"],
|
||||||
"use_sign_count": false
|
"use_sign_count": false
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "Slush Pool",
|
"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",
|
"label": "Stripe",
|
||||||
"u2f": "https://dashboard.stripe.com"
|
"u2f": ["https://dashboard.stripe.com"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "u2f.bin.coffee",
|
"label": "u2f.bin.coffee",
|
||||||
"u2f": "https://u2f.bin.coffee"
|
"u2f": ["https://u2f.bin.coffee"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "webauthn.bin.coffee",
|
"label": "webauthn.bin.coffee",
|
||||||
"webauthn": "webauthn.bin.coffee"
|
"webauthn": ["webauthn.bin.coffee"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "WebAuthn.io",
|
"label": "WebAuthn.io",
|
||||||
"webauthn": "webauthn.io"
|
"webauthn": ["webauthn.io"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "WebAuthn.me",
|
"label": "WebAuthn.me",
|
||||||
"webauthn": "webauthn.me"
|
"webauthn": ["webauthn.me"]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"label": "demo.yubico.com",
|
"label": "demo.yubico.com",
|
||||||
"webauthn": "demo.yubico.com"
|
"webauthn": ["demo.yubico.com"]
|
||||||
}
|
}
|
||||||
|
@ -19,17 +19,13 @@ def gen_core(data):
|
|||||||
print("_knownapps = {")
|
print("_knownapps = {")
|
||||||
print(" # U2F")
|
print(" # U2F")
|
||||||
for d in data:
|
for d in data:
|
||||||
if "u2f" in d:
|
for url in d.get("u2f", []):
|
||||||
url, label = d["u2f"], d["label"]
|
label = d["label"]
|
||||||
print(' "%s": {"label": "%s", "use_sign_count": True},' % (url, label))
|
print(' "%s": {"label": "%s", "use_sign_count": True},' % (url, label))
|
||||||
print(" # WebAuthn")
|
print(" # WebAuthn")
|
||||||
for d in data:
|
for d in data:
|
||||||
if "webauthn" in d:
|
for origin in d.get("webauthn", []):
|
||||||
origin, label, use_sign_count = (
|
label, use_sign_count = (d["label"], d.get("use_sign_count", None))
|
||||||
d["webauthn"],
|
|
||||||
d["label"],
|
|
||||||
d.get("use_sign_count", None),
|
|
||||||
)
|
|
||||||
if use_sign_count is None:
|
if use_sign_count is None:
|
||||||
print(' "%s": {"label": "%s"},' % (origin, label))
|
print(' "%s": {"label": "%s"},' % (origin, label))
|
||||||
else:
|
else:
|
||||||
@ -42,15 +38,15 @@ def gen_core(data):
|
|||||||
|
|
||||||
def gen_mcu(data):
|
def gen_mcu(data):
|
||||||
for d in data:
|
for d in data:
|
||||||
if "u2f" in d:
|
for url in d.get("u2f", []):
|
||||||
url, label = d["u2f"], d["label"]
|
label = d["label"]
|
||||||
h = sha256(url.encode()).digest()
|
h = sha256(url.encode()).digest()
|
||||||
print(
|
print(
|
||||||
'\t{\n\t\t// U2F: %s\n\t\t%s,\n\t\t"%s"\n\t},'
|
'\t{\n\t\t// U2F: %s\n\t\t%s,\n\t\t"%s"\n\t},'
|
||||||
% (url, c_bytes(h), label)
|
% (url, c_bytes(h), label)
|
||||||
)
|
)
|
||||||
if "webauthn" in d:
|
for origin in d.get("webauthn", []):
|
||||||
origin, label = d["webauthn"], d["label"]
|
label = d["label"]
|
||||||
h = sha256(origin.encode()).digest()
|
h = sha256(origin.encode()).digest()
|
||||||
print(
|
print(
|
||||||
'\t{\n\t\t// WebAuthn: %s\n\t\t%s,\n\t\t"%s"\n\t},'
|
'\t{\n\t\t// WebAuthn: %s\n\t\t%s,\n\t\t"%s"\n\t},'
|
||||||
|
Loading…
Reference in New Issue
Block a user