|
| 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