五行缺什么查询| 绿色的蛇是什么蛇| 用进废退什么意思| 促甲状腺素高是什么意思| 乳腺增生结节吃什么药效果好| 梦见长大水是什么意思| 泰坦尼克号女主角叫什么| 头晕挂什么科比较好| 毛囊是什么| 财鱼是什么鱼| 药流没流干净有什么症状| 大便黑色什么原因| xpe是什么材料| 宫颈肥大伴纳氏囊肿是什么意思| 呵呵是什么意思啊| 吃黑豆有什么好处| 凯格尔运动是什么| 争奇斗艳什么意思| 桃花眼的女人什么命| 12月20是什么星座| lively是什么意思| 血小板偏低是什么原因| 头部MRI检查是什么意思| 眼球突出是什么原因| 什么水果对肠胃好| 人中附近长痘痘什么原因| 释怀什么意思| 狗脊是什么东西| 那天午后我站在你家门口什么歌| 完犊子是什么意思| 乏力是什么原因| 户籍地址是什么意思| 心肾不交是什么意思| 瘢痕是什么| 年薪12万什么水平| l do是什么意思| semir是什么牌子| 为什么会得阴虱| 可乐煮姜有什么作用| 宝宝风寒感冒吃什么药最好| 华盖是什么| 肺结核阳性是什么意思| 治疗腱鞘炎用什么药效果好| 作茧自缚是什么意思| 年轻人心悸是什么原因| 为什么今年闰六月| 黄钻有什么用| vp是什么| 9点半是什么时辰| 10月30日是什么星座| 舌苔白有齿痕吃什么药| 五戒十善是什么| 料酒是什么酒| 什么是夫妻| 登高望远是什么生肖| 孕妇缺营养吃什么补| 喉咙不舒服挂什么科| 感冒不能吃什么水果| 湿疹为什么反反复复好不了| 金利来属于什么档次| 得宫颈癌的前兆是什么| 冰箱双变频是什么意思| 谷丙转氨酶是什么意思| 鬼佬是什么意思| 素鲍鱼是什么做的| 龟头炎什么症状| 仌是什么字| 90岁叫什么| 上尉军衔是什么级别| 遗尿是什么症状| 阴阳两虚吃什么药最好| 血脂高不能吃什么| 开金花是什么生肖| 李子树苗什么品种好| 看输卵管是否堵塞做什么检查| 沙门氏菌用什么药最好| 曾毅玲花什么关系| 缺铁性贫血吃什么食物好| 网络诈骗打什么电话| 为什么男生喜欢女生叫爸爸| 谷氨酸高是什么原因| 马桶为什么叫马桶| 念旧的人是什么样的人| 骨裂是什么感觉| 7月什么星座| 人间炼狱是什么意思| 心脏不好的人吃什么好| 闰六月有什么讲究| 中医调理身体挂什么科| 真菌是什么原因引起的| 肚脐下方疼是什么原因| 吞服是什么意思| 静脉曲张溃烂擦什么药| 尿隐血十1是什么意思| 腿水肿是什么原因引起的| 短效避孕药什么牌子好| 头疼喝什么饮料| 正山小种属于什么茶类| 吃葱有什么好处和坏处| 嘴唇紫红色是什么原因| 糖尿病可以吃什么水果| 易烊千玺的爸爸是干什么的| 梦见别人买房子是什么预兆| 为什么白带是黄色的| 胆红素高是什么意思| 口干口苦是什么原因引起的| 经常流鼻涕是什么原因| 公积金缴存基数是什么意思| 银联是什么| 螺蛳粉为什么叫螺蛳粉| 淋巴结肿大是什么原因| 火疖子用什么药膏| 女人湿气太重喝什么茶| 胃穿孔是什么症状| 蓝莓吃了有什么好处| 孤臣是什么意思| 钦点是什么意思| 吃什么可以长胖| 人流后吃什么恢复快| 如梦初醒是什么意思| esr是什么| 丘疹是什么原因引起的| 笙是什么意思| 为什么腋窝老是出汗| rna是什么| 胰腺不好有什么症状| 墨池为什么不爱柔嘉了| 天津有什么好玩的地方| 癫是什么意思| bk病毒是什么| 身体缺糖有什么症状| 舌苔发白吃什么药| 普洱茶什么牌子好| 肚子为什么会疼| 着床出血是什么样子的| 2.16是什么星座| 查甲状腺功能挂什么科| 慢性结膜炎用什么眼药水| 750是什么材质| 项羽为什么叫西楚霸王| 为什么叫黄牛| 景泰蓝是什么| 喝小分子肽有什么好处| 灵芝孢子粉什么时候吃最好| 谢娜人气为什么那么高| 清秀是什么意思| 7月24号是什么星座| 长疮是什么原因| 嘌呤是什么东西| 返聘是什么意思| 六月一日什么星座| 犹豫不决是什么生肖| 为什么下巴经常长痘痘| bni是什么意思| 男人纹身纹什么运气好| 爸爸的姐姐叫什么| 七九年属什么生肖| 6月24日什么星座| 从父是什么意思| 斗牛为什么用红色的布| 紫苏是什么植物| 肛塞什么感觉| 下夜班是什么意思| 挖空细胞是什么意思啊| 人黑穿什么颜色的衣服好看| 厌食症吃什么药| 嗜睡乏力没精神容易疲劳是什么原因| 什么原因导致缺钾| 强磁对人体有什么危害| 广东省省长什么级别| 气胸是什么原因引起的| 阿奇霉素主治什么| 九寨沟属于什么市| 上颚疼痛吃什么药| 路人皆知的上一句歇后语是什么| 全性向是什么意思| 胃反流有什么症状| 一什么沙滩| h代表什么单位| 二月一日是什么星座| 间羟胺又叫什么| 好奇害死猫是什么意思| 180度是什么角| 无精打采是什么意思| 柯南叫什么| 7月13号是什么星座| 孕妇喝可乐对胎儿有什么影响| 六级什么时候考| 12320是什么电话| arb是什么意思| 池塘边的榕树上是什么歌| c罗穿什么足球鞋| 风花雪月什么意思| 天女散花是什么意思| 留个念想是什么意思| 区团委书记是什么级别| 身体寒湿重吃什么好| 初中学历能做什么工作| 胆囊切除有什么影响| 反复呕吐是什么病症| 双向是什么意思| 碱水对人有什么危害| 为什么叫打飞机| 吃什么不上火| 狐臭是什么味| 斋醮什么意思| 刮痧和拔罐有什么区别| 什么水果最甜| 落花生为什么叫落花生| 腋下淋巴结肿大挂什么科| 什么什么美景| 脾的作用和功能是什么| 04年的猴是什么命| kimi什么意思| 蜜蜂是什么牌子| 绝对值是什么| o和b型生的孩子是什么血型| 28周检查什么项目| 榨菜炒什么好吃| 总胆红素高是什么原因| 头伏二伏三伏吃什么| becky是什么意思| 劲爆是什么意思| 117是什么电话| 我用什么才能留住你| 干贝是什么东西做的| 梦见洗澡是什么意思| 劈腿是什么意思| 梦见苍蝇很多是什么意思| lino是什么面料| 泡茶用什么水好| 甲亢是什么| 梦见在河里抓鱼是什么征兆| 多是什么结构的字| 什么是动物奶油| 4月是什么星座| 过敏吃什么药最有效| 前胸后背疼是什么原因| 体癣用什么药| 2000年是属什么生肖| 用加一笔是什么字| 精索炎吃什么药最好| 6月6是什么星座| 树根有什么作用| 溪字五行属什么| 嗓子疼喝什么药| 二级b超是检查什么| 变异性哮喘什么症状| 日值四离是什么意思| 蚂蚁代表什么风水| 1月20是什么星座| 子母环是什么形状图片| 湿气是什么| co2是什么| 佛心果是什么东西| 心悸是什么原因造成的| 什么护肤品比较好| 缺黄体酮会有什么症状| 银屑病用什么药膏| 胆囊结石挂什么科| 益生菌什么时候吃最好| 最熟悉的陌生人是什么意思| 阿莫西林是治什么的| 肌肤是什么意思| 百度
Skip to main content

2017新疆伊犁天马国际旅游节

百度 尿结石,慢性的更可怕泌尿系结石也称尿结石,是尿液中结晶沉积导致,可见于肾、输尿管、膀胱和尿道的任何部位,以肾与输尿管结石最为常见。

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.

4岁属什么生肖 芙蓉是什么 什么是牙线 夏天用什么护肤品比较好 心肌酶是什么意思
吃黑米有什么好处和坏处 做肠镜前一天可以吃什么 小脑是控制什么的 拉烂屎是什么原因 lucy是什么意思
锦五行属什么 女性尿路感染用什么药 pp是什么材料 相性是什么意思 冬枣为什么叫冬枣
血府逐瘀丸治什么病 睡觉小腿抽筋是什么原因 1月16日什么星座 山楂可以和什么一起泡水喝 86年属什么
颌下腺肿大是什么原因yanzhenzixun.com 脚背浮肿是什么原因引起的wuhaiwuya.com 明年是什么年啊hcv7jop9ns4r.cn 25度穿什么衣服hcv9jop3ns1r.cn 黄鼠狼的天敌是什么动物hcv9jop0ns8r.cn
道德经适合什么人看hcv8jop6ns6r.cn 吡唑醚菌酯治什么病hcv7jop9ns6r.cn 秤砣是什么意思hcv9jop4ns9r.cn 咳出痰带血是什么原因hcv8jop6ns7r.cn 国花是什么hcv8jop3ns4r.cn
腰疼什么原因hcv8jop2ns8r.cn 菩提子长什么样xinmaowt.com 什么辣椒香而不辣bjcbxg.com 哆啦a梦的口袋叫什么hcv8jop7ns8r.cn 达泊西汀是什么药hcv9jop2ns5r.cn
牙合是什么字hcv8jop2ns1r.cn 吃什么药能让月经推迟hcv8jop3ns8r.cn 日龙包是什么意思0735v.com 实则是什么意思cl108k.com 腋窝疼痛挂什么科hcv9jop0ns5r.cn
百度