SupportedCtapOptions.java

1
package com.yubico.fido.metadata;
2
3
import com.fasterxml.jackson.annotation.JsonAlias;
4
import com.fasterxml.jackson.annotation.JsonCreator;
5
import com.fasterxml.jackson.annotation.JsonInclude;
6
import com.fasterxml.jackson.annotation.JsonProperty;
7
import lombok.Builder;
8
import lombok.Value;
9
10
/**
11
 * A fixed-keys map of CTAP2 option names to Boolean values representing whether an authenticator
12
 * supports the respective option.
13
 *
14
 * @since 2.0.0
15
 * @see <a
16
 *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
17
 *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
18
 */
19
@Value
20
@Builder
21
public class SupportedCtapOptions {
22
23
  /**
24
   * @since 2.0.0
25
   * @see <a
26
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
27
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
28
   */
29
  boolean plat;
30
31
  /**
32
   * @since 2.0.0
33
   * @see <a
34
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
35
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
36
   */
37
  boolean rk;
38
39
  /**
40
   * If set to <code>true</code> the device is capable of accepting PIN.
41
   *
42
   * @since 2.0.0
43
   * @see <a
44
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
45
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
46
   */
47
  @JsonInclude(JsonInclude.Include.NON_DEFAULT)
48
  boolean clientPin;
49
50
  /**
51
   * @since 2.0.0
52
   * @see <a
53
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
54
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
55
   */
56
  boolean up;
57
58
  /**
59
   * If set to <code>true</code> the device is capable of built-in user verification.
60
   *
61
   * @since 2.0.0
62
   * @see <a
63
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
64
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
65
   */
66
  @JsonInclude(JsonInclude.Include.NON_DEFAULT)
67
  boolean uv;
68
69
  /**
70
   * @since 2.0.0
71
   * @see <a
72
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
73
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
74
   */
75
  boolean pinUvAuthToken;
76
77
  /**
78
   * @since 2.0.0
79
   * @see <a
80
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
81
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
82
   */
83
  boolean noMcGaPermissionsWithClientPin;
84
85
  /**
86
   * @since 2.0.0
87
   * @see <a
88
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
89
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
90
   */
91
  boolean largeBlobs;
92
93
  /**
94
   * If set to <code>true</code> the authenticator is enterprise attestation capable.
95
   *
96
   * @since 2.0.0
97
   * @see <a
98
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
99
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
100
   */
101
  @JsonInclude(JsonInclude.Include.NON_DEFAULT)
102
  boolean ep;
103
104
  /**
105
   * If set to <code>true</code> the authenticator supports the authenticatorBioEnrollment commands.
106
   *
107
   * @since 2.0.0
108
   * @see <a
109
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
110
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
111
   */
112
  @JsonInclude(JsonInclude.Include.NON_DEFAULT)
113
  boolean bioEnroll;
114
115
  /**
116
   * If set to <code>true</code> the authenticator supports the Prototype authenticatorBioEnrollment
117
   * (0x40) commands.
118
   *
119
   * @since 2.0.0
120
   * @see <a
121
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
122
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
123
   */
124
  @JsonInclude(JsonInclude.Include.NON_DEFAULT)
125
  boolean userVerificationMgmtPreview;
126
127
  /**
128
   * @since 2.0.0
129
   * @see <a
130
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
131
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
132
   */
133
  boolean uvBioEnroll;
134
135
  /**
136
   * @since 2.0.0
137
   * @see <a
138
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
139
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
140
   */
141
  boolean authnrCfg;
142
143
  /**
144
   * @since 2.0.0
145
   * @see <a
146
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
147
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
148
   */
149
  boolean uvAcfg;
150
151
  /**
152
   * @since 2.0.0
153
   * @see <a
154
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
155
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
156
   */
157
  boolean credMgmt;
158
159
  /**
160
   * @since 2.8.0
161
   * @see <a
162
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
163
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
164
   */
165
  boolean perCredMgmtRO;
166
167
  /**
168
   * @since 2.0.0
169
   * @see <a
170
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
171
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
172
   */
173
  @JsonInclude(JsonInclude.Include.NON_DEFAULT)
174
  boolean credentialMgmtPreview;
175
176
  /**
177
   * @since 2.0.0
178
   * @see <a
179
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
180
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
181
   */
182
  boolean setMinPINLength;
183
184
  /**
185
   * @since 2.0.0
186
   * @see <a
187
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
188
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
189
   */
190
  boolean makeCredUvNotRqd;
191
192
  /**
193
   * If set to <code>true</code> the authenticator supports the Always Require User Verification
194
   * feature.
195
   *
196
   * @since 2.0.0
197
   * @see <a
198
   *     href="https://fidoalliance.org/specs/fido-v2.2-ps-20250714/fido-client-to-authenticator-protocol-v2.2-ps-20250714.html#authenticatorGetInfo">Client
199
   *     to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
200
   */
201
  @JsonInclude(JsonInclude.Include.NON_DEFAULT)
202
  boolean alwaysUv;
203
204
  @JsonCreator
205
  private SupportedCtapOptions(
206
      @JsonProperty("plat") Boolean plat,
207
      @JsonProperty("rk") Boolean rk,
208
      @JsonProperty("clientPin") Boolean clientPin,
209
      @JsonProperty("up") Boolean up,
210
      @JsonProperty("uv") Boolean uv,
211
      @JsonAlias("uvToken") @JsonProperty("pinUvAuthToken") Boolean pinUvAuthToken,
212
      @JsonProperty("noMcGaPermissionsWithClientPin") Boolean noMcGaPermissionsWithClientPin,
213
      @JsonProperty("largeBlobs") Boolean largeBlobs,
214
      @JsonProperty("ep") Boolean ep,
215
      @JsonProperty("bioEnroll") Boolean bioEnroll,
216
      @JsonProperty("userVerificationMgmtPreview") Boolean userVerificationMgmtPreview,
217
      @JsonProperty("uvBioEnroll") Boolean uvBioEnroll,
218
      @JsonAlias("config") @JsonProperty("authnrCfg") Boolean authnrCfg,
219
      @JsonProperty("uvAcfg") Boolean uvAcfg,
220
      @JsonProperty("credMgmt") Boolean credMgmt,
221
      @JsonProperty("perCredMgmtRO") Boolean perCredMgmtRO,
222
      @JsonProperty("credentialMgmtPreview") Boolean credentialMgmtPreview,
223
      @JsonProperty("setMinPINLength") Boolean setMinPINLength,
224
      @JsonProperty("makeCredUvNotRqd") Boolean makeCredUvNotRqd,
225
      @JsonProperty("alwaysUv") Boolean alwaysUv) {
226
    this.plat = Boolean.TRUE.equals(plat);
227
    this.rk = Boolean.TRUE.equals(rk);
228 1 1. <init> : negated conditional → KILLED
    this.clientPin = clientPin != null;
229
    this.up = Boolean.TRUE.equals(up);
230 1 1. <init> : negated conditional → KILLED
    this.uv = uv != null;
231
    this.pinUvAuthToken = Boolean.TRUE.equals(pinUvAuthToken);
232
    this.noMcGaPermissionsWithClientPin = Boolean.TRUE.equals(noMcGaPermissionsWithClientPin);
233
    this.largeBlobs = Boolean.TRUE.equals(largeBlobs);
234 1 1. <init> : negated conditional → KILLED
    this.ep = ep != null;
235 1 1. <init> : negated conditional → KILLED
    this.bioEnroll = bioEnroll != null;
236 1 1. <init> : negated conditional → KILLED
    this.userVerificationMgmtPreview = userVerificationMgmtPreview != null;
237
    this.uvBioEnroll = Boolean.TRUE.equals(uvBioEnroll);
238
    this.authnrCfg = Boolean.TRUE.equals(authnrCfg);
239
    this.uvAcfg = Boolean.TRUE.equals(uvAcfg);
240
    this.credMgmt = Boolean.TRUE.equals(credMgmt);
241
    this.perCredMgmtRO = Boolean.TRUE.equals(perCredMgmtRO);
242
    this.credentialMgmtPreview = Boolean.TRUE.equals(credentialMgmtPreview);
243
    this.setMinPINLength = Boolean.TRUE.equals(setMinPINLength);
244
    this.makeCredUvNotRqd = Boolean.TRUE.equals(makeCredUvNotRqd);
245 1 1. <init> : negated conditional → KILLED
    this.alwaysUv = alwaysUv != null;
246
  }
247
}

Mutations

228

1.1
Location : <init>
Killed by : com.yubico.fido.metadata.JsonIoSpec
negated conditional → KILLED

230

1.1
Location : <init>
Killed by : com.yubico.fido.metadata.JsonIoSpec
negated conditional → KILLED

234

1.1
Location : <init>
Killed by : com.yubico.fido.metadata.JsonIoSpec
negated conditional → KILLED

235

1.1
Location : <init>
Killed by : com.yubico.fido.metadata.JsonIoSpec
negated conditional → KILLED

236

1.1
Location : <init>
Killed by : com.yubico.fido.metadata.JsonIoSpec
negated conditional → KILLED

245

1.1
Location : <init>
Killed by : com.yubico.fido.metadata.JsonIoSpec
negated conditional → KILLED

Active mutators

Tests examined


Report generated by PIT 1.15.0