tba-profile-fido2-server 0.4.0.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tba_profile_fido2_server-0.4.0.dev2/PKG-INFO +21 -0
- tba_profile_fido2_server-0.4.0.dev2/README.md +4 -0
- tba_profile_fido2_server-0.4.0.dev2/pyproject.toml +15 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/__init__.py +44 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/algorithm_profile.py +9 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/attestation_profile.py +9 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/bindings.py +3 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/capability_map.py +36 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/certification.py +16 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/claims.py +5 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/compatibility.py +10 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/errors.py +5 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/features.py +14 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/metadata_profile.py +14 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/migrations.py +9 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/py.typed +1 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/requirements.py +19 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/schemas.py +13 -0
- tba_profile_fido2_server-0.4.0.dev2/src/tba_profile_fido2_server/versions.py +22 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tba-profile-fido2-server
|
|
3
|
+
Version: 0.4.0.dev2
|
|
4
|
+
Summary: Versioned FIDO2 server requirement and capability profile.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Requires-Python: >=3.10,<3.15
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
13
|
+
Requires-Dist: tba-contracts-identity (==0.4.0.dev2)
|
|
14
|
+
Requires-Dist: tba-protocol-webauthn (==0.4.0.dev2)
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# tba-profile-fido2-server
|
|
18
|
+
|
|
19
|
+
Aggregates versioned WebAuthn, authenticator, algorithm, attestation, metadata,
|
|
20
|
+
and certification requirements. It does not implement CTAP transports.
|
|
21
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "tba-profile-fido2-server"
|
|
3
|
+
version = "0.4.0.dev2"
|
|
4
|
+
description = "Versioned FIDO2 server requirement and capability profile."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10,<3.15"
|
|
7
|
+
license = "Apache-2.0"
|
|
8
|
+
dependencies = ["tba-protocol-webauthn==0.4.0.dev2", "tba-contracts-identity==0.4.0.dev2"]
|
|
9
|
+
|
|
10
|
+
[build-system]
|
|
11
|
+
requires = ["poetry-core>=1.0.0"]
|
|
12
|
+
build-backend = "poetry.core.masonry.api"
|
|
13
|
+
|
|
14
|
+
[tool.poetry]
|
|
15
|
+
packages = [{ include = "tba_profile_fido2_server", from = "src" }]
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from .algorithm_profile import (
|
|
2
|
+
RECOMMENDED_ALGORITHMS,
|
|
3
|
+
REQUIRED_ALGORITHMS,
|
|
4
|
+
algorithm_is_profiled,
|
|
5
|
+
)
|
|
6
|
+
from .attestation_profile import (
|
|
7
|
+
BASELINE_ATTESTATION_FORMATS,
|
|
8
|
+
CERTIFICATION_ATTESTATION_FORMATS,
|
|
9
|
+
)
|
|
10
|
+
from .bindings import CAPABILITY_REQUIREMENTS
|
|
11
|
+
from .certification import CertificationEvidence, certification_claimable
|
|
12
|
+
from .claims import CLAIM_NAMES
|
|
13
|
+
from .compatibility import compatible_revisions
|
|
14
|
+
from .errors import Fido2ServerProfileError
|
|
15
|
+
from .features import SERVER_FEATURES
|
|
16
|
+
from .metadata_profile import DEFAULT_METADATA_PROFILE, MetadataProfile
|
|
17
|
+
from .migrations import migration_path
|
|
18
|
+
from .requirements import DEFAULT_REQUIREMENTS, Fido2ServerRequirements
|
|
19
|
+
from .schemas import Fido2ServerProfile
|
|
20
|
+
from .versions import CURRENT_VERSION, FIDO2_SERVER_1_0, Fido2ServerRevision
|
|
21
|
+
|
|
22
|
+
__all__ = [
|
|
23
|
+
"BASELINE_ATTESTATION_FORMATS",
|
|
24
|
+
"CAPABILITY_REQUIREMENTS",
|
|
25
|
+
"CERTIFICATION_ATTESTATION_FORMATS",
|
|
26
|
+
"CURRENT_VERSION",
|
|
27
|
+
"CertificationEvidence",
|
|
28
|
+
"CLAIM_NAMES",
|
|
29
|
+
"DEFAULT_METADATA_PROFILE",
|
|
30
|
+
"DEFAULT_REQUIREMENTS",
|
|
31
|
+
"FIDO2_SERVER_1_0",
|
|
32
|
+
"Fido2ServerProfile",
|
|
33
|
+
"Fido2ServerProfileError",
|
|
34
|
+
"Fido2ServerRequirements",
|
|
35
|
+
"Fido2ServerRevision",
|
|
36
|
+
"MetadataProfile",
|
|
37
|
+
"RECOMMENDED_ALGORITHMS",
|
|
38
|
+
"REQUIRED_ALGORITHMS",
|
|
39
|
+
"SERVER_FEATURES",
|
|
40
|
+
"algorithm_is_profiled",
|
|
41
|
+
"certification_claimable",
|
|
42
|
+
"compatible_revisions",
|
|
43
|
+
"migration_path",
|
|
44
|
+
]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
BASELINE_ATTESTATION_FORMATS = ("none", "packed", "fido-u2f")
|
|
2
|
+
CERTIFICATION_ATTESTATION_FORMATS = BASELINE_ATTESTATION_FORMATS + (
|
|
3
|
+
"tpm",
|
|
4
|
+
"android-key",
|
|
5
|
+
"android-safetynet",
|
|
6
|
+
"apple",
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
__all__ = ["BASELINE_ATTESTATION_FORMATS", "CERTIFICATION_ATTESTATION_FORMATS"]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from tba_contracts_identity.capabilities import ProtocolCapabilityRequirement
|
|
2
|
+
|
|
3
|
+
from .versions import CURRENT_VERSION
|
|
4
|
+
|
|
5
|
+
CAPABILITY_REQUIREMENTS = (
|
|
6
|
+
ProtocolCapabilityRequirement(
|
|
7
|
+
"fido2-server",
|
|
8
|
+
CURRENT_VERSION.identifier,
|
|
9
|
+
"registration",
|
|
10
|
+
"WebAuthn registration",
|
|
11
|
+
"credential.public-key.registration",
|
|
12
|
+
"complete_public_key_registration",
|
|
13
|
+
"verified-public-key-registration",
|
|
14
|
+
),
|
|
15
|
+
ProtocolCapabilityRequirement(
|
|
16
|
+
"fido2-server",
|
|
17
|
+
CURRENT_VERSION.identifier,
|
|
18
|
+
"authentication",
|
|
19
|
+
"WebAuthn assertion",
|
|
20
|
+
"credential.public-key.authentication",
|
|
21
|
+
"complete_public_key_authentication",
|
|
22
|
+
"verified-public-key-assertion",
|
|
23
|
+
),
|
|
24
|
+
ProtocolCapabilityRequirement(
|
|
25
|
+
"fido2-server",
|
|
26
|
+
CURRENT_VERSION.identifier,
|
|
27
|
+
"metadata",
|
|
28
|
+
"AAGUID metadata",
|
|
29
|
+
"authenticator.attestation",
|
|
30
|
+
"resolve_authenticator_metadata",
|
|
31
|
+
"authenticator-metadata",
|
|
32
|
+
required=False,
|
|
33
|
+
),
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
__all__ = ["CAPABILITY_REQUIREMENTS"]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
@dataclass(frozen=True, slots=True)
|
|
5
|
+
class CertificationEvidence:
|
|
6
|
+
conformance_suite: str
|
|
7
|
+
version: str
|
|
8
|
+
passed: bool
|
|
9
|
+
evidence_uri: str | None = None
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def certification_claimable(evidence: CertificationEvidence | None) -> bool:
|
|
13
|
+
return bool(evidence and evidence.passed and evidence.evidence_uri)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
__all__ = ["CertificationEvidence", "certification_claimable"]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from .versions import CURRENT_VERSION, Fido2ServerRevision
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def compatible_revisions(
|
|
5
|
+
source: Fido2ServerRevision, target: Fido2ServerRevision = CURRENT_VERSION
|
|
6
|
+
) -> bool:
|
|
7
|
+
return source.webauthn_revision == target.webauthn_revision
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
__all__ = ["compatible_revisions"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
SERVER_FEATURES = frozenset(
|
|
2
|
+
{
|
|
3
|
+
"registration",
|
|
4
|
+
"authentication",
|
|
5
|
+
"discoverable-credentials",
|
|
6
|
+
"user-verification",
|
|
7
|
+
"backup-state",
|
|
8
|
+
"attestation-policy",
|
|
9
|
+
"metadata-status",
|
|
10
|
+
"credential-management",
|
|
11
|
+
}
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
__all__ = ["SERVER_FEATURES"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
@dataclass(frozen=True, slots=True)
|
|
5
|
+
class MetadataProfile:
|
|
6
|
+
service_identifier: str = "fido-mds"
|
|
7
|
+
signed_blob_required: bool = True
|
|
8
|
+
reject_compromised_authenticators: bool = True
|
|
9
|
+
cache_until_next_update: bool = True
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
DEFAULT_METADATA_PROFILE = MetadataProfile()
|
|
13
|
+
|
|
14
|
+
__all__ = ["DEFAULT_METADATA_PROFILE", "MetadataProfile"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
from .algorithm_profile import REQUIRED_ALGORITHMS
|
|
4
|
+
from .attestation_profile import BASELINE_ATTESTATION_FORMATS
|
|
5
|
+
from .versions import CURRENT_VERSION
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass(frozen=True, slots=True)
|
|
9
|
+
class Fido2ServerRequirements:
|
|
10
|
+
revision: str = CURRENT_VERSION.identifier
|
|
11
|
+
webauthn_revision: str = CURRENT_VERSION.webauthn_revision
|
|
12
|
+
required_algorithms: tuple[int, ...] = REQUIRED_ALGORITHMS
|
|
13
|
+
attestation_formats: tuple[str, ...] = BASELINE_ATTESTATION_FORMATS
|
|
14
|
+
direct_ctap_transport: bool = False
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
DEFAULT_REQUIREMENTS = Fido2ServerRequirements()
|
|
18
|
+
|
|
19
|
+
__all__ = ["DEFAULT_REQUIREMENTS", "Fido2ServerRequirements"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
from .requirements import Fido2ServerRequirements
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@dataclass(frozen=True, slots=True)
|
|
7
|
+
class Fido2ServerProfile:
|
|
8
|
+
requirements: Fido2ServerRequirements = Fido2ServerRequirements()
|
|
9
|
+
metadata_enabled: bool = False
|
|
10
|
+
certification_evidence_uri: str | None = None
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
__all__ = ["Fido2ServerProfile"]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
@dataclass(frozen=True, slots=True)
|
|
5
|
+
class Fido2ServerRevision:
|
|
6
|
+
identifier: str
|
|
7
|
+
webauthn_revision: str
|
|
8
|
+
ctap_authenticator_revisions: tuple[str, ...]
|
|
9
|
+
status: str
|
|
10
|
+
specification_uri: str
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
FIDO2_SERVER_1_0 = Fido2ServerRevision(
|
|
14
|
+
"fido2-server-1.0",
|
|
15
|
+
"level-2",
|
|
16
|
+
("CTAP 2.0", "CTAP 2.1"),
|
|
17
|
+
"implementation profile",
|
|
18
|
+
"https://fidoalliance.org/specifications/",
|
|
19
|
+
)
|
|
20
|
+
CURRENT_VERSION = FIDO2_SERVER_1_0
|
|
21
|
+
|
|
22
|
+
__all__ = ["CURRENT_VERSION", "FIDO2_SERVER_1_0", "Fido2ServerRevision"]
|