clarifications
This commit is contained in:
parent
f6032829cd
commit
d6702165b8
1 changed files with 15 additions and 15 deletions
|
@ -169,12 +169,12 @@ class JWTConfig(BaseModel):
|
||||||
return username
|
return username
|
||||||
|
|
||||||
|
|
||||||
class ToggleString(BaseModel):
|
class LockableString(BaseModel):
|
||||||
value: str
|
value: str
|
||||||
allow: bool
|
locked: bool
|
||||||
|
|
||||||
|
|
||||||
class ToggleCountry(ToggleString):
|
class LockableCountry(LockableString):
|
||||||
value: constr(max_length=2)
|
value: constr(max_length=2)
|
||||||
|
|
||||||
|
|
||||||
|
@ -183,11 +183,11 @@ class DNParts(BaseModel):
|
||||||
This server's "distinguished name"
|
This server's "distinguished name"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
country: ToggleCountry
|
country: LockableCountry
|
||||||
state: ToggleString
|
state: LockableString
|
||||||
city: ToggleString
|
city: LockableString
|
||||||
organization: ToggleString
|
organization: LockableString
|
||||||
organizational_unit: ToggleString
|
organizational_unit: LockableString
|
||||||
|
|
||||||
|
|
||||||
class CertificateAlgo(Enum):
|
class CertificateAlgo(Enum):
|
||||||
|
@ -200,15 +200,13 @@ class CertificateAlgo(Enum):
|
||||||
|
|
||||||
class CryptoConfig(BaseModel):
|
class CryptoConfig(BaseModel):
|
||||||
"""
|
"""
|
||||||
Configuration for hash algorithms
|
Configuration for cryptography
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# password hash algorithms
|
||||||
schemes: list[str] = ["bcrypt"]
|
schemes: list[str] = ["bcrypt"]
|
||||||
|
|
||||||
force_cipher: ToggleString
|
# pki settings
|
||||||
force_tls_cipher: ToggleString
|
|
||||||
force_auth: ToggleString
|
|
||||||
|
|
||||||
cert_algo: CertificateAlgo
|
cert_algo: CertificateAlgo
|
||||||
expiry_days: int
|
expiry_days: int
|
||||||
|
|
||||||
|
@ -225,13 +223,15 @@ class Config(BaseModel):
|
||||||
Configuration for `kiwi-vpn-api`
|
Configuration for `kiwi-vpn-api`
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# common name for the server
|
||||||
server_name: str
|
server_name: str
|
||||||
server_extra_config: dict[str, Any]
|
# may include client-to-client, cipher etc.
|
||||||
|
openvpn_extra_options: dict[str, Any]
|
||||||
|
|
||||||
db: DBConfig
|
db: DBConfig
|
||||||
jwt: JWTConfig
|
jwt: JWTConfig
|
||||||
crypto: CryptoConfig
|
crypto: CryptoConfig
|
||||||
dnparts: DNParts
|
default_dn: DNParts
|
||||||
|
|
||||||
__singleton: Config | None = None
|
__singleton: Config | None = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue