Skip to content

Commit 517ade7

Browse files
committed
Update information onf KRB5 tracing
Signed-off-by: Simo Sorce <[email protected]>
1 parent b1e5159 commit 517ade7

File tree

1 file changed

+28
-26
lines changed

1 file changed

+28
-26
lines changed

docs/KRB5_TRACE.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,53 @@
11
# Setting KRB5_TRACE for gssproxy
22

3-
Enabling `KRB5_TRACE` output as described in `# man gssproxy.conf`:
3+
This document explain how to obtain KRB5 tracing output.
44

5-
**At level 3 and above, KRB5_TRACE output is logged. If KRB5_TRACE was
6-
already set in the execution environment, trace output is sent to its
7-
value instead.**
5+
It is possible to get KRB5 tracing information together with gssproxy
6+
debugging information on Standard Error[^1] by simply running the
7+
process at debug level 3: `gssproxy -d --debug-level=3`
88

9-
can be done either by including `KRB5_TRACE=/path/to/location` when
10-
executing gssproxy at the command line or by including a location within
11-
a drop file loaded by systemd. Systemd uses unix sockets to redirect
12-
outputs to the journal, and this means `/dev/stderr` ends up pointing to
13-
a name that cannot be used as a path to open the stderr descriptor.
14-
A drop file is necessary to record `KRB5_TRACE` information as gssproxy
15-
directs `KRB5_TRACE` to `/dev/stderr` by default.
9+
In cases where it may be convenient to have a separate file with KRB5
10+
tracing it is possible to do so by making sure the KRB5_TRACE
11+
environment is set when the gssproxy process is executed[^2].
1612

1713
The output can be directed to any location, but gssproxy only has write
1814
access to `/var/lib/gssproxy` by default. This means that for a host
1915
system using SELinux either a custom module policy will need to be
2016
created or SELinux will need to be put into permissive mode.
2117

22-
As setting `KRB5_TRACE` output is not designed to be continually logged
18+
As setting `KRB5_TRACE` output is not designed to be used in production
2319
nor treated as traditional log output, it is recommended to direct the
24-
trace output to `/var/lib/gssproxy`.
20+
trace output to `/var/lib/gssproxy` to avoid changes to SELinux policy.
21+
22+
Ways to obtain KRB5 tracing output:
2523

2624
- Increase gssproxy debugging so that `KRB5_TRACE` information is logged
2725
as described in `# man gssproxy.conf`.
2826

29-
~~~~
27+
```
3028
# echo ' debug_level = 3' >> /etc/gssproxy/gssproxy.conf
31-
~~~~
32-
33-
- Create a drop file for gssproxy to log `KRB5_TRACE` output to a file
34-
under `/var/lib/gssproxy`
29+
# pkill -HUP gssproxy
30+
```
3531

36-
~~~~
32+
- Create a systemd drop file for gssproxy to log `KRB5_TRACE` output
33+
```
3734
# mkdir /etc/systemd/system/gssproxy.service.d
38-
3935
# cat <<EOF > /etc/systemd/system/gssproxy.service.d/99-trace.conf
4036
[Service]
4137
Environment=KRB5_TRACE=/var/lib/gssproxy/gssproxy.krb5_trace
4238
EOF
43-
~~~~
4439
45-
- Reload the service files and restart the `gssproxy` service
46-
47-
~~~~
4840
# systemctl daemon-reload
49-
5041
# systemctl restart gssproxy
51-
~~~~
42+
```
43+
44+
---
45+
[^1]: Until recently, an [issue](https://github.com/gssapi/gssproxy/issues/44)
46+
with how the standard error is setup **required** redirection to an
47+
actual file in order to obtain any KRB5 Tracing information. If you are
48+
using an older version of gssproxy you will need to set the KRB5_TRACE
49+
environment variable to an actual file, changing debug level will not
50+
be sufficient.
51+
52+
[^2]: Setting KRB5_TRACE will cause KRB5 tracing information to be
53+
emitted regradless of gssproxy's debug level.

0 commit comments

Comments
 (0)