Skip to content

Commit 501a201

Browse files
authored
Merge pull request #472 from ganesh-k13/bot-1.22
BOT 1.22 Support
2 parents f1adeea + 69bbf51 commit 501a201

4 files changed

Lines changed: 187 additions & 486 deletions

File tree

crd/bot/README.md

Lines changed: 10 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -24,175 +24,6 @@ Based on the type of protections required, you can specify the metadata and use
2424

2525
The Bot CRD is available in the Citrix ingress controller GitHub repo at [bot-crd.yaml](https://raw.githubusercontent.com/citrix/citrix-k8s-ingress-controller/master/crd/bot/bot-crd.yaml). The Bot CRD provides attributes for the various options that are required to define the bot management policies on Citrix ADC.
2626

27-
The following is the Bot CRD definition:
28-
29-
```yml
30-
apiVersion: apiextensions.k8s.io/v1beta1
31-
kind: CustomResourceDefinition
32-
metadata:
33-
name: bots.citrix.com
34-
spec:
35-
group: citrix.com
36-
version: v1
37-
names:
38-
kind: bot
39-
plural: bots
40-
singular: bot
41-
scope: Namespaced
42-
subresources:
43-
status: {}
44-
additionalPrinterColumns:
45-
- name: Status
46-
type: string
47-
description: "Current Status of the CRD"
48-
JSONPath: .status.state
49-
- name: Message
50-
type: string
51-
description: "Status Message"
52-
JSONPath: .status.status_message
53-
validation:
54-
openAPIV3Schema:
55-
required: [spec]
56-
properties:
57-
spec:
58-
type: object
59-
properties:
60-
servicenames:
61-
description: 'Name of the services to which the bot policies are applied.'
62-
type: array
63-
items:
64-
type: string
65-
maxLength: 127
66-
signatures:
67-
description: 'Location of external bot signature file'
68-
type: string
69-
redirect_url:
70-
description: 'url to redirect when bot violation is hit'
71-
type: string
72-
target:
73-
description: 'To control what traffic to be inspected by BOT. If you do not provide the target, everything will be inspected by default'
74-
type: object
75-
properties:
76-
paths:
77-
type: array
78-
description: "List of http urls to inspect"
79-
items:
80-
type: string
81-
description: "URL path"
82-
method:
83-
type: array
84-
description: "List of http methods to inspect"
85-
items:
86-
type: string
87-
enum: ['GET', 'PUT', 'POST','DELETE']
88-
header:
89-
type: array
90-
description: "List of http headers to inspect"
91-
items:
92-
type: string
93-
description: "header name"
94-
security_checks:
95-
description: 'To enable/disable bot ecurity checks'
96-
type: object
97-
properties:
98-
allow_list:
99-
type: string
100-
enum: ['ON', 'OFF']
101-
block_list:
102-
type: string
103-
enum: ['ON', 'OFF']
104-
device_fingerprint:
105-
oneOf:
106-
- type: string
107-
enum: ['ON', 'OFF']
108-
- type: object
109-
properties:
110-
action:
111-
type: array
112-
items:
113-
type: string
114-
reputation:
115-
type: string
116-
enum: ['ON', 'OFF']
117-
ratelimit:
118-
type: string
119-
enum: ['ON', 'OFF']
120-
tps:
121-
type: string
122-
enum: ['ON', 'OFF']
123-
trap:
124-
oneOf:
125-
- type: string
126-
enum: ['ON', 'OFF']
127-
- type: object
128-
properties:
129-
action:
130-
type: array
131-
items:
132-
type: string
133-
relaxations:
134-
description: 'Section which contains binding rules for bot security checks'
135-
type: object
136-
properties:
137-
allow_list:
138-
type: array
139-
items:
140-
type: object
141-
properties:
142-
subnet:
143-
type: object
144-
ip:
145-
type: object
146-
expression:
147-
type: object
148-
149-
block_list:
150-
type: array
151-
items:
152-
type: object
153-
properties:
154-
subnet:
155-
type: object
156-
ip:
157-
type: object
158-
expression:
159-
type: object
160-
ratelimit:
161-
type: array
162-
items:
163-
type: object
164-
properties:
165-
url:
166-
type: object
167-
ip:
168-
type: object
169-
cookie:
170-
type: object
171-
reputation:
172-
type: object
173-
properties:
174-
categories:
175-
oneOf:
176-
- type: string
177-
- type: object
178-
captcha:
179-
type: array
180-
tps:
181-
type: object
182-
properties:
183-
geolocation:
184-
type: object
185-
host:
186-
type: object
187-
ip:
188-
type: object
189-
host:
190-
type: object
191-
trap:
192-
type: object
193-
194-
```
195-
19627
## Bot CRD attributes
19728

19829
The following table lists the various attributes provided in the Bot CRD:
@@ -381,13 +212,16 @@ spec:
381212
- frontend
382213
redirect_url: "/error_page.html"
383214
security_checks:
384-
trap: ["log","drop"]
385-
bindings:
386-
trap:
387-
urls:
215+
trap:
216+
action:
217+
- "log"
218+
- "drop"
219+
bindings:
220+
trapinsertion:
221+
urls:
388222
- "/index.html"
389-
- "/submit.php"
390-
- "/login.html"
223+
- "/submit.php"
224+
- "/login.html"
391225
```
392226

393227
**Enable IP reputation to reject requests of a particular category**
@@ -446,4 +280,4 @@ spec:
446280
action:
447281
- "log"
448282
- "reset"
449-
```
283+
```

0 commit comments

Comments
 (0)