1 .\" Copyright (c) 2020 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. Neither the name of the Institute nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 .Nd Authentication Bridge for Bearer tokens, Kerberos, and PKIX
42 .Op Fl d | Fl Fl daemon
43 .Op Fl Fl daemon-child
44 .Op Fl Fl reverse-proxied
45 .Op Fl p Ar port number (default: 443)
46 .Op Fl Fl cache-dir= Ns Ar DIRECTORY
47 .Op Fl Fl cert= Ns Ar HX509-STORE
48 .Op Fl Fl private-key= Ns Ar HX509-STORE
49 .Op Fl t | Fl Fl thread-per-client
51 .Fl Fl verbose= Ns Ar run verbosely
55 Serves RESTful (HTTPS) GETs of
59 performing corresponding kx509 and, possibly, PKINIT requests
60 to the KDCs of the requested realms (or just the given REALM).
76 Expected audience(s) of bearer tokens (i.e., acceptor name).
81 Detach from TTY and run in the background.
83 .Fl Fl reverse-proxied
85 Serves HTTP instead of HTTPS, accepting only looped-back connections.
87 .Fl p Ar port number (default: 443)
91 .Fl Fl cache-dir= Ns Ar DIRECTORY
93 Directory for various caches. If not specified then a temporary directory will
96 .Fl Fl cert= Ns Ar HX509-STORE
98 Certificate file path (PEM) for HTTPS service. May contain private key as
101 .Fl Fl private-key= Ns Ar HX509-STORE
103 Private key file path (PEM), if the private key is not stored along with the
107 .Fl Fl thread-per-client
109 Uses a thread per-client instead of as many threads as there are CPUs.
112 .Fl Fl verbose= Ns Ar run verbosely
116 .Sh ONLINE CERTIFICATION AUTHORITY HTTP API
117 This service provides an HTTP-based Certification Authority (CA).
118 CA credentials and configuration are specified in the
123 The protocol consists of a
127 with the base-63 encoding of a DER encoding of a PKCS#10
128 .Ar CertificationRequest
129 (Certificate Signing Request, or CSR) in a
131 required query parameter.
132 In a successful query, the response body will contain a PEM
133 encoded end entity certificate and certification chain.
139 as this used to be called.
141 Authentication is required.
142 Unauthenticated requests will elicit a 401 response.
144 Authorization is required.
145 Unauthorized requests will elicit a 403 response.
147 Subject Alternative Names (SANs) and Extended Key Usage values
148 may be requested, both in-band in the CSR as a requested
149 extensions attribute, and/or via optional query parameters.
151 Supported query parameters (separated by ampersands)
152 .Bl -tag -width Ds -offset indent
153 .It Li csr = Va base64-encoded-DER-encoded-CSR
154 .It Li dNSName = Va hostname
155 .It Li rfc822Name = Va email-address
156 .It Li xMPPName = Va XMPP-address
157 .It Li krb5PrincipalName = Va Kerberos-principal-name
158 .It Li ms-upn = Va UPN
160 .It Li lifetime = Va lifetime
163 More than one name or EKU may be requested.
165 Certificate lifetimes are expressed as a decimal number and
166 an optional unit (which defaults to
169 .Sh NEGOTIATE TOKEN HTTP API
170 This service provides an HTTP-based Negotiate token service.
171 This service requires a certification authority (CA) issuer
172 credential as it impersonates client principals to the KDC using
173 PKINIT client certificates it issues itself.
175 The protocol consists of a
178 .Ar /get-negotiate-token
180 .Ar target = Ar service@host
183 In a successful query, the response body will contain a Negotiate
184 token for the authenticated client principal to the requested
187 Authentication is required.
188 Unauthenticated requests will elicit a 401 response.
190 Subject Alternative Names (SANs) and Extended Key Usage values
191 may be requested, both in-band in the CSR as a requested
192 extensions attribute, and/or via optional query parameters.
194 Supported query parameters (separated by ampersands)
195 .Bl -tag -width Ds -offset indent
196 .It Li target = Va service@hostname
197 .It Li redirect = Va URI
200 If a redirect URI is given and a matching
202 header is included in the request, then the response will be a
203 redirect to that URI with the Negotiate token in an
205 header that the user-agent should copy to the redirected request.
207 The certification authority configuration is the same as for the
209 end-point, but as configured in the
214 This service provides an HTTP-based "kinit" service.
215 This service requires a certification authority (CA) issuer
216 credential as it impersonates client principals to the KDC using
217 PKINIT client certificates it issues itself.
219 The protocol consists of a
224 Supported query parameters (separated by ampersands)
225 .Bl -tag -width Ds -offset indent
226 .It Li cname = Va principal-name
227 .It Li address = Va IP-address
230 In a successful query, the response body will contain a TGT and
231 its session key encoded as a "ccache" file contents.
233 Authentication is required.
234 Unauthenticated requests will elicit a 401 response.
236 Authorization is required, where the authorization check is the
239 by the authenticated client principal to get a certificate with
240 a PKINIT SAN for itself or the requested principal if a
242 query parameter was included.
244 Unauthorized requests will elicit a 403 response.
246 Requested IP addresses will be added to the issued TGT if allowed.
247 The IP address of the client will be included if address-less TGTs
254 The certification authority configuration is the same as for the
256 end-point, but as configured in the
269 Configuration parameters are specified in
272 .It Pa /etc/krb5.conf
276 See logging section of