You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you receive a `200 OK`, you can authenticate to the AppSec Component. If the component is misconfigured or your API key is invalid, you will receive a `401 Unauthorized`:
We can now query our AppSec Component (we're assuming here that it runs on the default `127.0.0.1:7422`, see the `listen_addr` parameter of the acquisition config):
@@ -130,11 +130,11 @@ There are different decisions `SOURCE`:
130
130
## Add/Remove decisions
131
131
132
132
```bash
133
-
cscli decisions add -i 1.2.3.4
134
-
cscli decisions delete -i 1.2.3.4
133
+
cscli decisions add -i 192.168.1.1
134
+
cscli decisions delete -i 192.168.1.1
135
135
```
136
136
137
-
Those commands will respectively add a manual decision for ip `1.2.3.4` (with default parameters such as duration and such), and remove all active decisions for ip `1.2.3.4`.
137
+
Those commands will respectively add a manual decision for ip `192.168.1.1` (with default parameters such as duration and such), and remove all active decisions for ip `192.168.1.1`.
[{"duration":"3h51m57.363171728s","id":2336,"origin":"cscli","scenario":"manual 'ban' from '939972095cf1459c8b22cc608eff85daEb4yoi2wiTD7Y3fA'","scope":"Ip","type":"ban","value":"1.2.3.4"}]
[{"duration":"3h51m57.363171728s","id":2336,"origin":"cscli","scenario":"manual 'ban' from '939972095cf1459c8b22cc608eff85daEb4yoi2wiTD7Y3fA'","scope":"Ip","type":"ban","value":"192.168.1.1"}]
97
97
```
98
98
99
99
```bash title="Query a single IP"
@@ -112,7 +112,7 @@ _note: notice that the decision returned is the range that we banned earlier and
112
112
113
113
```bash title="Query a range in which one of the ban is contained"
[{"duration":"3h48m7.676653651s","id":2336,"origin":"cscli","scenario":"manual 'ban' from '939972095cf1459c8b22cc608eff85daEb4yoi2wiTD7Y3fA'","scope":"Ip","type":"ban","value":"1.2.3.4"}]
115
+
[{"duration":"3h48m7.676653651s","id":2336,"origin":"cscli","scenario":"manual 'ban' from '939972095cf1459c8b22cc608eff85daEb4yoi2wiTD7Y3fA'","scope":"Ip","type":"ban","value":"192.168.1.1"}]
116
116
```
117
117
_note: notice the `contains` flag that is set to false_
Copy file name to clipboardExpand all lines: crowdsec-docs/docs/local_api/profiles/format.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,7 @@ It is a list of `models.Decision` objects. The following fields, when present, a
102
102
- `scope` : defines the scope of the resulting decision
103
103
- `duration` : defines for how long will the decision be valid. The format must comply with [golang's ParseDuration](https://pkg.go.dev/time#ParseDuration)
104
104
- `type` : defines the type of the remediation that will be applied by available bouncers, for example `ban`, `captcha`
105
-
- `value` : define a hardcoded value for the decision (ie. `1.2.3.4`)
105
+
- `value` : define a hardcoded value for the decision (ie. `192.168.1.1`)
@@ -272,26 +272,26 @@ Again, further inspection with `cscli hubtest explain` will show us more about w
272
272
273
273
```bash
274
274
▶ cscli hubtest explain myservice-logs
275
-
line: Dec 8 06:28:43 mymachine myservice[2806]: bad password for user 'toto' from '1.2.3.4'
275
+
line: Dec 8 06:28:43 mymachine myservice[2806]: bad password for user 'toto' from '192.168.1.1'
276
276
├ s00-raw
277
277
| └ 🟢 crowdsecurity/syslog-logs
278
278
└ s01-parse
279
279
└ 🟢 crowdsecurity/myservice-logs
280
280
281
-
line: Dec 8 06:28:43 mymachine myservice[2806]: unknown user 'toto' from '1.2.3.4'
281
+
line: Dec 8 06:28:43 mymachine myservice[2806]: unknown user 'toto' from '192.168.1.1'
282
282
├ s00-raw
283
283
| └ 🟢 crowdsecurity/syslog-logs
284
284
└ s01-parse
285
285
└ 🟢 crowdsecurity/myservice-logs
286
286
287
-
line: Dec 8 06:28:43 mymachine myservice[2806]: accepted connection for user 'toto' from '1.2.3.4'
287
+
line: Dec 8 06:28:43 mymachine myservice[2806]: accepted connection for user 'toto' from '192.168.1.1'
288
288
├ s00-raw
289
289
| └ 🟢 crowdsecurity/syslog-logs
290
290
└ s01-parse
291
291
└ 🔴 crowdsecurity/myservice-logs
292
292
```
293
293
294
-
__note: we can see that our log line `accepted connection for user 'toto' from '1.2.3.4'` wasn't parsed by `crowdsecurity/myservice-logs` as we have no pattern for it__
294
+
__note: we can see that our log line `accepted connection for user 'toto' from '192.168.1.1'` wasn't parsed by `crowdsecurity/myservice-logs` as we have no pattern for it__
0 commit comments