chore: import MCTF services

- Added all seven issued service trees without omissions.
- Preserved the supplied runtime configuration, binaries, and assets.
This commit is contained in:
TakuyaYagam1 committed 2026-11-29 12:25:29 +03:00
commit 13f936bee9
1222 files changed
+21280

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import re
from datetime import timedelta
LIFETIME = timedelta(seconds=60)
AUTH_LIFETIME = timedelta(hours=12)
AUTH_AUDIENCE = "chrome-ledger"
HEX_CHALLENGE = re.compile(r"[0-9a-fA-F]{64}")
+4
View File
@@ -0,0 +1,4 @@
class LedgerError(Exception):
def __init__(self, status, message):
super().__init__(message)
self.status = status
+17
View File
@@ -0,0 +1,17 @@
import unicodedata
from datetime import UTC, datetime
def utc_now():
return datetime.now(UTC)
def account_namespace(username):
return unicodedata.normalize("NFKC", username).casefold()
def valid_text(value, minimum, maximum):
if not isinstance(value, str):
return False
if len(value) < minimum or len(value) > maximum:
return False
return value.isascii()