1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

defs/webauthn: initialize with new data

This commit is contained in:
Pavol Rusnak 2019-03-09 19:00:28 +01:00
parent d60ac958a2
commit 4e2741505a
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
37 changed files with 140 additions and 0 deletions

View File

@ -0,0 +1,4 @@
{
"label": "Bitbucket",
"u2f": "https://bitbucket.org"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,4 @@
{
"label": "Bitfinex",
"u2f": "https://www.bitfinex.com"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1,4 @@
{
"label": "Bitwarden",
"u2f": "https://vault.bitwarden.com/app-id.json"
}

View File

@ -0,0 +1,4 @@
{
"label": "Dashlane",
"u2f": "https://www.dashlane.com"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -0,0 +1,5 @@
{
"label": "Dropbox",
"u2f": "https://www.dropbox.com/u2f-app-id.json",
"webauthn": "www.dropbox.com"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,4 @@
{
"label": "Duo",
"u2f": "https://api-9dcf9b83.duosecurity.com"
}

BIN
defs/webauthn/apps/duo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -0,0 +1,4 @@
{
"label": "FastMail",
"u2f": "https://www.fastmail.com"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -0,0 +1,4 @@
{
"label": "Fedora",
"u2f": "https://id.fedoraproject.org/u2f-origins.json"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,4 @@
{
"label": "Gandi",
"u2f": "https://account.gandi.net/api/u2f/trusted_facets.json"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,4 @@
{
"label": "GitHub",
"u2f": "https://github.com/u2f/trusted_facets"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -0,0 +1,4 @@
{
"label": "GitLab",
"u2f": "https://gitlab.com"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -0,0 +1,4 @@
{
"label": "Google",
"u2f": "https://www.gstatic.com/securitykey/origins.json"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,4 @@
{
"label": "Keeper",
"u2f": "https://keepersecurity.com"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -0,0 +1,4 @@
{
"label": "LastPass",
"u2f": "https://lastpass.com"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@ -0,0 +1,4 @@
{
"label": "Slush Pool",
"u2f": "https://slushpool.com/static/security/u2f.json"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,4 @@
{
"label": "Stripe",
"u2f": "https://dashboard.stripe.com"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,4 @@
{
"label": "u2f.bin.coffee",
"u2f": "https://u2f.bin.coffee"
}

View File

@ -0,0 +1,4 @@
{
"label": "webauthn.bin.coffee",
"webauthn": "webauthn.bin.coffee"
}

View File

@ -0,0 +1,4 @@
{
"label": "WebAuthn.io",
"webauthn": "webauthn.io"
}

View File

@ -0,0 +1,4 @@
{
"label": "WebAuthn.me",
"webauthn": "webauthn.me"
}

View File

@ -0,0 +1,4 @@
{
"label": "demo.yubico.com",
"webauthn": "demo.yubico.com"
}

55
defs/webauthn/gen.py Executable file
View File

@ -0,0 +1,55 @@
#!/usr/bin/env python3
import sys
from glob import glob
import json
from hashlib import sha256
try:
opt = sys.argv[1]
except:
print("Usage: gen.py [core|mcu|check])")
sys.exit(1)
def c_bytes(h):
return "{ " + ", ".join(["0x%02x" % x for x in h]) + " }"
def gen_core(data):
print("_knownapps = {")
print(" # U2F")
for d in data:
if "u2f" in d:
url, label = d["u2f"], d["label"]
print(" \"%s\": \"%s\"," % (url, label))
print(" # WebAuthn")
for d in data:
if "webauthn" in d:
origin, label = d["webauthn"], d["label"]
print(" \"%s\": \"%s\"," % (origin, label))
print("}")
def gen_mcu(data):
for d in data:
if "u2f" in d:
url, label = d["u2f"], 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"]
h = sha256(origin.encode()).digest()
print("\t{\n\t\t// WebAuthn: %s\n\t\t%s,\n\t\t\"%s\"\n\t}," % (origin, c_bytes(h), label))
data = []
for fn in sorted(glob("apps/*.json")):
d = json.load(open(fn, "rt"))
data.append(d)
if opt == "core":
gen_core(data)
elif opt == "mcu":
gen_mcu(data)