This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRole | |
metadata: | |
name: all-reader | |
rules: | |
- apiGroups: [""] | |
resources: | |
- nodes | |
- nodes/proxy | |
- services |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: prometheus | |
namespace: stats | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: prometheus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
skinparam componentStyle uml2 | |
node "Redis Pod" { | |
[redis_exporter] | |
database redis | |
} | |
redis <- redis_exporter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
object ": AccessLog" as access | |
access : severity = "ERROR" | |
access : time = "2020-12-31T20:02:05.123456Z" | |
access : httpRequest = Object | |
object ": ApplicationLog" as app1 | |
app1 : severity = "INFO" | |
app1 : time = "2020-12-31T20:02:03.000456Z" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use azure_core::prelude::Range; | |
use azure_core::HttpClient; | |
use azure_storage::blob::prelude::{AsBlobClient, AsContainerClient}; | |
use azure_storage::clients::AsStorageClient; | |
use azure_storage::core::clients::StorageAccountClient; | |
use reqwest; | |
use std::error::Error; | |
use std::sync::Arc; | |
#[tokio::main] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[tokio::main] | |
async fn main() -> Result<(), Box<dyn Error + Send + Sync>> { | |
let account = "xxxxx"; | |
let master_key = "xxxxx"; | |
let http_client: Arc<Box<dyn HttpClient>> = Arc::new(Box::new(reqwest::Client::new())); | |
let storage_account_client = | |
StorageAccountClient::new_access_key(http_client.clone(), account, master_key); | |
let storage_client = storage_account_client.as_storage_client(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoactivate on | |
participant "main.rs : App" as App | |
participant "lib.rs:Enclave" as Enclave | |
participant "client.rs:Client" as Client | |
participant "SGX SDK" as SDK | |
participant IPS <<Intel Service>> | |
participant IAS <<Intel Service>> | |
App -> Enclave: verify<<ECall>> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App { | |
main() | |
ocall_sgx_init_quote()<<OCall>> | |
ocall_get_quote()<<OCall>> | |
} | |
class Enclave { | |
verify() <<ECall>> | |
create_attestation_report() | |
} | |
class Client { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rectangle Enclaves { | |
package "Architectural Enclaves" { | |
["PvE"] | |
["QE"] | |
["LE"] | |
["PSE"] | |
["PcE"] | |
} | |
["Application Enclave"] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
participant "main.rs : App" as App | |
participant "lib.rs:Enclave" as Enclave | |
participant "secret_key:OnceCell" as OnceCell | |
App -> Enclave: ecall_get_encryption_key<<ECall>> | |
Enclave -> Enclave: "generates key pair" | |
Enclave -> OnceCell: set | |
return | |
Enclave --> App: public_key |