General Information
The repository for this application (open on GitHub) has 13 stars and was forked 11 times. The codebase consists of 1800 lines of code and makes use of the following technologies:
Eureka Hystrix Maven Ribbon Spring Config Zipkin Zuul
Data Flow Diagram
Download the following model file here. Other formats are provided below.
{
"services": [
{
"name": "config_service",
"stereotypes": [
"configuration_server",
"infrastructural"
],
"tagged_values": {
"Port": 8888,
"Configuration Server": "Spring Cloud Config"
}
},
{
"name": "eureka_service",
"stereotypes": [
"service_discovery",
"infrastructural"
],
"tagged_values": {
"Service Discovery": "Eureka",
"Port": 8761
}
},
{
"name": "movie_service",
"stereotypes": [
"internal"
],
"tagged_values": {
"Port": 8002,
"Endpoints": [
"/movie/dummyData",
"/movie/list",
"/movie/{movieId}",
"/movie"
]
}
},
{
"name": "user_service",
"stereotypes": [
"internal"
],
"tagged_values": {
"Port": 8001,
"Endpoints": [
"/user",
"/user/{userId}"
]
}
},
{
"name": "recommendation_service",
"stereotypes": [
"internal"
],
"tagged_values": {
"Port": 8003,
"Endpoints": [
"/recommendation",
"/recommendation/recommend/user/{userId}",
"/recommendation/user",
"/recommendation/movie/{movieId}",
"/recommendation/user/{userId}",
"/recommendation/dummyData",
"/recommendation/movie"
]
}
},
{
"name": "recommendation_client",
"stereotypes": [
"gateway",
"monitoring_dashboard",
"local_logging",
"infrastructural",
"circuit_breaker",
"load_balancer"
],
"tagged_values": {
"Port": 9000,
"Gateway": "Zuul",
"Monitoring Dashboard": "Hystrix",
"Circuit Breaker": "Hystrix",
"Load Balancer": "Ribbon",
"Endpoints": [
"/user/{userId}",
"/api/userDetails/{userId}",
"/user",
"/api",
"/recommendation/dummyData",
"/movie/dummyData",
"/newuser",
"/api/recommendation/user/{userId}",
"/movie"
]
}
}
],
"external_entities": [
{
"name": "github_repository",
"stereotypes": [
"github_repository",
"entrypoint"
],
"tagged_values": {
"URL": "https://github.com/mdeket/spring-cloud-example-config-repo.git"
}
},
{
"name": "database_movie_service",
"stereotypes": [
"entrypoint",
"exitpoint",
"external_database"
],
"tagged_values": {}
},
{
"name": "database_user_service",
"stereotypes": [
"entrypoint",
"exitpoint",
"external_database",
"plaintext_credentials"
],
"tagged_values": {
"Port": 3306,
"Database": "MySQL",
"Username": "root",
"Password": "root"
}
},
{
"name": "database_recommendation_service",
"stereotypes": [
"exitpoint",
"entrypoint",
"external_database",
"plaintext_credentials"
],
"tagged_values": {
"Database": "Neo4j",
"Port": 7474,
"Username": "neo4j",
"Password": "root"
}
},
{
"name": "user",
"stereotypes": [
"user_stereotype",
"entrypoint",
"exitpoint"
],
"tagged_values": {}
}
],
"information_flows": [
{
"sender": "github_repository",
"receiver": "config_service",
"stereotypes": [
"restful_http"
],
"tagged_values": {}
},
{
"sender": "config_service",
"receiver": "eureka_service",
"stereotypes": [
"restful_http"
],
"tagged_values": {}
},
{
"sender": "movie_service",
"receiver": "eureka_service",
"stereotypes": [
"restful_http"
],
"tagged_values": {}
},
{
"sender": "config_service",
"receiver": "movie_service",
"stereotypes": [
"restful_http"
],
"tagged_values": {}
},
{
"sender": "database_movie_service",
"receiver": "movie_service",
"stereotypes": [
"jdbc"
],
"tagged_values": {}
},
{
"sender": "user_service",
"receiver": "eureka_service",
"stereotypes": [
"restful_http"
],
"tagged_values": {}
},
{
"sender": "config_service",
"receiver": "user_service",
"stereotypes": [
"restful_http"
],
"tagged_values": {}
},
{
"sender": "database_user_service",
"receiver": "user_service",
"stereotypes": [
"jdbc",
"plaintext_credentials_link"
],
"tagged_values": {
"'Username'": "\"root\"",
" 'Password'": "\"root\""
}
},
{
"sender": "recommendation_service",
"receiver": "eureka_service",
"stereotypes": [
"restful_http"
],
"tagged_values": {}
},
{
"sender": "config_service",
"receiver": "recommendation_service",
"stereotypes": [
"restful_http"
],
"tagged_values": {}
},
{
"sender": "database_recommendation_service",
"receiver": "recommendation_service",
"stereotypes": [
"jdbc",
"plaintext_credentials_link"
],
"tagged_values": {
"'Username'": "\"neo4j\"",
" 'Password'": "\"root\""
}
},
{
"sender": "eureka_service",
"receiver": "recommendation_client",
"stereotypes": [
"restful_http"
],
"tagged_values": {}
},
{
"sender": "user",
"receiver": "recommendation_client",
"stereotypes": [
"restful_http"
],
"tagged_values": {}
},
{
"sender": "recommendation_client",
"receiver": "user",
"stereotypes": [
"restful_http"
],
"tagged_values": {}
},
{
"sender": "config_service",
"receiver": "recommendation_client",
"stereotypes": [
"restful_http"
],
"tagged_values": {}
},
{
"sender": "recommendation_client",
"receiver": "recommendation_service",
"stereotypes": [
"restful_http",
"circuit_breaker_link",
"load_balanced_link",
"feign_connection"
],
"tagged_values": {
"'Circuit Breaker'": "\"Hystrix\"",
" 'Load Balancer'": "\"Ribbon\""
}
},
{
"sender": "recommendation_client",
"receiver": "movie_service",
"stereotypes": [
"restful_http",
"circuit_breaker_link",
"load_balanced_link",
"feign_connection"
],
"tagged_values": {
"'Circuit Breaker'": "\"Hystrix\"",
" 'Load Balancer'": "\"Ribbon\""
}
},
{
"sender": "recommendation_client",
"receiver": "user_service",
"stereotypes": [
"restful_http",
"load_balanced_link",
"circuit_breaker_link",
"feign_connection"
],
"tagged_values": {
"'Load Balancer'": "\"Ribbon\"",
" 'Circuit Breaker'": "\"Hystrix\""
}
}
]
}
Model Items
The Application consists of a total of 122 elements:
Element | Count |
---|---|
Services | 6 |
External Entities | 5 |
Information Flows | 18 |
Annotations | 93 |
Total Items | 122 |
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 | ||
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 | ||
R17 | Evidence | Variant | |
R18 | Evidence | Variant |
Evidence and explanations for rule decisions
R1
Rule is adhered to: User only communicates with the Zuul gateway server. The API gateway used does not perform any authentication/authorization for requests.
Artifacts:
- RecommendationClientApplication.java: Line: 12
R2
Rule is violated: Services communicate internally over plain HTTP (See example artifacts). The communication is not authenticated.
Artifacts:
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.
R8
Rule is violated: All internal services communicate over insecure HTTP connections.
R9
Rule is violated: No central logging system is deployed.
R10
Rule is violated: No central logging system is deployed. Two internal services perform local logging, however none of the logs are consumed and accessed through monitoring software.
Artifacts:
R11
Rule is violated: Logs are not sanitized and could possibly contain sensitive information when exceptions in the recommendation service are logged.
Artifacts:
- MainController.java: Line: 51
R12
Rule is violated: No logs are collected and no message broker is deployed.
R13
Rule is adhered to: Hystrix is deployed as a circuit breaker on the gateway server.
Artifacts:
R14
Rule is adhered to: The gateway server uses load balancing via Ribbon to access dependent services.
Artifacts:
- RecommendationClientApplication.java: Line: 12
R15
This rule is not applicable: Not a service mesh deployment.
R16
Rule is adhered to:
- Registry Service (Eureka Server) with @EnableEurekaServer present.
- Project is missing infrastructure description, not certain if and how the discovery server is deployed.
- Services are not explicitly registered with Eureka and wont be secured by default.
Artifacts:
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:
R18
Rule is violated: No secret manager is deployed. The deployed git configuration server is not a secrets manager.
Artifacts:
- application.properties: Line: 3