丈二和尚摸不着头脑是什么意思| 屁多是什么病的前兆| 仓鼠喜欢吃什么| 疱疹是一种什么病| 夏天脸上皮肤痒是什么原因| jk制服是什么意思| lofter是什么意思| 鸡枞是什么东西| 冷暴力是什么| 胜造七级浮屠是什么意思| 凉粉用什么做的| 小腹胀痛什么原因| 佑五行属什么| 猪肚炒什么好吃| 病毒四项检查都有什么| 女人补肾吃什么药| 富强粉是什么面粉| 酵母是什么东西| 共产主义社会是什么样的社会| 洋葱与什么食物相克| 人为什么会缺钾| haze是什么意思| 中邪是什么意思| 孕妇可以吃什么水果| 活死人是什么意思| 1996年属什么的| n2o是什么气体| 痦子是什么| 什么让生活更美好作文| 锡字五行属什么| 肝内高回声结节是什么意思| 丝字五行属什么| 咽喉异物感吃什么药| 蒹葭苍苍是什么意思| 荷花代表什么象征意义| 泌尿科挂什么科| 什么是soho| 梦见梯子是什么意思| 灯火葳蕤是什么意思| 年少轻狂是什么意思| 高级别上皮内瘤变是什么意思| ts是什么意思| 喝什么可以解酒| 血脉是什么意思| 1月18日什么星座| 五代十国是什么意思| 猪肉什么馅的饺子好吃| 边缘化是什么意思| 总胆红素高是怎么回事有什么危害| 神夫草抑菌乳膏主治什么| 戳是什么意思| 跑得最快的是什么生肖| 胆固醇高是什么原因引起| 办银行卡需要什么证件| 忧虑是什么意思| 结节性甲状腺肿是什么意思| 什么龙什么虎| 晚上做噩梦是什么原因| 肖想是什么意思| 鱼在鱼缸底部不动为什么| 无异于是什么意思| 乳腺看什么科室| 谩骂是什么意思| 葡萄糖升高说明什么| 梦见打老婆是什么预兆| 几天不大便是什么原因| 蜻蜓是什么动物| 美容师都要学什么| 包皮炎是什么症状| few是什么意思| 吃什么化痰效果最好最快| 八月出生的是什么星座| 红枣和枸杞一起泡水喝有什么作用| 年轻人为什么会低血压| 西瓜什么时候种| 肛门瘙痒用什么药膏| 66.66红包代表什么意思| 为什么会突然打嗝| live什么意思| 玉米须能治什么病| 为什么睡觉出虚汗| 手麻是什么病的预兆| 七月一日是什么节日| 西游记什么时候拍的| 宾格是什么意思| 虾仁配什么蔬菜包饺子| 那英姓什么| 蜻蜓吃什么食物| 什么啊| 李子和什么不能一起吃| 梦见下牙掉了是什么征兆| 喉部有异物感是什么病| 两三分钟就射什么原因| 血沉是查什么病的| 为什么打哈欠会流泪| 吃三七有什么功效| 颈动脉有斑块吃什么药| 杀青了是什么意思| 使婢差奴过一生是什么意思| 普渡众生是什么意思| 孩子气是什么意思| 天津市市长是什么级别| 高考移民是什么意思| 什么是文爱| 蔡英文是什么党派| 大便绿色的是什么原因| 龙的三合生肖是什么| 如何知道自己是什么星座| 新农合是什么| 黑下打信是什么任务| airwalk是什么牌子| 疱疹性咽峡炎用什么药| 什么叫肝功能不全| 敲锣打鼓是什么生肖| 7.13是什么日子| 妇科活检是什么意思| 刘晓庆什么星座| 6月8号什么星座| 喝酒头晕是什么原因| 什么叫稽留流产| 蓝天白云是什么生肖| 火腿是什么肉| 从来不吃窝边草是什么生肖| 目不暇接的意思是什么| 什么泡水喝降甘油三酯| 晚上睡不着什么原因| 催乳素过高会有什么严重的后果| 为什么男人| 脍炙人口是什么意思| 红五行属性是什么| 肆无忌惮的意思是什么| 山花对什么| 一什么扇子| 后背一推就出痧是什么原因| 压片糖果是什么意思| 手机账号是什么| 前卫是什么意思| 肾功能不好吃什么药调理| cm医学上是什么意思| 指甲上的月牙代表什么| 气血虚吃什么药| 男人吃什么更持久| 跳梁小丑是什么生肖| 照见五蕴皆空什么意思| 农历六月十四是什么日子| 牙冠是什么意思| 朱砂属于五行属什么| 外阴长什么样| 笨什么笨什么| 一什么眉毛填量词| 肾虚吃什么食物| hpv73阳性是什么意思| 乳房发痒什么原因| 雪白雪白的什么| 皮下囊肿是什么原因引起的| 人流复查做什么检查| 吃什么水果能长高| 治疗阴虱子用什么药最好| 可刀是什么意思| 干什么能挣钱快| 为什么一来月经就头疼| 文化传媒是干什么的| 父亲节送什么花| 游园惊梦讲的是什么| 毳毛是什么| 金玉其外败絮其中是什么意思| 小酌怡情下一句是什么| 风热证是什么意思| 嫡长子是什么意思| 新生儿脸上有小红点带白头是什么| 县级市市长什么级别| 5月19号是什么星座| 皮疹用什么药| 打乒乓球有什么好处| 吃木瓜有什么好处| 九月有什么节日| 母仪天下什么意思| 操逼是什么感觉| 惶恐是什么意思| 怀孕吃什么对胎儿好| 吃什么可以祛斑| 小孩肛门瘙痒什么原因| 87年什么命| 孽缘是什么意思| 附子理中丸治什么病| 小儿湿疹是什么原因造成的| 后生可畏是什么意思| 蜈蚣进家有什么预兆| 不想要孩子用什么办法最好| 杀青原指什么| 白交念什么| 苦瓜对肝脏有什么好处| 妇科炎症吃什么消炎药效果好| 扫兴是什么意思| 嫦娥住的宫殿叫什么| 脑瘤早期什么症状| lagogo是什么牌子| 聪明的女人是什么样的| 什么是二次元| 外阴白斑是什么| 早餐可以吃什么| 一什么鼻子| 慢热型是什么意思| anker是什么牌子| 什么芒果好吃| 4岁属什么生肖| 胆气虚吃什么中成药| 靠谱什么意思| 高高的什么| 什么什么不动| 暴躁是什么意思| 念珠菌是什么病| 阿咖酚散是什么| 辰砂和朱砂有什么区别| 成人高考是什么| 水金龟属于什么茶| 金鱼沉底不动什么原因| 富二代是什么意思| 心火旺喝什么茶| 治飞蚊症用什么眼药水| 喝水都会胖是什么原因| 肩周炎是什么原因引起的| 爱情的本质是什么| 中度脂肪肝吃什么药| 槟榔长什么样子| 月子中心是做什么的| 荔枝什么人不能吃| 胃糜烂要吃什么药| 什么行什么什么| 掉头发去医院挂什么科| 怠工是什么意思| 眼睛怕光是什么原因| 明天属相是什么生肖| 21三体综合征是指什么| 面红耳赤是什么意思| 眼角发白是什么原因| 副胎盘什么意思| 经常手淫对身体有什么危害| 为什么会铅中毒| 1月20是什么星座| 白敬亭父母是干什么的| 心脏彩超主要检查什么| 11什么意思| 猫吐了吃什么药| 农历八月初五是什么星座| 头疼吃什么药效果好| 莱卡是什么面料| 螃蟹过街的歇后语是什么| 林黛玉是个什么样的人| 畸胎瘤是什么意思| 病理检查是什么意思| 用激素药有什么副作用| 查生化是查些什么| 柳下惠姓什么| 荷叶是什么的什么| 梦见床代表什么预兆| 海带有什么营养| 天蝎座和什么座最配| 哺乳期可以吃什么水果| 惭愧的意思是什么| 春风什么什么| 足癣用什么药| 类风湿关节炎吃什么药效果好| 豆汁是什么味道| 百度
Skip to main content

痛风不能吃什么食物

百度 研究发现,如维持现有危险因素的干预强度,到2030年,我国30~70岁慢性病早死概率仅会下降%,无法完成联合国的目标。

Teaclave Service is one of the most important abstractions in the platform. Basically, the Teaclave FaaS platform is the combination of different functional services and connected through trusted channels. The Teaclave services include authentication service, frontend service, management service, storage service, access control service, scheduler service, and execution service. They play different roles in the system.

To understand the design and internal implementation of these services, we need to discuss in these sections: RPC and protocol, app-enclave structure, and the attestation mechanism.

RPC and Protocols?

We use Protocol Buffers (version 3) to define messages and RPC interfaces of the Teaclave services. For example, the authentication service has this definition.

message UserLoginRequest {
string id = 1;
string password = 2;
}

message UserLoginResponse {
string token = 1;
}

service TeaclaveAuthenticationApi {
rpc UserLogin (UserLoginRequest) returns (UserLoginResponse);
}

This means that the authentication service (for the API endpoint) has an RPC interface called "UserLogin", which takes a "UserLoginRequest" message with id and password inside (in string type) and reply a "UserLoginResponse" message with token inside (in string type).

With this definition, the build system will help to generate utility functions, traits, and structures for clients to send RPC requests, and for service to implement functions of handling requests. This is done by tonic_build.

For more protocol definitions for other services, please see proto files in the proto directory.

Service Implementation Structure?

A service in Teaclave consists of two parts: the app (untrusted) part and the enclave (trusted) part. The app part is responsible for managing the service, launching and terminating the enclave part, while the enclave part is to serve RPC requests from clients (or other services) through trusted channels, execute logic, and process data in the trusted execution environment.

App (Untrusted)?

Basically, the app part of a service does the followings:

  • Load the runtime configuration from the config file.
  • Create a service launcher: prepare the binder and set the serialized config as an input.
  • Start the service enclave (ecall to the trusted enclave part).
  • Misc: register signal handlers so that the app/enclave can respond to some signals.

Enclave (Trusted)?

Typically, a service's implementation in the enclave part contains two important structs and one trait. Let's take the frontend service as an example.

  • TeaclaveFrontendService (struct): Define properties or configurations along with the lifetime of the service. For example, the frontend service needs to hold clients (with established trusted channels) to communicate with the authentication service and management service.
  • TeaclaveFrontendError (struct): Define errors that may occur in this service, authentication error, for example.
    • TeaclaveFrontend (trait Define): functions (requests) the service needs to handle. The trait will be automatically derived from definitions in the ProtoBuf file and can be imported from the teaclave_proto crate.

You will see some #[handle_ecall] annotations on functions and the register_ecall_handler macro to help with the function registration. The lifecycle of a Teaclave service consists of enclave initialized, service started, and enclave finalized, which will invoke the corresponding command handlers - InitEnclave, StartService, and FinalizeEnclave.

The start service function is the entry point of an enclave service. Here are steps to prepare and start serving requests.

  • Initialize the attestation config and make a remote attestation.
  • With the endorsed attestation report, initialize an attested TLS config.
  • Initialize a TLS server with TLS config and listening address.
  • If needed, initialize service endpoints this service wants to connect. For example, the frontend service needs to connect to the authentication service and management service.
  • Start the service (with endpoint handlers) and begin to serve requests.

Here is a code snippet from authentication service in the enclave part:

let api_listen_address = config.api_endpoints.authentication.listen_address;
let attestation_config = AttestationConfig::from_teaclave_config(&config)?;
let attested_tls_config = RemoteAttestation::new(attestation_config)
.generate_and_endorse()?
.attested_tls_config()
.ok_or_else(|| anyhow!("cannot get attested TLS config"))?;
let server_config = SgxTrustedTlsServerConfig::from_attested_tls_config(attested_tls_config)?.into();

let service = api_service::TeaclaveAuthenticationApiService::new(db_client, jwt_secret);

Server::builder()
.tls_config(tls_config)
.map_err(|_| anyhow!("TeaclaveAuthenticationApiServer tls config error"))?
.add_service(TeaclaveAuthenticationApiServer::new(service))
.serve(addr)
.await?;

Topology?

These services are communicating through RPC with remote attestation. Here is a topological graph illustrating connections between services.

clients => authentication <-+       +----> storage <----+
| | |
clients => frontend ----------> management scheduler <-- execution
| |
+--> access_control <--+


=> api endpoint connections
-> internal endpoint connections

Attestation in Services?

To explain the usages of remote attestation mechanism in services, we need to consider two different scenarios: 1) the service wants to serve RPC requests from clients, 2) the service wants to connect and send requests to other services.

For the first scenario, the endorsed attestation report is used for creating the trusted TLS server, so that clients can attest the service's report to verify the platform. In the meantime, if the service wants to attest clients (a.k.a., establishing mutual attestation), we need to get the accepted enclave attributes from the enclave info first to create the trusted TLS server. By this, the server can also attest clients' attestation reports and only accept expected connections.

You may find code like the following to get the accepted enclave attributes for mutual attestation:

let enclave_info = EnclaveInfo::verify_and_new(...)?;
let accepted_enclave_attrs: Vec<teaclave_types::EnclaveAttr> = AUTHENTICATION_INBOUND_SERVICES
.iter()
.map(|service| match enclave_info.get_enclave_attr(service) {...})
.collect::<Result<_>>()?;

...

let server_config = SgxTrustedTlsServerConfig::from_attested_tls_config(attested_tls_config)?
.attestation_report_verifier(
accepted_enclave_attrs,
AS_ROOT_CA_CERT,
verifier::universal_quote_verifier,
)?;

For the second scenario, the report is used to create a trusted TLS channel so that the client can present its report when establishing the channel. Also, the server's report will be verified.

Customize a Standalone Service?

For most cases, we suggest using the Teaclave platform as a whole for security and functionality concerns. However, you may want to customize a TEE service using Teaclave's existing capabilities under our service framework. For instance, the execution service can be used as a standalone TEE Python executor, and the storage service can be used as a secure database as well.

To customize Teaclave services as a standalone one, you need to first think about the interfaces exposed to clients, that is the definitions in protobuf. For example, for a key-value database, we have defined Get, Put and Delete interfaces.

Additionally, if you are using it as a standalone TEE service, the attestation mechanism needs to be "one-way attestation" accordingly. That is, only clients can establish trusted channels and attest the service's identity and platform status, but service cannot attest clients.

红薯叶不能和什么一起吃 周期是什么意思 水瓶座后面是什么星座 干眼症缺乏什么维生素 败血症是什么症状
相对湿度是什么意思 知识渊博是什么意思 口腔溃疡为什么是白色的 不什么而什么 鱼条念什么
宜家宜室什么意思 阿托品是什么药 高挑是什么意思 五行什么生水 办理无犯罪记录证明需要什么材料
c1和c2有什么区别 怀孕感冒了有什么好办法解决 心里空落落的是什么意思 老年人吃什么营养品好 盆底肌松弛有什么症状
母亲o型父亲b型孩子是什么血型hcv9jop6ns9r.cn 为所当为什么意思hcv9jop1ns2r.cn 梦见偷别人东西是什么意思qingzhougame.com 水洗真丝是什么面料hcv8jop7ns1r.cn 腰椎生理曲度变直是什么意思hcv8jop7ns5r.cn
不可思议的意思是什么hcv8jop0ns7r.cn 金银花什么时候采摘最好hcv7jop9ns3r.cn 左眼皮跳是什么意思mmeoe.com 下午茶一般吃什么hcv9jop1ns8r.cn 典韦字什么chuanglingweilai.com
脾胃虚寒者有什么症状hcv7jop5ns5r.cn 苏慧伦为什么不老youbangsi.com 上睑下垂是什么原因造成的0735v.com 端午节吃什么食物gangsutong.com 嗓子疼有痰吃什么药hcv9jop8ns3r.cn
累的什么hcv7jop7ns4r.cn 人为什么会低血糖hcv9jop2ns7r.cn 荣膺是什么意思hcv9jop2ns8r.cn 两规是什么意思hcv7jop9ns9r.cn 什么都不想做hcv9jop4ns5r.cn
百度