General Information

The repository for this application (open on GitHub) has 6 stars and was forked 4 times. The codebase consists of 1484 lines of code and makes use of the following technologies:

Docker Docker Compose Eureka Hystrix Maven Spring Config

Data Flow Diagram

Dataflow Diagram

Download the following model file here. Other formats are provided below.

{
    "services": [
        {
            "name": "discovery_service",
            "stereotypes": [
                "service_discovery",
                "infrastructural"
            ],
            "tagged_values": {
                "Service Discovery": "Eureka",
                "Port": 8888
            }
        },
        {
            "name": "config_service",
            "stereotypes": [
                "configuration_server",
                "infrastructural"
            ],
            "tagged_values": {
                "Configuration Server": "Spring Cloud Config",
                "Port": 8888
            }
        },
        {
            "name": "account_service",
            "stereotypes": [
                "internal"
            ],
            "tagged_values": {
                "Port": 8000,
                "Endpoints": [
                    "/accounts"
                ]
            }
        },
        {
            "name": "customer_service",
            "stereotypes": [
                "internal"
            ],
            "tagged_values": {
                "Port": 8002,
                "Endpoints": [
                    "/customers"
                ]
            }
        },
        {
            "name": "store_service",
            "stereotypes": [
                "internal"
            ],
            "tagged_values": {
                "Port": 8003,
                "Endpoints": [
                    "/stores"
                ]
            }
        },
        {
            "name": "item_service",
            "stereotypes": [
                "internal"
            ],
            "tagged_values": {
                "Port": 8004,
                "Endpoints": [
                    "/items"
                ]
            }
        },
        {
            "name": "price_service",
            "stereotypes": [
                "internal"
            ],
            "tagged_values": {
                "Port": 8001,
                "Endpoints": [
                    "/prices"
                ]
            }
        },
        {
            "name": "foodtray_service",
            "stereotypes": [
                "infrastructural",
                "monitoring_dashboard",
                "circuit_breaker"
            ],
            "tagged_values": {
                "Monitoring Dashboard": "Hystrix",
                "Circuit Breaker": "Hystrix",
                "Port": 8005,
                "Endpoints": [
                    "/foodtrays",
                    "/foodtrays/{itemCode}",
                    "/foodtrays/price/{itemCode}",
                    "/foodtrays/item/{itemCode}"
                ]
            }
        }
    ],
    "external_entities": [
        {
            "name": "github_repository",
            "stereotypes": [
                "github_repository",
                "entrypoint"
            ],
            "tagged_values": {
                "URL": "https://github.com/jferrater/ConfigData"
            }
        }
    ],
    "information_flows": [
        {
            "sender": "github_repository",
            "receiver": "config_service",
            "stereotypes": [
                "restful_http"
            ],
            "tagged_values": {}
        },
        {
            "sender": "config_service",
            "receiver": "discovery_service",
            "stereotypes": [
                "restful_http"
            ],
            "tagged_values": {}
        },
        {
            "sender": "config_service",
            "receiver": "account_service",
            "stereotypes": [
                "restful_http"
            ],
            "tagged_values": {}
        },
        {
            "sender": "account_service",
            "receiver": "discovery_service",
            "stereotypes": [
                "restful_http"
            ],
            "tagged_values": {}
        },
        {
            "sender": "config_service",
            "receiver": "customer_service",
            "stereotypes": [
                "restful_http"
            ],
            "tagged_values": {}
        },
        {
            "sender": "customer_service",
            "receiver": "discovery_service",
            "stereotypes": [
                "restful_http"
            ],
            "tagged_values": {}
        },
        {
            "sender": "config_service",
            "receiver": "store_service",
            "stereotypes": [
                "restful_http"
            ],
            "tagged_values": {}
        },
        {
            "sender": "store_service",
            "receiver": "discovery_service",
            "stereotypes": [
                "restful_http"
            ],
            "tagged_values": {}
        },
        {
            "sender": "config_service",
            "receiver": "item_service",
            "stereotypes": [
                "restful_http"
            ],
            "tagged_values": {}
        },
        {
            "sender": "item_service",
            "receiver": "discovery_service",
            "stereotypes": [
                "restful_http"
            ],
            "tagged_values": {}
        },
        {
            "sender": "config_service",
            "receiver": "price_service",
            "stereotypes": [
                "restful_http"
            ],
            "tagged_values": {}
        },
        {
            "sender": "price_service",
            "receiver": "discovery_service",
            "stereotypes": [
                "restful_http"
            ],
            "tagged_values": {}
        },
        {
            "sender": "config_service",
            "receiver": "foodtray_service",
            "stereotypes": [
                "restful_http",
                "circuit_breaker_link"
            ],
            "tagged_values": {
                "'Circuit Breaker'": "\"Hystrix\""
            }
        },
        {
            "sender": "foodtray_service",
            "receiver": "discovery_service",
            "stereotypes": [
                "restful_http",
                "circuit_breaker_link"
            ],
            "tagged_values": {
                "'Circuit Breaker'": "\"Hystrix\""
            }
        },
        {
            "sender": "foodtray_service",
            "receiver": "item_service",
            "stereotypes": [
                "restful_http",
                "feign_connection",
                "load_balanced_link",
                "circuit_breaker_link"
            ],
            "tagged_values": {
                "'Load Balancer'": "\"Ribbon\"",
                " 'Circuit Breaker'": "\"Hystrix\""
            }
        },
        {
            "sender": "foodtray_service",
            "receiver": "price_service",
            "stereotypes": [
                "restful_http",
                "feign_connection",
                "load_balanced_link",
                "circuit_breaker_link"
            ],
            "tagged_values": {
                "'Load Balancer'": "\"Ribbon\"",
                " 'Circuit Breaker'": "\"Hystrix\""
            }
        }
    ]
}

Model Items

The Application consists of a total of 88 elements:

Element Count
Services 8
External Entities 1
Information Flows 16
Annotations 63
Total Items 88

Model Representations

Open the model in the following formats:

Traceability

Open the traceability information for all model items:

Security Rules

The following table shows the application’s adherence to the 17 architectural security rules. The last column provides model variants that adhere to the rule for each rule that is initially violated.

Rule ID    Verdict       Evidence        Model Variant    
R1 Evidence Variant
R2 Evidence Variant
R3 Evidence Variant
R4 Evidence Variant
R5 Evidence Variant
R6 Evidence Variant
R7 Evidence Variant
R8 Evidence Variant
R9 Evidence Variant
R10 Evidence Variant
R11 Evidence Variant
R12 Evidence Variant
R13 Evidence  
R14 Evidence  
R16 Evidence Variant
R17 Evidence Variant
R18 Evidence Variant

Evidence and explanations for rule decisions

R1

Rule is violated: The user communicates with the foodtray service, however the internal services do not restrict access from external entities.

Artifacts:

  • FoodTrayServiceApplication.java: Line: 21
  • bootstrap.yml: Line: 11
  • bootstrap.yml: Line: 8

R2

Rule is violated: Services communicate internally over plain HTTP using Feign connections (See example artifacts). The connection is thus not authenticated.

Artifacts:

  • FoodTrayServiceApplication.java: Line: 21
  • bootstrap.yml: Line: 11
  • bootstrap.yml: Line: 8

R3

Rule is violated: No authentication mechanism is deployed.

R4

Rule is violated: External entities are not represented in the application. Users behave transparent to the server. Note, that the server has a user-service, that is not used for authentication purposes.

R5

Rule is violated: No authentication tokens are used.

R6

Rule is violated: No rate limiting of any means is deployed.

R7

Rule is violated: User external entities can call the gateway service using an unencrypted HTTP connection.

Artifacts:

  • bootstrap.yml: Line: 19

R8

Rule is violated: All internal services communicate over insecure HTTP connections.

Artifacts:

  • FoodTrayServiceApplication.java: Line: 21
  • bootstrap.yml: Line: 11
  • bootstrap.yml: Line: 8

R9

Rule is violated: No central logging system is deployed.

R10

Rule is violated: No central logging system is deployed.

R11

Rule is violated: No logs are generated by the application.

R12

Rule is violated: No message broker is deployed and no logging is performed.

R13

Rule is adhered to: Hystrix is deployed as a circuit breaker on the gateway server.

Artifacts:

  • FoodTrayServiceApplication.java: Line: 19

R14

Rule is adhered to: The gateway server uses load balancing via Ribbon to access dependent services.

Artifacts:

  • bootstrap.yml: Line: 11
  • bootstrap.yml: Line: 8

R15

This rule is not applicable: Not a service mesh deployment.

R16

Rule is violated:

  1. Registry Service (Eureka Server) with @EnableEurekaServer present.
  2. The discovery service is missing from the docker compose file.

Artifacts:

  • DiscoveryServiceApplication.java: Line: 13
  • docker-compose.yml: File

R17

Rule is violated: No HTTP basic password listed in any YML-Configuration of format username:password@here-location-of-eureka-server at “eureka.client.serviceUrl.defaultZone”.

Artifacts:

  • DiscoveryServiceApplication.java: Line: 13
  • application.yml: Line: 5

R18

Rule is violated: No secret manager is deployed. The deployed git configuration server is not a secrets manager.

Artifacts:

  • application.yml: Line: 12