Skip to content

Commit 0ef7bda

Browse files
authored
docs: update for v0.15.0 (#59)
1 parent 50634a2 commit 0ef7bda

25 files changed

Lines changed: 52 additions & 194 deletions

docs/catalyst/admin/install.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,18 @@ Catalyst is a self-hosted application.
88
You can install it on your own server or use a cloud provider.
99

1010
The latest release can be found on the [GitHub releases page](https://github.com/SecurityBrewery/catalyst/releases).
11-
The releases contain binaries for Linux and macOS.
11+
The releases contain binaries for Linux, macOS, and Windows.
1212

13-
Once you have downloaded the binary, and unpacked it, you can start Catalyst with `cataylst serve`.
13+
Once you have downloaded the binary, and unpacked it,
14+
you can create an admin user with `./catalyst admin create admin@example.com mysecretpassword`.
1415

15-
The console shows the server's admin UI URL, e.g. http://127.0.0.1:8090/_/.
16-
Open it and create an admin account.
16+
Run the server with `./catalyst serve`.
1717

18-
In the admin UI create users which can then log in to the user interface at http://127.0.0.1:8090/.
18+
For Windows you can use `catalyst.exe` instead of `./catalyst`.
1919

2020
## Configuration
2121

22-
At `Settings -> Application` you can configure the `Application URL` and set it to the URL where Catalyst is reachable.
23-
This is important for Python actions to work correctly.
22+
In the `Settings` you can configure the `App URL` and the `SMTP` settings for email notifications and Python actions to
23+
work correctly.
2424

25-
## Going to production
26-
27-
As Catalyst is based on PocketBase you can follow their
28-
[Going to production](https://pocketbase.io/docs/going-to-production/) guide.
25+
![Settings](/screenshots/settings.png)

docs/catalyst/admin/login.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/catalyst/admin/types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 45
44

55
# Ticket Types
66

7-
Ticket types can be configured in the [admin interface](login.md), in the `types` collection.
7+
Ticket types can be configured in when you are logged in as an admin or a user with the `type:write` permission.
88

99
There are two default ticket types: `Alert` and `Incident`, but you can add more types to fit your organization's needs.
1010

docs/catalyst/admin/users.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/catalyst/admin/webhooks.md

Lines changed: 0 additions & 86 deletions
This file was deleted.

docs/catalyst/engineer/reaction/action/python.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ The Python code is executed in the same environment as the Catalyst server,
1414
so be careful with the code you write and who has access to it.
1515
:::
1616

17-
[![Reactions](/screenshots/reaction_action_python.png)](/screenshots/reaction_action_python.png)
18-
1917
## Event Data
2018

2119
The Python action receives the event data from the trigger in the first argument.
@@ -36,18 +34,16 @@ print("id", ticket["record"]["id"])
3634

3735
The Python action provides a temporary `CATALYST_TOKEN` environment variable that can be used to authenticate with the
3836
Catalyst API.
39-
It can be used in combination with the [PocketBase Python SDK](https://github.com/vaphes/pocketbase)
40-
to interact with the Catalyst API
37+
It can be used to interact with the Catalyst API
4138

4239
```python
4340
import os
4441

45-
from pocketbase import PocketBase
42+
import requests
4643

47-
# Connect to the PocketBase server
48-
client = PocketBase('http://127.0.0.1:8090')
49-
client.auth_store.save(token=os.environ["CATALYST_TOKEN"])
44+
url = os.environ["CATALYST_APP_URL"]
45+
header = {"Authorization": "Bearer " + os.environ["CATALYST_TOKEN"]}
5046

5147
# Get users
52-
users = client.collection("users").get_list(1, 200)
48+
users = requests.get(url + "/api/users", headers=header).json()
5349
```

docs/catalyst/engineer/reaction/action/webhook.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ sidebar_position: 20
44

55
# HTTP / Webhook
66

7-
8-
[![Reactions](/screenshots/reaction_action_webhook.png)](/screenshots/reaction_action_webhook.png)
7+
The HTTP/Webhook action allows you to send an HTTP request to a webhook URL.
8+
This action is useful when you want to notify an external system about an event that occurred in Catalyst
9+
(e.g. a new ticket was created, a ticket was updated, etc.).

docs/catalyst/engineer/reaction/examples/assign_ticket.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,20 @@ import json
1616
import random
1717
import os
1818

19-
from pocketbase import PocketBase
19+
import requests
2020

2121
# Parse the ticket from the input
2222
ticket = json.loads(sys.argv[1])
2323

24-
# Connect to the PocketBase server
25-
client = PocketBase('http://127.0.0.1:8090')
26-
client.auth_store.save(token=os.environ["CATALYST_TOKEN"])
24+
url = os.environ["CATALYST_APP_URL"]
25+
header = {"Authorization": "Bearer " + os.environ["CATALYST_TOKEN"]}
2726

2827
# Get a random user
29-
users = client.collection("users").get_list(1, 200)
30-
random_user = random.choice(users.items)
28+
users = requests.get(url + "/api/users", headers=header).json()
29+
random_user = random.choice(users)
3130

3231
# Assign the ticket to the random user
33-
client.collection("tickets").update(ticket["record"]["id"], {
34-
"owner": random_user.id,
32+
requests.patch(url + "/api/tickets/" + ticket["record"]["id"], headers=header, json={
33+
"owner": random_user["id"]
3534
})
3635
```

docs/catalyst/engineer/reaction/examples/ingest_alerts.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 5
44

55
# Ingest Alerts
66

7-
This example demonstrates how to ingest alerts from a webhook into a PocketBase collection.
7+
This example demonstrates how to ingest alerts from a webhook.
88

99
The trigger for this example is a [webhook trigger](../trigger/webhook.md) that receives alerts from an external system.
1010
The webhook trigger passes a JSON event to the [Python action](../action/python.md) that contains the alert data.
@@ -15,20 +15,19 @@ import sys
1515
import json
1616
import os
1717

18-
from pocketbase import PocketBase
18+
import requests
1919

2020
# Parse the event from the webhook payload
2121
event = json.loads(sys.argv[1])
2222
body = json.loads(event["body"])
2323

24-
# Connect to the PocketBase server
25-
client = PocketBase('http://127.0.0.1:8090')
26-
client.auth_store.save(token=os.environ["CATALYST_TOKEN"])
24+
url = os.environ["CATALYST_APP_URL"]
25+
header = {"Authorization": "Bearer " + os.environ["CATALYST_TOKEN"]}
2726

2827
# Create a new ticket
29-
client.collection("tickets").create({
30-
"name": body["name"],
31-
"type": "alert",
32-
"open": True,
28+
requests.post(url + "/api/tickets", headers=header, json={
29+
"name": body["name"],
30+
"type": "alert",
31+
"open": True,
3332
})
3433
```

docs/catalyst/engineer/reaction/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ The trigger listens for events and the action is executed when the trigger is ac
2424
## Examples
2525

2626
- [Assign new tickets to random users](./examples/assign_ticket): Assign new tickets to random users.
27-
- [Ingest alerts](./examples/ingest_alerts): Ingest alerts from a webhook into a PocketBase collection.
27+
- [Ingest alerts](./examples/ingest_alerts): Ingest alerts from a webhook.

0 commit comments

Comments
 (0)