feat(protocol): define native session credentials
This commit is contained in:
@@ -178,6 +178,50 @@
|
||||
"refresh_expires_at": {"type": "string", "format": "date-time", "maxLength": 64}
|
||||
}
|
||||
},
|
||||
"NativeSessionIdentity": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["client_device_id", "device_key_id"],
|
||||
"properties": {
|
||||
"client_device_id": {"type": "string", "minLength": 1, "maxLength": 128},
|
||||
"device_key_id": {"type": "string", "minLength": 1, "maxLength": 128}
|
||||
}
|
||||
},
|
||||
"BrowserAuthenticatedSession": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["username", "provider", "roles", "role"],
|
||||
"properties": {
|
||||
"username": {"type": "string", "minLength": 1, "maxLength": 256},
|
||||
"provider": {"type": "string", "minLength": 1, "maxLength": 64},
|
||||
"roles": {"type": "array", "maxItems": 16, "items": {"type": "string", "minLength": 1, "maxLength": 64, "x-max-bytes": 64}},
|
||||
"role": {"type": "string", "enum": ["user", "admin"]}
|
||||
}
|
||||
},
|
||||
"NativeAuthenticatedSession": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["username", "provider", "roles", "role", "native_identity"],
|
||||
"properties": {
|
||||
"username": {"type": "string", "minLength": 1, "maxLength": 256},
|
||||
"provider": {"type": "string", "minLength": 1, "maxLength": 64},
|
||||
"roles": {"type": "array", "maxItems": 16, "items": {"type": "string", "minLength": 1, "maxLength": 64, "x-max-bytes": 64}},
|
||||
"role": {"type": "string", "enum": ["user", "admin"]},
|
||||
"native_identity": {"$ref": "#/$defs/NativeSessionIdentity"}
|
||||
}
|
||||
},
|
||||
"NativeTunnelCredential": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["client_device_id", "device_key_id", "certificate_chain_pem", "trust_bundle_pem", "expires_at"],
|
||||
"properties": {
|
||||
"client_device_id": {"type": "string", "minLength": 1, "maxLength": 128},
|
||||
"device_key_id": {"type": "string", "minLength": 1, "maxLength": 128},
|
||||
"certificate_chain_pem": {"type": "string", "minLength": 1, "maxLength": 65536},
|
||||
"trust_bundle_pem": {"type": "string", "minLength": 1, "maxLength": 65536},
|
||||
"expires_at": {"type": "string", "format": "date-time", "maxLength": 64}
|
||||
}
|
||||
},
|
||||
"DisplayMode": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
@@ -191,13 +235,12 @@
|
||||
"SessionRequest": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["client_device_id", "device_key_id", "pool_id", "idempotency_key", "policy_snapshot"],
|
||||
"required": ["client_device_id", "device_key_id", "pool_id", "idempotency_key"],
|
||||
"properties": {
|
||||
"client_device_id": {"type": "string", "minLength": 1, "maxLength": 128},
|
||||
"device_key_id": {"type": "string", "minLength": 1, "maxLength": 128},
|
||||
"pool_id": {"type": "string", "minLength": 1, "maxLength": 128},
|
||||
"idempotency_key": {"type": "string", "minLength": 1, "maxLength": 256},
|
||||
"policy_snapshot": {"$ref": "#/$defs/AllocationPolicy"},
|
||||
"requested_display_mode": {"$ref": "#/$defs/DisplayMode"}
|
||||
}
|
||||
},
|
||||
@@ -274,7 +317,12 @@
|
||||
"properties": {
|
||||
"id": {"type": "string", "minLength": 1, "maxLength": 128},
|
||||
"addresses": {"type": "array", "minItems": 1, "maxItems": 4, "items": {"type": "string", "minLength": 1, "maxLength": 256}},
|
||||
"public_identity": {"type": "string", "minLength": 1, "maxLength": 256}
|
||||
"public_identity": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 256,
|
||||
"description": "Exact TLS server name; distinct from dial addresses, gateway UUIDs, certificate fingerprints, and provider identities."
|
||||
}
|
||||
}
|
||||
},
|
||||
"ManifestTunnel": {
|
||||
|
||||
Reference in New Issue
Block a user