Skip to content

certified.models — Configuration Models

Pydantic models for the YAML config files stored in known_servers/ and known_clients/.

TrustedService

Bases: BaseModel

Defines a service provider. Used by clients to determine how to connect with the service.

Use the biscuit layer (Baker, BiscuitAuthz, Critic) for authorisation — not this record.

Source code in certified/models.py
10
11
12
13
14
15
16
17
18
19
20
21
22
class TrustedService(BaseModel):
    """
    Defines a service provider.  Used by clients to determine
    how to connect with the service.

    Use the biscuit layer (`Baker`, `BiscuitAuthz`, `Critic`) for
    authorisation — not this record.
    """
    model_config = ConfigDict(extra='ignore')

    url   : str # server location
    cert  : Optional[str] = None # server b64-der certificate (or CA)
    auths : List[str] = [] # names of validators recognized by this service

TrustedClient

Bases: BaseModel

Defines a known client.

Source code in certified/models.py
4
5
6
7
8
class TrustedClient(BaseModel):
    """Defines a known client."""
    model_config = ConfigDict(extra='ignore')

    cert : str # client b64-der certificate

LokiConfig

Bases: BaseModel

Source code in certified/models.py
24
25
26
27
class LokiConfig(BaseModel):
    url    : str # loki server location
    user   : str # username to connect with
    passwd : SecretStr # password to send