### OpenAPI Definition Example (JSON) Source: https://docs.alertlogic.com/configure/inline-waf/manual/ref_services_policy_policy_global_TocPath=Configure%7CInline+WAF%7CWeb+Application+Firewall%C2%A0Manual%7CWeb+Application+Firewall%7C_____5 This JSON object represents a modified version of the petstore.json API definition. It illustrates core OpenAPI concepts such as API metadata, server information, available paths with their operations (GET, POST), request parameters, and response structures. It serves as a practical example for understanding and generating API documentation. ```json { "openapi": "3.0.0", "info": { "title": "Fortra Petstore Example", "description": "A sample API to illustrate OpenAPI concepts", "version": "1.0.0", "license": { "name": "MIT" } }, "servers": [ { "url": "http://petstore.swagger.io/v1", "description": "Main (production) server" } ], "paths": { "/pets": { "get": { "summary": "List all pets", "operationId": "listPets", "tags": [ "pets" ], "parameters": [ { "name": "limit", "in": "query", "description": "How many items to return at one time (max 100)", "required": false, "schema": { "type": "integer", "maximum": 100, "format": "int32" } } ], "responses": { "200": { "description": "A paged array of pets", "headers": { "x-next": { "description": "A link to the next page of responses", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Pets" } } } }, "default": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "post": { "summary": "Create a pet", "operationId": "createPets", "tags": [ "pets" ], "requestBody": { "description": "Pet object that needs to be added to the store", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Pet" } } } }, "responses": { "201": { "description": "Null response" }, "default": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/pets/{petId}": { "get": { "summary": "Info for a specific pet", "operationId": "showPetById", "tags": [ "pets" ], "parameters": [ { "name": "petId", "in": "path", "required": true, "description": "The id of the pet to retrieve", "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Expected response to a valid request", "content": { ``` -------------------------------- ### Nginx Combined Log Format Example Source: https://docs.alertlogic.com/configure/wla-configuration_TocPath=Configure%7C_____15 An example of the standard Nginx Combined Log Format. This format can be used as a base if the `wla_access_log` format is not adopted, but requires manual addition of specific security fields. ```nginx log_format combined_proxy '$remote_addr - $remote_user [$time_local] ', '"$request" $status $body_bytes_sent ', '"$http_referer" "$http_user_agent" ', '"$http_x_forwarded_for"'; ``` -------------------------------- ### Configure Alert Logic Agent Service (Windows) Source: https://docs.alertlogic.com/prepare/alert-logic-agent-windows Sets the Alert Logic agent service to start automatically and controls the agent's start and stop states. Used for preparing images and ensuring the agent runs after installation or manual intervention. ```batch sc config al_agent start= auto sc stop al_agent sc start al_agent ``` -------------------------------- ### Install Remote Collector on Debian Source: https://docs.alertlogic.com/prepare/remote-log-collector-linux_TocPath=Prepare%7CLog+Collectors%7C_____1 Commands to install the Alert Logic remote collector on Debian-based distributions. This includes package installation, service provisioning, and starting the service. For AWS/Azure, no key is needed; for Data Center, a unique registration key is required. ```bash dpkg -i al-log-syslog-*.deb /etc/init.d/al-log-syslog provision /etc/init.d/al-log-syslog start ``` ```bash dpkg -i al-log-syslog-*.deb /etc/init.d/al-log-syslog provision --key /etc/init.d/al-log-syslog start ``` -------------------------------- ### Redirect Externally To Examples Source: https://docs.alertlogic.com/configure/inline-waf/manual/ref_services_virtual_host Examples of valid URLs for external redirects, demonstrating the use of placeholders like $c1, $c2, and $c9 to substitute captured groups from the match expression. ```url http://www.alertlogic.com/foo ``` ```url http://www.alertlogic.com/$c1 ``` -------------------------------- ### Example: Calculate SHA1 Hash with certutil Source: https://docs.alertlogic.com/deploy/al-xdr_TocPath=Deploy%7C_____11 An example demonstrating how to use the `certutil` command to calculate the SHA1 hash of the Alert Logic Agent executable. This specific example targets the `dgwip.exe` file located in the default installation directory. ```bash certutil -hashfile "c:\Program Files\dgagent\dgwip.exe" SHA1 ``` -------------------------------- ### Vhost Regex Redirect Example Source: https://docs.alertlogic.com/configure/inline-waf/manual/ref_services_virtual_host Example configuration for virtual host redirection. It redirects requests from a specific virtual host (e.g., 'somehost.somename.cc') to a new URL structure on a different host. ```configuration Match type: vhost regex Match: (\w+)\.somename\.(\w){1,5} Redirect externally to: http://www.somename.tld/$c2/$c1 ```