-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
L4-7 models #263
base: master
Are you sure you want to change the base?
L4-7 models #263
Changes from 31 commits
6cbd1fd
a23befe
a530881
b5f4a54
084b9a4
4d4f47b
fea185c
edd99ca
4da8e6b
d25e0c9
7673243
f4ad745
21d176d
098886b
24a27e9
8cb7990
51fab7a
18c5e63
d9e832a
375dbc2
e8994a8
daf8f63
9b43e80
78ed28f
62e9162
a00158b
635c867
b897b7f
f5c76af
3ab6257
b4b40d0
98b7894
e3b4a7f
8c5bc80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
components: | ||
schemas: | ||
App: | ||
description: >- | ||
A container for emulated TCP/UDP , application protocols, attacks and it's traffic configurations. | ||
type: object | ||
properties: | ||
tcp: | ||
description: >- | ||
The properties of TCP and its children, | ||
type: array | ||
items: | ||
$ref: './tcp/tcp.yaml#/components/schemas/App.Tcp' | ||
x-field-uid: 1 | ||
http_client: | ||
description: >- | ||
The properties of HTTP client, | ||
type: array | ||
items: | ||
$ref: './http/httpclient.yaml#/components/schemas/App.HttpClient' | ||
x-field-uid: 2 | ||
http_server: | ||
description: >- | ||
The properties of HTTP server, | ||
type: array | ||
items: | ||
$ref: './http/httpserver.yaml#/components/schemas/App.HttpServer' | ||
x-field-uid: 3 | ||
ssl: | ||
description: >- | ||
SSL configuration | ||
type: array | ||
items: | ||
$ref: './ssl/ssl.yaml#/components/schemas/App.Ssl' | ||
x-field-uid: 4 | ||
stateful_flows: | ||
description: >- | ||
Traffic configuration of endpoints. | ||
type: array | ||
items: | ||
$ref: './statefull_flow/statefulflow.yaml#/components/schemas/StatefulFlow' | ||
x-field-uid: 5 | ||
name: | ||
x-include: ../common/common.yaml#/components/schemas/Named.Object/properties/name | ||
x-field-uid: 6 | ||
required: [name] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
components: | ||
schemas: | ||
HttpClient.Client: | ||
description: >- | ||
One or more HTTP Client configurations and its HTTP methods configs. | ||
type: object | ||
properties: | ||
transport_name: | ||
description: >- | ||
Transport interface that can be attached to TCP. In the same apps or different apps container. | ||
type: string | ||
x-constraint: | ||
- '/components/schemas/App.Tcp/properties/name' | ||
x-field-uid: 1 | ||
http_version: | ||
description: >- | ||
HTTP Version | ||
type: string | ||
x-field-uid: 2 | ||
x-enum: | ||
"v10": | ||
x-field-uid: 1 | ||
"v11": | ||
x-field-uid: 2 | ||
"v20": | ||
x-field-uid: 3 | ||
default: "v10" | ||
cookie_jar_size: | ||
description: >- | ||
cookie_jar_size the number of cookies that will be saved for each client. The maximum value of this is 300. (only if enable_cookie_support is enabled) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cookie_jar_size the number -> The number There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not define max for this field to be 300? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably need rewording of (only if enable_cookie_support is enabled). when enable_cookie_support is on, this is the number of cookies ... |
||
type: integer | ||
default: 10 | ||
x-field-uid: 3 | ||
cookie_reject_probability: | ||
description: >- | ||
cookie_reject_probability indicates the probability, from 0 or 1, that a client will reject a request for a cookie(s) contents from the server. (only if enable_cookie_support is enabled) | ||
type: boolean | ||
default: 0 | ||
x-field-uid: 4 | ||
enable_cookie_support: | ||
description: >- | ||
The client will support cookie retention, as indicated in the cookie_jar_size and cookie_reject_probability | ||
type: boolean | ||
default: false | ||
x-field-uid: 5 | ||
command_timeout: | ||
description: >- | ||
HTTP command timeout timer in seconds | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. declare reasonable min/max please, so that it is testable within reasons. |
||
type: number | ||
default: 600 | ||
x-field-uid: 6 | ||
methods: | ||
description: >- | ||
The HTTP methods such as GET, POST and its properties. | ||
type: array | ||
items: | ||
$ref: './method.yaml#/components/schemas/Http.Method' | ||
x-field-uid: 10 | ||
name: | ||
x-include: ../common/common.yaml#/components/schemas/Named.Object/properties/name | ||
x-field-uid: 11 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
components: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does it make sense to just have this wrap HttpClient.Client which is defined in the client.yaml file? meaning, are there common client properties that we envision to be among all kinds of clients other than HTTP? If yes, that would go to client.yaml, but the httpclient specific options should just be in this file? same comment for httpserver.yaml vs. server.yaml |
||
schemas: | ||
App.HttpClient: | ||
description: >- | ||
Configurations of one or more HTTP client. | ||
type: object | ||
properties: | ||
client: | ||
$ref: './client.yaml#/components/schemas/HttpClient.Client' | ||
x-field-uid: 1 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
components: | ||
schemas: | ||
App.HttpServer: | ||
description: >- | ||
Configurations of one or more HTTP server. | ||
type: object | ||
properties: | ||
server: | ||
$ref: './server.yaml#/components/schemas/HttpServer.Server' | ||
x-field-uid: 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
components: | ||
schemas: | ||
Http.Method: | ||
type: object | ||
properties: | ||
choice: | ||
type: string | ||
default: get | ||
x-field-uid: 1 | ||
x-enum: | ||
get: | ||
x-field-uid: 1 | ||
post: | ||
x-field-uid: 2 | ||
get: | ||
x-field-uid: 2 | ||
$ref: '#/components/schemas/Method.Get' | ||
post: | ||
x-field-uid: 3 | ||
$ref: '#/components/schemas/Method.Post' | ||
|
||
Method.Get: | ||
description: >- | ||
A GET operation of HTTP client. Retrieves the page from the HTTP Server. | ||
type: object | ||
required: [server, page] | ||
properties: | ||
server: | ||
description: >- | ||
Server name/IP address | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The HTTP server name or IP address. |
||
type: string | ||
x-field-uid: 1 | ||
page: | ||
description: >- | ||
The page url/name to perform HTTP GET operation. | ||
type: string | ||
x-field-uid: 2 | ||
Method.Post: | ||
description: >- | ||
A POST operation of HTTP client. To post the data on HTTP Server. | ||
type: object | ||
required: [server, page] | ||
properties: | ||
server: | ||
description: >- | ||
Server name/IP address | ||
type: string | ||
x-field-uid: 1 | ||
page: | ||
description: >- | ||
The page url/name to perform HTTP POST operation. | ||
type: string | ||
x-field-uid: 2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
components: | ||
schemas: | ||
HttpServer.Server: | ||
description: >- | ||
One or more HTTP Server configurations. | ||
type: object | ||
properties: | ||
transport_name: | ||
description: >- | ||
Transport interface that can be attached to TCP. In the same apps or different apps container. | ||
type: string | ||
x-constraint: | ||
- '/components/schemas/App.Tcp/properties/name' | ||
x-field-uid: 1 | ||
http_version: | ||
description: >- | ||
HTTP Version | ||
type: string | ||
x-field-uid: 2 | ||
x-enum: | ||
"v10": | ||
x-field-uid: 1 | ||
"v11": | ||
x-field-uid: 2 | ||
"v20": | ||
x-field-uid: 3 | ||
default: "v10" | ||
http_port: | ||
description: >- | ||
The port number to which the HTTP server will respond to non-SSL requests. | ||
type: integer | ||
default: 80 | ||
x-field-uid: 3 | ||
request_timeout: | ||
description: >- | ||
The number of seconds that the server will wait for input on an open connection before closing the session with a 408 error. | ||
type: integer | ||
default: 300 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reasonable min/max? |
||
x-field-uid: 4 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
components: | ||
schemas: | ||
App.Ssl: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this a separate node and not a parameter within HTTP itself? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also does this enable ssl for all the http clients/servers in the app? Having it on the client/server itself would be more flexible? |
||
description: >- | ||
SSL configuration . | ||
type: object | ||
properties: | ||
enable: | ||
description: >- | ||
Enable SSL for HTTP | ||
type: boolean | ||
default: false | ||
x-field-uid: 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
components: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. directory name statefull_flow -> stateful_flow |
||
schemas: | ||
StatefulFlow.Client: | ||
description: >- | ||
Client traffic configs. | ||
type: object | ||
properties: | ||
endpoints: | ||
description: >- | ||
EndPoint configuration for one or more emulated apps. | ||
type: array | ||
items: | ||
$ref: './endpoints.yaml#/components/schemas/Endpoints.Client' | ||
x-field-uid: 1 | ||
protocol: | ||
description: >- | ||
Protocol to use for test, such as HTTP, TCP | ||
type: string | ||
x-constraint: | ||
- '/components/schemas/App.Tcp/properties/name' | ||
- '/components/schemas/App.Http/properties/name' | ||
x-field-uid: 2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
components: | ||
schemas: | ||
Endpoints.Client: | ||
description: >- | ||
Endpoint configs for Client. | ||
type: object | ||
properties: | ||
ip_interface_name: | ||
description: >- | ||
IPv4/v6 interface name, which is configured in devices. | ||
type: string | ||
x-constraint: | ||
- '/components/schemas/Device.Ipv4Base/properties/name' | ||
- '/components/schemas/Device.Ipv6Base/properties/name' | ||
x-field-uid: 1 | ||
ports: | ||
x-field-pattern: | ||
description: >- | ||
TCP port range | ||
format: integer | ||
length: 3 | ||
default: 80 | ||
features: [count] | ||
x-field-uid: 2 | ||
|
||
Endpoints.Server: | ||
description: >- | ||
Endpoint configs for Server. | ||
type: object | ||
properties: | ||
dest: | ||
$ref: '#/components/schemas/Endpoints.Dest' | ||
x-field-uid: 1 | ||
ports: | ||
x-field-pattern: | ||
description: >- | ||
TCP port range | ||
format: integer | ||
length: 3 | ||
default: 80 | ||
features: [count] | ||
x-field-uid: 2 | ||
|
||
Endpoints.Dest: | ||
description: >- | ||
Endpoint destination config for server. | ||
type: object | ||
properties: | ||
choice: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. expand the choice to differentiate between ipv6_address and ipv4_address, the type will be string and the format will be ipv4 and ipv6 respectively There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
type: string | ||
default: name | ||
x-field-uid: 1 | ||
x-enum: | ||
name: | ||
x-field-uid: 1 | ||
ipv4_address: | ||
x-field-uid: 2 | ||
ipv6_address: | ||
x-field-uid: 3 | ||
name: | ||
description: >- | ||
IPv4/v6 interface name | ||
type: string | ||
x-constraint: | ||
- '/components/schemas/Device.Ipv4Base/properties/name' | ||
- '/components/schemas/Device.Ipv6Base/properties/name' | ||
x-field-uid: 2 | ||
ipv4_address: | ||
description: >- | ||
IPv4 address of the server with prefix length of 32. | ||
type: string | ||
x-field-uid: 3 | ||
format: ipv4 | ||
ipv6_address: | ||
description: >- | ||
IPv6 address of the server with prefix length of 128. | ||
type: string | ||
x-field-uid: 4 | ||
format: ipv6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's -> its