Skip to content

Commit 4309c60

Browse files
committed
Change prefix of tools from "crypto-auditing-" to "crau-"
Also change the systemd unit name accordingly. This would spare typing the commands. Signed-off-by: Daiki Ueno <[email protected]>
1 parent 36a927f commit 4309c60

File tree

21 files changed

+50
-33
lines changed

21 files changed

+50
-33
lines changed

GNUmakefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ endif
1515
systemdsystemunitdir := $(shell pkg-config systemd --variable=systemdsystemunitdir)
1616

1717
programs = \
18-
${TARGETDIR}/${PROFILE}/crypto-auditing-agent \
19-
${TARGETDIR}/${PROFILE}/crypto-auditing-client \
20-
${TARGETDIR}/${PROFILE}/crypto-auditing-event-broker \
21-
${TARGETDIR}/${PROFILE}/crypto-auditing-log-parser
18+
${TARGETDIR}/${PROFILE}/crau-agent \
19+
${TARGETDIR}/${PROFILE}/crau-client \
20+
${TARGETDIR}/${PROFILE}/crau-event-broker \
21+
${TARGETDIR}/${PROFILE}/crau-log-parser
2222

2323
conffiles = \
2424
dist/conf/agent.conf \
@@ -45,8 +45,9 @@ install: install-programs
4545
for f in $(conffiles); do \
4646
install -D -m 644 -S .orig -t /etc/crypto-auditing "$$f"; \
4747
done
48-
install -D -m 644 -t ${DESTDIR}$(systemdsystemunitdir) dist/systemd/system/crypto-auditing-agent.service
49-
install -D -m 644 -t ${DESTDIR}$(systemdsystemunitdir) dist/systemd/system/crypto-auditing-event-broker.service
48+
install -D -m 644 -t ${DESTDIR}$(systemdsystemunitdir) dist/systemd/system/crau-agent.service
49+
install -D -m 644 -t ${DESTDIR}$(systemdsystemunitdir) dist/systemd/system/crau-event-broker.service
50+
install -D -m 644 -t ${DESTDIR}$(systemdsystemunitdir) dist/systemd/system/crau-event-broker.socket
5051
install -d ${DESTDIR}/run/crypto-auditing
5152
install -d ${DESTDIR}/var/log/crypto-auditing
5253

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ $ cp $(rpm -ql kernel-devel | grep '/vmlinux.h$' | tail -1) agent/src/bpf
5757
$ sudo groupadd crypto-auditing
5858
$ sudo useradd -g crypto-auditing
5959
```
60-
2. Modify systemd configuration for agent in `/lib/systemd/system/crypto-auditing-agent.service`:
60+
2. Modify systemd configuration for agent in `/lib/systemd/system/crau-agent.service`:
6161
```ini
6262
User=crypto-auditing
6363
Group=crypto-auditing
6464
```
65-
3. Modify systemd configuration for event-broker in `/lib/systemd/system/crypto-auditing-event-broker.socket`:
65+
3. Modify systemd configuration for event-broker in `/lib/systemd/system/crau-event-broker.socket`:
6666
```ini
6767
SocketUser=crypto-auditing
6868
SocketGroup=crypto-auditing
@@ -76,13 +76,13 @@ user = "crypto-auditing:crypto-auditing"
7676
5. Enable agent and event-broker
7777
```console
7878
$ sudo systemctl daemon-reload
79-
$ sudo systemctl start crypto-auditing-agent.service
80-
$ sudo systemctl start crypto-auditing-event-broker.socket
79+
$ sudo systemctl start crau-agent.service
80+
$ sudo systemctl start crau-event-broker.socket
8181
```
8282
6. Connect to event-broker with client
8383
```console
84-
$ crypto-auditing-client --scope tls --format json
85-
$ crypto-auditing-client --scope tls --format cbor --output audit.cborseq
84+
$ crau-client --scope tls --format json
85+
$ crau-client --scope tls --format cbor --output audit.cborseq
8686
```
8787
7. On another terminal, run any commands using the instrumented library
8888
```console
@@ -96,9 +96,9 @@ $ gnutls-cli --x509cafile=doc/credentials/x509/ca.pem localhost -p 5556 --priori
9696

9797
In the above example, client stores logs as a sequence of
9898
CBOR objects, which can be parsed and printed as a tree with the
99-
`crypto-auditing-log-parser` executable:
99+
`crau-log-parser` executable:
100100
```console
101-
$ crypto-auditing-log-parser audit.cborseq
101+
$ crau-log-parser audit.cborseq
102102
[
103103
{
104104
"context": "33acb8e6ccc65bb285bd2f84cac3bf80",
@@ -195,7 +195,7 @@ From the tree output, a flamegraph can be produced with the
195195
`scripts/flamegraph.py`:
196196

197197
```console
198-
$ crypto-auditing-log-parser audit.cborseq | python scripts/flamegraph.py -
198+
$ crau-log-parser audit.cborseq | python scripts/flamegraph.py -
199199
dumping data to flamegraph.html
200200
```
201201

agent/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ libbpf-cargo.workspace = true
3737
tempfile.workspace = true
3838
plain.workspace = true
3939
agenttest = { path = "tests/agenttest" }
40+
41+
[[bin]]
42+
name = "crau-agent"
43+
path = "src/agent.rs"

agent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
[![crates.io badge](https://img.shields.io/crates/v/crypto-auditing-agent.svg)](https://crates.io/crates/crypto-auditing-agent)
44

5-
This crate provides the crypto-auditing-agent executable. To see the whole architecture, see the design [document](https://github.com/latchset/crypto-auditing/blob/main/docs/architecture.md).
5+
This crate provides the `crau-agent` executable. To see the whole architecture, see the design [document](https://github.com/latchset/crypto-auditing/blob/main/docs/architecture.md).
66

77
To see how to set up and run the agent, see the [instructions](https://github.com/latchset/crypto-auditing/blob/main/README.md#running).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ mod tests {
279279
// files can be generated by exercising the GnuTLS session after
280280
// starting up the agent with:
281281
//
282-
// sudo target/debug/crypto-auditing-agent -c agent/fixtures/agent.conf \
282+
// sudo target/debug/crau-agent -c agent/fixtures/agent.conf \
283283
// --library /usr/lib64/libgnutls.so.30 --user $USER:$GID \
284284
// --trace-file fixtures/normal/input.cborseq \
285285
// --log-file fixtures/normal/output.cborseq

agent/tests/coalesce.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl Drop for AgentProcess {
4747
fn test_probe_coalesce() {
4848
bump_memlock_rlimit().expect("unable to bump memlock rlimit");
4949

50-
let agent_path = target_dir().join("crypto-auditing-agent");
50+
let agent_path = target_dir().join("crau-agent");
5151
let log_dir = tempdir().expect("unable to create temporary directory");
5252
let log_path = log_dir.path().join("agent.log");
5353
let process = Command::new(&agent_path)

agent/tests/composite.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ struct EventData {
5555
fn test_probe_composite() {
5656
bump_memlock_rlimit().expect("unable to bump memlock rlimit");
5757

58-
let agent_path = target_dir().join("crypto-auditing-agent");
58+
let agent_path = target_dir().join("crau-agent");
5959
let log_dir = tempdir().expect("unable to create temporary directory");
6060
let log_path = log_dir.path().join("agent.log");
6161
let process = Command::new(&agent_path)

agent/tests/no_coalesce.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl Drop for AgentProcess {
4747
fn test_probe_no_coalesce() {
4848
bump_memlock_rlimit().expect("unable to bump memlock rlimit");
4949

50-
let agent_path = target_dir().join("crypto-auditing-agent");
50+
let agent_path = target_dir().join("crau-agent");
5151
let log_dir = tempdir().expect("unable to create temporary directory");
5252
let log_path = log_dir.path().join("agent.log");
5353
let process = Command::new(&agent_path)

client/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ tokio = { workspace = true, features = ["macros", "rt-multi-thread", "signal"] }
1717
toml.workspace = true
1818
tracing.workspace = true
1919
tracing-subscriber = { workspace = true, features = ["env-filter"] }
20+
21+
[[bin]]
22+
name = "crau-client"
23+
path = "src/client.rs"

client/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
[![crates.io badge](https://img.shields.io/crates/v/crypto-auditing-client.svg)](https://crates.io/crates/crypto-auditing-client)
44

5-
This crate provides the crypto-auditing-client executable. To see the whole architecture, see the design [document](https://github.com/latchset/crypto-auditing/blob/main/docs/architecture.md).
5+
This crate provides the `crau-client` executable. To see the whole architecture, see the design [document](https://github.com/latchset/crypto-auditing/blob/main/docs/architecture.md).
66

7-
This requires crypto-auditing-event-broker running on the system. To
8-
see how to set up and run the event-broker, see the
7+
This requires `crau-event-broker` running on the system. To see how
8+
to set up and run the event-broker, see the
99
[instructions](https://github.com/latchset/crypto-auditing/blob/main/README.md#running).
1010

1111
## Usage
1212

1313
```console
1414
$ cargo install crypto-auditing-client
15-
$ crypto-auditing-client --scope tls --format json
16-
$ crypto-auditing-client --scope tls --format cbor --output audit.cborseq
15+
$ crau-client --scope tls --format json
16+
$ crau-client --scope tls --format cbor --output audit.cborseq
1717
```

0 commit comments

Comments
 (0)