Application Layer

ApplicationCoordinates

In ALFI, each application has a set of identifying attributes. This set of attributes is named ApplicationCoordinates and is used to determine when an application matches an attack.

AWS Lambda Function

  • Dependency: alfi-aws
  • .inferFromEnvironment() will extract the region and name of your Lambda function from your environment and use it as the Region and Name fields respectively the in the Gremlin UI.
java
1ApplicationCoordinates coords = AwsApplicationCoordinatesResolver.inferFromEnvironment()
2 .orElseThrow(IllegalStateException::new);

AWS Lambda Function

AWS EC2 Application

  • Dependency: alfi-aws
  • .inferFromEnvironment() will extract the region, availability zone and instance ID from your environment and use it as the Region, Availability Zone and Instance ID fields respectively the in the Gremlin UI.
java
1ApplicationCoordinates coords = AwsApplicationCoordinatesResolver.inferFromEnvironment()
2 .orElseThrow(IllegalStateException::new);

AWS EC2 Application

Custom Application Type

Let's imagine you have an application called TheShop which contains a UserService and a PaymentService. In this case, to uniquely identify each of these services in the Gremlin control plane, you would construct two ApplicationCoordinates, each with the same value set for the withType(...) field and a unique value set for the .withField(...).

java
1ApplicationCoordinates coords = ApplicationCoordinates.Builder()
2 .withType("TheShop")
3 .withField("service", "UserService")
4 .build();
java
1ApplicationCoordinates coords = ApplicationCoordinates.Builder()
2 .withType("TheShop")
3 .withField("service", "PaymentService")
4 .build();

Take notice of the withType(...) and withField(...) methods. The value defined in the withType(...) method will need to be defined in the Name field of the Gremlin UI (see images below). The value defined in the withField(...) method will need to be defined in the Custom Value field of the Gremlin UI (see images below).

Custom Application Type

Custom Application Type Single Service