Add attestation service documentation
Adds a page under service descriptions that descibes the attestation
service design and related tests.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I27f12a63862e002f15ab0a065f056024cbe8b45b
diff --git a/docs/developer/service-descriptions/uml/AttestClaimsModel.puml b/docs/developer/service-descriptions/uml/AttestClaimsModel.puml
new file mode 100644
index 0000000..fb54f71
--- /dev/null
+++ b/docs/developer/service-descriptions/uml/AttestClaimsModel.puml
@@ -0,0 +1,43 @@
+'-------------------------------------------------------------------------------
+' Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+'
+' SPDX-License-Identifier: BSD-3-Clause
+'
+'-------------------------------------------------------------------------------
+
+@startuml
+
+abstract class claim_iterator {
+ {abstract} void first()
+ {abstract} void next()
+ {abstract} bool is_done()
+ {abstract} claim current()
+}
+
+abstract class claim_source {
+ {abstract} bool get_claim(claim *claim)
+}
+
+class claim {
+ +category: int
+ +subject_id: int
+ +variant_id: int
+}
+
+class claims_register <<singleton>> {
+ void add_claim_source(claim_source)
+ void query_by_category(category, claim_vector)
+}
+
+claim <|-- claim_collection
+claim <|-- text_string_claim
+claim <|-- byte_string_claim
+claim <|-- integer_claim
+claim <|-- measurement_claim
+
+claim_iterator ..> claim
+claim_collection ..> claim_iterator
+claim_source ..> claim
+claims_register -> "0..*" claim_source
+
+@enduml
diff --git a/docs/developer/service-descriptions/uml/AttestImportedIAKflow.puml b/docs/developer/service-descriptions/uml/AttestImportedIAKflow.puml
new file mode 100644
index 0000000..fef117c
--- /dev/null
+++ b/docs/developer/service-descriptions/uml/AttestImportedIAKflow.puml
@@ -0,0 +1,21 @@
+'-------------------------------------------------------------------------------
+' Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+'
+' SPDX-License-Identifier: BSD-3-Clause
+'
+'-------------------------------------------------------------------------------
+
+@startuml
+participant "factory app"
+participant "attestation service"
+participant "keystore"
+
+hnote over "keystore": empty
+"factory app" -> "attestation service" : import_iak
+"attestation service" -> "keystore" : check_exists
+"attestation service" <-- "keystore" : false
+"attestation service" -> "keystore" : store_key
+hnote over "keystore": provisioned
+"factory app" <-- "attestation service" : success
+
+@enduml
diff --git a/docs/developer/service-descriptions/uml/AttestPartitioning.puml b/docs/developer/service-descriptions/uml/AttestPartitioning.puml
new file mode 100644
index 0000000..9e85862
--- /dev/null
+++ b/docs/developer/service-descriptions/uml/AttestPartitioning.puml
@@ -0,0 +1,23 @@
+'-------------------------------------------------------------------------------
+' Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+'
+' SPDX-License-Identifier: BSD-3-Clause
+'
+'-------------------------------------------------------------------------------
+
+@startuml
+
+package claims
+package client
+package key_mngr
+package reporter
+package provider
+package protocol
+
+client ..> protocol
+provider ..> protocol
+provider ..> reporter
+provider ..> key_mngr
+reporter ..> claims
+
+@enduml
diff --git a/docs/developer/service-descriptions/uml/AttestSelfGeneratedIAKflow.puml b/docs/developer/service-descriptions/uml/AttestSelfGeneratedIAKflow.puml
new file mode 100644
index 0000000..7fdae1b
--- /dev/null
+++ b/docs/developer/service-descriptions/uml/AttestSelfGeneratedIAKflow.puml
@@ -0,0 +1,22 @@
+'-------------------------------------------------------------------------------
+' Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+'
+' SPDX-License-Identifier: BSD-3-Clause
+'
+'-------------------------------------------------------------------------------
+
+@startuml
+participant "factory app"
+participant "attestation service"
+participant "keystore"
+
+hnote over "keystore": empty
+"factory app" -> "attestation service" : export_iak_public_key
+"attestation service" -> "keystore" : check_exists
+"attestation service" <-- "keystore" : false
+"attestation service" -> "attestation service" : generate_key
+"attestation service" -> "keystore" : store_key
+hnote over "keystore": provisioned
+"factory app" <-- "attestation service" : public_key
+
+@enduml