Skip to content

Commit 8891fc7

Browse files
committed
tlshd: man update for TLS session tags
Set up a man page that describes how to configure the session tagging mechanism. For now, the man page contains just an overview of the facility. The man page will be populated with details in subsequent patches. Signed-off-by: Chuck Lever <[email protected]>
1 parent 9726a7c commit 8891fc7

File tree

5 files changed

+138
-2
lines changed

5 files changed

+138
-2
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ AC_CONFIG_FILES([Makefile \
8989
etc/tlshd/Makefile \
9090
man/Makefile \
9191
man/man5/Makefile \
92+
man/man7/Makefile \
9293
man/man8/Makefile \
9394
src/Makefile \
9495
src/tlshd/Makefile \

man/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
# 02110-1301, USA.
1717
#
1818

19-
SUBDIRS = man5 man8
19+
SUBDIRS = man5 man7 man8
2020

2121
MAINTAINERCLEANFILES = Makefile.in

man/man5/tlshd.conf.5

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ a handshake request when no other certificate is available.
129129
This option specifies the pathname of a file containing
130130
a PEM-encoded private key associated with the above certificate.
131131
.SH SEE ALSO
132-
.BR tlshd (8)
132+
.BR tlshd (8),
133+
.BR tls-session-tags (7)
133134
.SH AUTHOR
134135
Chuck Lever

man/man7/Makefile.am

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#
2+
# Copyright (c) 2025 Oracle and/or its affiliates.
3+
#
4+
# ktls-utils is free software; you can redistribute it and/or
5+
# modify it under the terms of the GNU General Public License as
6+
# published by the Free Software Foundation; version 2.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11+
# General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program; if not, write to the Free Software
15+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16+
# 02110-1301, USA.
17+
#
18+
19+
man7_MANS = tls-session-tags.7
20+
EXTRA_DIST = $(man7_MANS)
21+
22+
MAINTAINERCLEANFILES = Makefile.in

man/man7/tls-session-tags.7

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
.\"
2+
.\" Copyright (c) 2025 Oracle and/or its affiliates.
3+
.\"
4+
.\" ktls-utils is free software; you can redistribute it and/or
5+
.\" modify it under the terms of the GNU General Public License as
6+
.\" published by the Free Software Foundation; version 2.
7+
.\"
8+
.\" This program is distributed in the hope that it will be useful,
9+
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11+
.\" General Public License for more details.
12+
.\"
13+
.\" You should have received a copy of the GNU General Public License
14+
.\" along with this program; if not, write to the Free Software
15+
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16+
.\" 02110-1301, USA.
17+
.\"
18+
.\" tls-session-tags(7)
19+
.\"
20+
.TH tls-session-tags 7 "25 Aug 2025"
21+
.SH NAME
22+
tls-session-tags \- TLS session tags
23+
.SH SYNOPSIS
24+
.B /etc/tlshd/tags.d/
25+
.SH DESCRIPTION
26+
The
27+
.B tlshd
28+
program implements a user agent that services TLS handshake requests
29+
on behalf of kernel TLS consumers.
30+
Its configuration files, found under the
31+
.I /etc/tlshd
32+
directory, contain information that the
33+
.B tlshd
34+
program reads when it starts up.
35+
The configuration files direct the
36+
.B tlshd
37+
program to information about which trust store and signing
38+
and encryption algorithms are to be used.
39+
The configuration files are considered a trusted source of information.
40+
.P
41+
When a remote presents an x.509 certificate during a TLS handshake, the
42+
.B tlshd
43+
program is responsible for verifying that the certificate was
44+
issued by a certificate authority that the receiver recognizes and
45+
trusts.
46+
Once that verification is successful, the receiver can trust
47+
the content of that certificate, including information about
48+
the peer identity presented in that certificate (eg. a DNS hostname
49+
or IP address, and so on).
50+
.P
51+
Once a peer's certificate is trusted,
52+
the
53+
.B tlshd
54+
program can be configured to scan the fields in the peer's certificate.
55+
Based on the scan,
56+
the
57+
.B tlshd
58+
program can assign tags to the new TLS session that
59+
indicate that the server recognizes the peer's identity.
60+
For example,
61+
the
62+
.B tlshd
63+
program can be configured to look for a specific string in
64+
.I subject
65+
fields, and assign tags to TLS sessions where the peer presented
66+
a certificate with matching content in that field.
67+
Kernel consumers can use those tags to authorize or deny access
68+
to resources based on the identity presented in peer certificates.
69+
.P
70+
The following sections describe how to configure this facility.
71+
.SH FORMAT
72+
TLS session tag definitions are YAML documents stored in files in the
73+
.I /etc/tlshd/tags.d
74+
directory.
75+
When it launches, the
76+
.B tlshd
77+
program reads all files in that directory with either the
78+
.I .yml
79+
or
80+
.I .yaml
81+
extension.
82+
Modifications to the content of these files take effect only when the
83+
.B tlshd
84+
program is restarted.
85+
.P
86+
The
87+
.B tlshd
88+
program
89+
populates two dictionaries from the contents of these files:
90+
.TP
91+
.B filters
92+
Each filter defined in this dictionary specifies the name of a
93+
field in an x.509 certificate, and the conditions under which the
94+
contents of that field are to be considered a match.
95+
.TP
96+
.B tags
97+
Each tag is a list of one or more filters (defined in the
98+
.B filters
99+
dictionary)
100+
that all must be matched in order for the tag to be assigned to a
101+
new TLS session.
102+
.SH STANDARDS
103+
x.509
104+
.BR
105+
RFC 5280
106+
.BR
107+
RFC 6125
108+
.SH SEE ALSO
109+
.BR tlshd (8),
110+
.BR tlshd.conf (5)
111+
.SH AUTHOR
112+
Chuck Lever

0 commit comments

Comments
 (0)