Skip to content

Commit

Permalink
docs: Documentation updated. (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniotarricone authored Jul 12, 2024
1 parent 4f6411b commit 9be19b2
Show file tree
Hide file tree
Showing 7 changed files with 210 additions and 88 deletions.
235 changes: 183 additions & 52 deletions src/site/markdown/data_dictionary.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/site/puml/c4/MAIN__c4_containers.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
!include https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist/AzureC4Integration.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist/Containers/AzureContainerApp.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist/Identity/AzureActiveDirectory.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist/Storage/AzureBlobStorage.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist/DevOps/AzureApplicationInsights.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist/Security/AzureKeyVault.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist/Databases/AzureCosmosDb.puml

LAYOUT_LEFT_RIGHT()

Container_Ext(client, "Client", "Client Application")

AzureContainerApp(auth, "mil-auth", "MIL Authorization Server")
AzureActiveDirectory(entraid, "Authorization Server", "Azure Entra ID")
AzureBlobStorage(storage, "Storage", "Azure Blob Storage")
AzureKeyVault(keyvault, "Key Vault", "Azure Key Vault")
AzureCosmosDb(repo, "Database", "Azure CosmosDB")
AzureApplicationInsights(appinsights, "OpenTelemetry", "Azure Application Insights")

Rel(client, auth, "uses")
Rel(auth, entraid, "gets access tokens for Azure resources")
Rel(auth, storage, "gets configuration")
Rel(auth, repo, "gets configuration")
Rel(auth, keyvault, "creates keys, gets keys, signs, verifies signatures, encrypts, decrypts")
Rel(auth, appinsights, "sends OpenTelemetry data")
@enduml
9 changes: 3 additions & 6 deletions src/site/puml/uml/client_credentials_validation__atm.puml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@
!include_many init.puml

group #LightBlue client credentials validation
auth -> serv ++ : getBlob("clients", $var("client id") + ".json")

!include_many blob_usage.puml

serv --> auth -- : $var("client")
auth -> repo ++ : find("clientId", $var("client id"))
repo --> auth -- : $var("client")
!include_many client.puml

note over auth #Orange
On blob not found, return 401 with specific error body
On client not found, return 401 with specific error body
On any other error, return 500 with specific error body
end note

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@
!include_many init.puml

group #LightPink client credentials validation
auth -> serv ++ : getBlob("clients", $var("client id") + ".json")

!include_many blob_usage.puml

serv --> auth -- : $var("client")
auth -> repo ++ : find("clientId", $var("client id"))
repo --> auth -- : $var("client")
!include_many client.puml

note over auth #Orange
On blob not found, return 401 with specific error body
On client not found, return 401 with specific error body
On any other error, return 500 with specific error body
end note

Expand Down
13 changes: 9 additions & 4 deletions src/site/puml/uml/init.puml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ sprite $AzureActiveDirectory [70x70/16z] {
LaIfJiwB8juy1brB3XYOjrU7v-MKeqjC-f2rwnXwe4YxphZplFqwW-RjnQ0qY_3eW-PjnvwAd_zOWNaFOdRxmlm7
}

sprite $AzureBlobStorage [70x70/16z] {
xT853WCn34JH92QfzpzmPL4PHfCKTlqEy0DsmvGoX39QiY1fLeBbV2NzSwKgLL5QLZejAuCslz9XzoeDzcULgj2o8hG55GNThGHiPQKgkkmk2fk_kqexhtY0
_5xb0DjUnLPLZAXC_nTpaDrKA5anshoA64bQ6gI6AUK8
sprite $AzureCosmosDb [70x70/16z] {
pPS7WkCW34MjWX3S_y0x16SLFk0jzfOtlRtH5qI4u_z4df2GqWCMLduYaCeJWVI1IDgudwSXD-DqReHYqK_aUgc8HLw_9ap32YDl3INBNcejxecxG4Taq7yg
wAqeTI3h2XvIOHcvpfGVQcZehTO0FS9C3PQ5HY8cUJqfRoBNl3rms_LFk0mA41N6Hl3gSIJeG0zZWiLZMWS7UjnICePsplD51WcY_JS9B8EclLrA-5qsWGLm
aFX9QSWyN1dw4ljaS0J55ZDQLfRoAN508Nq3nm2MuXCy_6fiksqfACc9UqUX6DXqiTzMaaJ71EzAiKKf-GkZzHb8K0e62aU3ZmMq6VWKWGQ9NGtQgKnTIxAk
BPj3Gnh9_ESiQISvWra9oTQYBwuE-tHfkPQ4vR31OZi9hGv73kLWoRoJ8D2gqMAyQApE9GfOyc39zlb_gKjyiZ2UpwpsqWH9EocTafgMEGyUpJPOidUwBdcj
iif31q73iyyIqyRh2D-rbY6dEqfII7nL2ZpXZMrpAg8GjIR1jiJ0cWOepBikoULbmVonb-T8mUb8tYLv4KZGWhLO58Abu660dKaH9Wh1Kj22dI5qv7ZcG5iB
5cFbY-yEDG-97XiBQgX9UZ_EC26nGO3TZGwBUYdP51nTuiSCmwpmsYZU5D6GSDH2sn7A7ve84lq8YLzV0hWZ-a6oK4mI1isQP5vhURrquE6ZX9gr0iaqj8Ad
XHeGvZmxYk2o70YBg8h4XOLq4EN4Spj3UuMax9ujAM_MX8yxn6M8w7STh0E_NGf9tChkNrZbk0dTbiH-kO_A8nP-mYB7_yWt
}

sprite $java [48x48/16] {
Expand Down Expand Up @@ -98,7 +103,7 @@ box Multichannel Integration Layer #GhostWhite
participant "mil-azure-services\n<$java,scale=0.74,color=DodgerBlue>" as serv

participant "Authorization Server\n<$AzureActiveDirectory,scale=0.5,color=DodgerBlue>" as id
participant "Storage\n<$AzureBlobStorage,scale=0.5,color=DodgerBlue>" as blob
participant "Repositories\n<$AzureCosmosDb,scale=0.5,color=DodgerBlue>" as repo
participant "Key Vault\n<$AzureKeyVault,scale=0.5,color=DodgerBlue>" as kv
end box

Expand Down
17 changes: 6 additions & 11 deletions src/site/puml/uml/search_for_roles__atm.puml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,21 @@
!include_many init.puml

group #LightBlue search for roles
auth -> serv ++ : getBlob("roles", $var("acquirer id"), $var("channel"), $var("client id"), "NA", $var("terminal id"), "roles.json"

!include_many blob_usage.puml
auth -> repo ++ : find("acquirerId = ?1 and channel = ?2 and clientId = ?3 and merchantId = ?4 and terminalId = ?5", $var("acquirer id"), $var("channel"), $var("client id"), "NA", $var("terminal id"))

alt roles found
serv --> auth : $var("roles")
repo --> auth : $var("roles")
!include_many roles.puml
else roles not found
serv --> auth -- : //not found//

auth -> serv ++ : getBlob("roles", $var("acquirer id"), $var("channel"), $var("client id"), "NA", "NA", "roles.json"

!include_many blob_usage.puml
repo --> auth -- : //not found//

serv --> auth -- : $var("roles")
auth -> repo ++ : find("acquirerId = ?1 and channel = ?2 and clientId = ?3 and merchantId = ?4 and terminalId = ?5", $var("acquirer id"), $var("channel"), $var("client id"), "NA", "NA")
repo --> auth -- : $var("roles")
!include_many roles.puml
end

note over auth #Orange
On blob not found, return 401 with specific error body
On roles not found, return 401 with specific error body
On any other error, return 500 with specific error body
end note
end group
Expand Down
9 changes: 3 additions & 6 deletions src/site/puml/uml/search_for_roles__generic_server.puml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@
!include_many init.puml

group #LightPink search for roles
auth -> serv ++ : getBlob("roles", "NA", "NA", $var("client id"), "NA", "NA", "roles.json"

!include_many blob_usage.puml

serv --> auth : $var("roles")
auth -> repo ++ : find("acquirerId = ?1 and channel = ?2 and clientId = ?3 and merchantId = ?4 and terminalId = ?5", "NA", "NA", $var("client id"), "NA", "NA")
repo --> auth -- : $var("roles")
!include_many roles.puml

note over auth #Orange
On blob not found, return 401 with specific error body
On roles not found, return 401 with specific error body
On any other error, return 500 with specific error body
end note
end group
Expand Down

0 comments on commit 9be19b2

Please sign in to comment.