CVE-2023-4154 dsdb/tests: Speed up DirSync test by only checking positive matches...
[Samba.git] / third_party / heimdal / lib / gssapi / gss-token.1
blob7bd50b0e8b2768339b236954bcd91fb1c6647c0a
1 .\"
2 .\"
3 .Dd May 12, 2014
4 .Os
5 .Dt GSS-TOKEN 1
6 .Sh NAME
7 .Nm gss-token
8 .Nd generate and consume base64 GSS tokens
9 .Sh SYNOPSIS
10 .Nm
11 .Op Fl DNn
12 .Op Fl c count
13 .Ar service@host
14 .Nm
15 .Fl r
16 .Op Fl MNln
17 .Op Fl C Ar ccache
18 .Op Fl S Ar maxsize
19 .Op Fl c count
20 .Op Fl m mech
21 .Op Ar service@host
22 .Sh DESCRIPTION
23 .Nm
24 generates and consumes base64 encoded GSS tokens.
25 By default, it runs as an initiator and with the
26 .Fl r
27 flag it becomes an acceptor.
28 .Pp
29 .Nm
30 supports the following options:
31 .Bl -tag -width indentxxxx
32 .It Fl C Ar ccache
33 write an accepted delegated credential into
34 .Ar ccache .
35 This only makes sense if
36 .Fl r
37 is specified.
38 .It Fl D
39 delegate credentials.
40 This only makes sense as a client, that is when
41 .Fl r
42 is not specified.
43 .It Fl M
44 copy the default ccache to a MEMORY: ccache before each
45 separate write operation.
46 The default ccache will not pick up any obtained service
47 tickets.
48 If specified with
49 .Fl c ,
50 the cache will revert to its original state before each
51 new token is written.
52 This can be used to load test the KDC.
53 .It Fl N
54 prepend
55 .Dq Negotiate\ 
56 to generated tokens and expect it on consumed tokens.
57 .It Fl S Ar maxsize
58 split each token that is generated into components of maximum
59 size
60 .Ar maxsize .
61 Each token is base64 encoded and output separately.
62 .It Fl c Ar count
63 repeat the operation
64 .Ar count
65 times.
66 This flag only changes the behaviour when operating in initiator mode.
67 This is good for very basic benchmarking.
68 .It Fl l
69 loop indefinitely in acceptor mode.
70 .It Fl m Ar mech
71 specifies the GSS mechanism that will be used in initiator mode.
72 If a mechanism name of
73 .Do ? Dc
74 is specified, a list of supported mechanisms will be output and
75 .Nm
76 will exit.
77 .It Fl n
78 do not output the generated tokens.
79 .It Fl r
80 run in acceptor mode.
81 .El
82 .Pp
83 .Nm
84 takes one argument, a
85 .Ar host@service
86 specifier.
87 The argument is required when running as an initiator but is optional as
88 an acceptor.
89 .Pp
90 .Nm
91 will try to read a token whenever the GSS mechanism expects one
92 and will output a token whenever the GSS mechanism provides one.
93 Tokens are base64 encoded and terminated by either two successive
94 newlines or one newline and EOF.
95 The base64 encoding may be broken up by single newlines which will
96 be ignored when read.  No extra whitespace will be ignored.
97 .Sh EXAMPLES
98 To test a simple GSS mechanism which doesn't require a round trip,
99 a single
100 .Pa /bin/sh
101 pipeline will suffice:
102 .Bd -literal -offset indent
103 $ export KRB5_KTNAME=/path/to/keytab
104 $ gss-token HTTP@$(hostname) | gss-token -r
106 .Sh SEE ALSO
107 .Xr gssapi 3 ,
108 .Xr kerberos 8 .