# Workflow

# Concept

A workflow allows to control the security flows into a protected application. Default wokflows are delivered with product but you can define you own workflows as code.

---
apiVersion: core/v1beta
kind: Workflow
metadata:
  name: my-workflow
spec:
  entrypoint: main
  source: |-
    package main

    func main(icx_policy ICXConfiguration, exceptions SecurityExceptionConfiguration) {
        ActionICXSecurityEngine(Args{"configuration": "${params.icx_policy}"})
        ActionSecurityExceptionManagement(Args{"configuration": "${params.exceptions}"})
        if security.exception.blocked == true {
            ActionLogAlert()
            ActionGenerateResponse(Args{"status": "403", "content": "<html><head><title>403 Forbidden</title></head><body><h1>Forbidden</h1><p>You don't have permission to access ${http.request.path} on this server.</p></body></html>"})
        } else {
            ActionProxyRequest()
        }
    }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

# Fields

  • entrypoint: the entry point is the name of the main function to be called if several functions are described in source.
  • source: it contains the workflow as golang code.
Last Updated: 2/14/2022, 10:46:05 AM