Skip to content

Commit 789c74c

Browse files
authored
Merge pull request #391 from Yubico/drop-authenticatorisplayname
Remove credProps.authenticatorDisplayName
2 parents d26964c + 3de9992 commit 789c74c

10 files changed

+1
-302
lines changed

NEWS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ New features:
5858
* (Experimental) Added property `RegisteredCredential.transports`.
5959
** NOTE: Experimental features may receive breaking changes without a major
6060
version increase.
61-
* (Experimental) Added property `credProps.authenticatorDisplayName`.
6261
** NOTE: Experimental features may receive breaking changes without a major
6362
version increase.
64-
* (Experimental) Added `credProps` extension to assertion extension outputs.
6563

6664
`webauthn-server-attestation`:
6765

webauthn-server-core/src/main/java/com/yubico/webauthn/AssertionResult.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import com.yubico.webauthn.data.AuthenticatorResponse;
3636
import com.yubico.webauthn.data.ByteArray;
3737
import com.yubico.webauthn.data.ClientAssertionExtensionOutputs;
38-
import com.yubico.webauthn.data.Extensions;
3938
import com.yubico.webauthn.data.PublicKeyCredential;
4039
import com.yubico.webauthn.data.PublicKeyCredentialRequestOptions;
4140
import com.yubico.webauthn.data.UserIdentity;
@@ -282,33 +281,4 @@ public Optional<AuthenticatorAssertionExtensionOutputs> getAuthenticatorExtensio
282281
return AuthenticatorAssertionExtensionOutputs.fromAuthenticatorData(
283282
credentialResponse.getResponse().getParsedAuthenticatorData());
284283
}
285-
286-
/**
287-
* Retrieve a suitable nickname for this credential, if one is available. This MAY differ from
288-
* {@link RegistrationResult#getAuthenticatorDisplayName() the value returned during
289-
* registration}, if any. In that case the application may want to offer the user to update the
290-
* previously stored value, if any.
291-
*
292-
* <p>This returns the <code>authenticatorDisplayName</code> output from the <a
293-
* href="https://w3c.github.io/webauthn/#sctn-authenticator-credential-properties-extension">
294-
* <code>credProps</code></a> extension.
295-
*
296-
* @return A user-chosen or vendor-default display name for the credential, if available.
297-
* Otherwise empty.
298-
* @see <a
299-
* href="https://w3c.github.io/webauthn/#dom-credentialpropertiesoutput-authenticatordisplayname">
300-
* <code>authenticatorDisplayName</code> in §10.1.3. Credential Properties Extension
301-
* (credProps)</a>
302-
* @see RegistrationResult#getAuthenticatorDisplayName()
303-
* @see Extensions.CredentialProperties.CredentialPropertiesOutput#getAuthenticatorDisplayName()
304-
* @deprecated EXPERIMENTAL: This feature is from a not yet mature standard; it could change as
305-
* the standard matures.
306-
*/
307-
@JsonIgnore
308-
@Deprecated
309-
public Optional<String> getAuthenticatorDisplayName() {
310-
return getClientExtensionOutputs()
311-
.flatMap(outputs -> outputs.getCredProps())
312-
.flatMap(credProps -> credProps.getAuthenticatorDisplayName());
313-
}
314284
}

webauthn-server-core/src/main/java/com/yubico/webauthn/AssertionResultV2.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import com.yubico.webauthn.data.AuthenticatorResponse;
3636
import com.yubico.webauthn.data.ByteArray;
3737
import com.yubico.webauthn.data.ClientAssertionExtensionOutputs;
38-
import com.yubico.webauthn.data.Extensions;
3938
import com.yubico.webauthn.data.PublicKeyCredential;
4039
import java.util.Optional;
4140
import lombok.AccessLevel;
@@ -244,33 +243,4 @@ public Optional<AuthenticatorAssertionExtensionOutputs> getAuthenticatorExtensio
244243
return AuthenticatorAssertionExtensionOutputs.fromAuthenticatorData(
245244
credentialResponse.getResponse().getParsedAuthenticatorData());
246245
}
247-
248-
/**
249-
* Retrieve a suitable nickname for this credential, if one is available. This MAY differ from
250-
* {@link RegistrationResult#getAuthenticatorDisplayName() the value returned during
251-
* registration}, if any. In that case the application may want to offer the user to update the
252-
* previously stored value, if any.
253-
*
254-
* <p>This returns the <code>authenticatorDisplayName</code> output from the <a
255-
* href="https://w3c.github.io/webauthn/#sctn-authenticator-credential-properties-extension">
256-
* <code>credProps</code></a> extension.
257-
*
258-
* @return A user-chosen or vendor-default display name for the credential, if available.
259-
* Otherwise empty.
260-
* @see <a
261-
* href="https://w3c.github.io/webauthn/#dom-credentialpropertiesoutput-authenticatordisplayname">
262-
* <code>authenticatorDisplayName</code> in §10.1.3. Credential Properties Extension
263-
* (credProps)</a>
264-
* @see RegistrationResult#getAuthenticatorDisplayName()
265-
* @see Extensions.CredentialProperties.CredentialPropertiesOutput#getAuthenticatorDisplayName()
266-
* @deprecated EXPERIMENTAL: This feature is from a not yet mature standard; it could change as
267-
* the standard matures.
268-
*/
269-
@JsonIgnore
270-
@Deprecated
271-
public Optional<String> getAuthenticatorDisplayName() {
272-
return getClientExtensionOutputs()
273-
.flatMap(outputs -> outputs.getCredProps())
274-
.flatMap(credProps -> credProps.getAuthenticatorDisplayName());
275-
}
276246
}

webauthn-server-core/src/main/java/com/yubico/webauthn/RegistrationResult.java

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import com.yubico.webauthn.data.AuthenticatorResponse;
4040
import com.yubico.webauthn.data.ByteArray;
4141
import com.yubico.webauthn.data.ClientRegistrationExtensionOutputs;
42-
import com.yubico.webauthn.data.Extensions;
4342
import com.yubico.webauthn.data.PublicKeyCredential;
4443
import com.yubico.webauthn.data.PublicKeyCredentialDescriptor;
4544
import java.io.IOException;
@@ -368,33 +367,6 @@ public Optional<Boolean> isDiscoverable() {
368367
.flatMap(credProps -> credProps.getRk());
369368
}
370369

371-
/**
372-
* Retrieve a suitable nickname for this credential, if one is available.
373-
*
374-
* <p>This returns the <code>authenticatorDisplayName</code> output from the <a
375-
* href="https://w3c.github.io/webauthn/#sctn-authenticator-credential-properties-extension">
376-
* <code>credProps</code></a> extension.
377-
*
378-
* @return A user-chosen or vendor-default display name for the credential, if available.
379-
* Otherwise empty.
380-
* @see <a
381-
* href="https://w3c.github.io/webauthn/#dom-credentialpropertiesoutput-authenticatordisplayname">
382-
* <code>authenticatorDisplayName</code> in §10.1.3. Credential Properties Extension
383-
* (credProps)</a>
384-
* @see AssertionResult#getAuthenticatorDisplayName()
385-
* @see AssertionResultV2#getAuthenticatorDisplayName()
386-
* @see Extensions.CredentialProperties.CredentialPropertiesOutput#getAuthenticatorDisplayName()
387-
* @deprecated EXPERIMENTAL: This feature is from a not yet mature standard; it could change as
388-
* the standard matures.
389-
*/
390-
@JsonIgnore
391-
@Deprecated
392-
public Optional<String> getAuthenticatorDisplayName() {
393-
return getClientExtensionOutputs()
394-
.flatMap(outputs -> outputs.getCredProps())
395-
.flatMap(credProps -> credProps.getAuthenticatorDisplayName());
396-
}
397-
398370
/**
399371
* The <a
400372
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#attestation-trust-path">attestation

webauthn-server-core/src/main/java/com/yubico/webauthn/data/ClientAssertionExtensionOutputs.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,13 @@ public class ClientAssertionExtensionOutputs implements ClientExtensionOutputs {
6464
*/
6565
private final Boolean appid;
6666

67-
private final Extensions.CredentialProperties.CredentialPropertiesOutput credProps;
68-
6967
private final Extensions.LargeBlob.LargeBlobAuthenticationOutput largeBlob;
7068

7169
@JsonCreator
7270
private ClientAssertionExtensionOutputs(
7371
@JsonProperty("appid") Boolean appid,
74-
@JsonProperty("credProps")
75-
Extensions.CredentialProperties.CredentialPropertiesOutput credProps,
7672
@JsonProperty("largeBlob") Extensions.LargeBlob.LargeBlobAuthenticationOutput largeBlob) {
7773
this.appid = appid;
78-
this.credProps = credProps;
7974
this.largeBlob = largeBlob;
8075
}
8176

@@ -86,9 +81,6 @@ public Set<String> getExtensionIds() {
8681
if (appid != null) {
8782
ids.add(Extensions.Appid.EXTENSION_ID);
8883
}
89-
if (credProps != null) {
90-
ids.add(Extensions.CredentialProperties.EXTENSION_ID);
91-
}
9284
if (largeBlob != null) {
9385
ids.add(Extensions.LargeBlob.EXTENSION_ID);
9486
}
@@ -108,24 +100,6 @@ public Optional<Boolean> getAppid() {
108100
return Optional.ofNullable(appid);
109101
}
110102

111-
/**
112-
* The extension output for the Credential Properties Extension (<code>credProps</code>), if any.
113-
*
114-
* <p>This value MAY be present but have all members empty if the extension was successfully
115-
* processed but no credential properties could be determined.
116-
*
117-
* @see com.yubico.webauthn.data.Extensions.CredentialProperties.CredentialPropertiesOutput
118-
* @see <a
119-
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-authenticator-credential-properties-extension">§10.4.
120-
* Credential Properties Extension (credProps)</a>
121-
* @deprecated EXPERIMENTAL: This feature is from a not yet mature standard; it could change as
122-
* the standard matures.
123-
*/
124-
@Deprecated
125-
public Optional<Extensions.CredentialProperties.CredentialPropertiesOutput> getCredProps() {
126-
return Optional.ofNullable(credProps);
127-
}
128-
129103
/**
130104
* The extension output for the <a
131105
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#sctn-large-blob-extension">Large blob

webauthn-server-core/src/main/java/com/yubico/webauthn/data/Extensions.java

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
import com.fasterxml.jackson.annotation.JsonValue;
77
import com.upokecenter.cbor.CBORObject;
88
import com.upokecenter.cbor.CBORType;
9-
import com.yubico.webauthn.AssertionResult;
10-
import com.yubico.webauthn.AssertionResultV2;
11-
import com.yubico.webauthn.RegistrationResult;
129
import com.yubico.webauthn.StartRegistrationOptions;
1310
import com.yubico.webauthn.extension.uvm.KeyProtectionType;
1411
import com.yubico.webauthn.extension.uvm.MatcherProtectionType;
@@ -74,15 +71,9 @@ public static class CredentialPropertiesOutput {
7471
@JsonProperty("rk")
7572
private final Boolean rk;
7673

77-
@JsonProperty("authenticatorDisplayName")
78-
private final String authenticatorDisplayName;
79-
8074
@JsonCreator
81-
private CredentialPropertiesOutput(
82-
@JsonProperty("rk") Boolean rk,
83-
@JsonProperty("authenticatorDisplayName") String authenticatorDisplayName) {
75+
private CredentialPropertiesOutput(@JsonProperty("rk") Boolean rk) {
8476
this.rk = rk;
85-
this.authenticatorDisplayName = authenticatorDisplayName;
8677
}
8778

8879
/**
@@ -114,34 +105,6 @@ private CredentialPropertiesOutput(
114105
public Optional<Boolean> getRk() {
115106
return Optional.ofNullable(rk);
116107
}
117-
118-
/**
119-
* This OPTIONAL property is a human-palatable description of the credential's managing
120-
* authenticator, chosen by the user.
121-
*
122-
* <p>If the application supports setting "nicknames" for registered credentials, then this
123-
* value may be a suitable default value for such a nickname.
124-
*
125-
* <p>In an authentication ceremony, if this value is different from the stored nickname, then
126-
* the application may want to offer the user to update the stored nickname to match this
127-
* value.
128-
*
129-
* @return A user-chosen or vendor-default display name for the credential, if available.
130-
* Otherwise empty.
131-
* @see <a
132-
* href="https://w3c.github.io/webauthn/#dom-credentialpropertiesoutput-authenticatordisplayname">
133-
* <code>authenticatorDisplayName</code> in §10.1.3. Credential Properties Extension
134-
* (credProps)</a>
135-
* @see RegistrationResult#getAuthenticatorDisplayName()
136-
* @see AssertionResult#getAuthenticatorDisplayName()
137-
* @see AssertionResultV2#getAuthenticatorDisplayName()
138-
* @deprecated EXPERIMENTAL: This feature is from a not yet mature standard; it could change
139-
* as the standard matures.
140-
*/
141-
@Deprecated
142-
public Optional<String> getAuthenticatorDisplayName() {
143-
return Optional.ofNullable(authenticatorDisplayName);
144-
}
145108
}
146109
}
147110

webauthn-server-core/src/test/scala/com/yubico/webauthn/RelyingPartyAssertionSpec.scala

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import com.yubico.webauthn.data.AuthenticatorTransport
3939
import com.yubico.webauthn.data.ByteArray
4040
import com.yubico.webauthn.data.ClientAssertionExtensionOutputs
4141
import com.yubico.webauthn.data.CollectedClientData
42-
import com.yubico.webauthn.data.Extensions.CredentialProperties.CredentialPropertiesOutput
4342
import com.yubico.webauthn.data.Extensions.LargeBlob.LargeBlobAuthenticationInput
4443
import com.yubico.webauthn.data.Extensions.LargeBlob.LargeBlobAuthenticationOutput
4544
import com.yubico.webauthn.data.Extensions.Uvm.UvmEntry
@@ -2848,55 +2847,6 @@ class RelyingPartyAssertionSpec
28482847
)
28492848
}
28502849
}
2851-
2852-
describe("exposes the credProps.authenticatorDisplayName extension output as getAuthenticatorDisplayName()") {
2853-
val pkcTemplate =
2854-
TestAuthenticator.createAssertion(
2855-
challenge =
2856-
request.getPublicKeyCredentialRequestOptions.getChallenge,
2857-
credentialKey = credentialKeypair,
2858-
credentialId = credential.getId,
2859-
)
2860-
2861-
it("""when set to "hej".""") {
2862-
val pkc = pkcTemplate.toBuilder
2863-
.clientExtensionResults(
2864-
pkcTemplate.getClientExtensionResults.toBuilder
2865-
.credProps(
2866-
CredentialPropertiesOutput
2867-
.builder()
2868-
.authenticatorDisplayName("hej")
2869-
.build()
2870-
)
2871-
.build()
2872-
)
2873-
.build()
2874-
val result = rp.finishAssertion(
2875-
FinishAssertionOptions
2876-
.builder()
2877-
.request(request)
2878-
.response(pkc)
2879-
.build()
2880-
)
2881-
2882-
result.getAuthenticatorDisplayName.toScala should equal(
2883-
Some("hej")
2884-
)
2885-
}
2886-
2887-
it("when not available.") {
2888-
val pkc = pkcTemplate
2889-
val result = rp.finishAssertion(
2890-
FinishAssertionOptions
2891-
.builder()
2892-
.request(request)
2893-
.response(pkc)
2894-
.build()
2895-
)
2896-
2897-
result.getAuthenticatorDisplayName.toScala should equal(None)
2898-
}
2899-
}
29002850
}
29012851
}
29022852
}

webauthn-server-core/src/test/scala/com/yubico/webauthn/RelyingPartyRegistrationSpec.scala

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ class RelyingPartyRegistrationSpec
266266
"org.example.foo": "bar",
267267
"credProps": {
268268
"rk": false,
269-
"authenticatorDisplayName": "My passkey",
270269
"unknownProperty": ["unknown-value"]
271270
}
272271
}
@@ -4286,51 +4285,6 @@ class RelyingPartyRegistrationSpec
42864285
}
42874286
}
42884287

4289-
describe("expose the credProps.authenticatorDisplayName extension output as RegistrationResult.getAuthenticatorDisplayName()") {
4290-
val testDataBase = RegistrationTestData.Packed.BasicAttestation
4291-
val testData = testDataBase.copy(requestedExtensions =
4292-
testDataBase.request.getExtensions.toBuilder.credProps().build()
4293-
)
4294-
4295-
it("""when set to "hej".""") {
4296-
val result = rp.finishRegistration(
4297-
FinishRegistrationOptions
4298-
.builder()
4299-
.request(testData.request)
4300-
.response(
4301-
testData.response.toBuilder
4302-
.clientExtensionResults(
4303-
ClientRegistrationExtensionOutputs
4304-
.builder()
4305-
.credProps(
4306-
CredentialPropertiesOutput
4307-
.builder()
4308-
.authenticatorDisplayName("hej")
4309-
.build()
4310-
)
4311-
.build()
4312-
)
4313-
.build()
4314-
)
4315-
.build()
4316-
)
4317-
4318-
result.getAuthenticatorDisplayName.toScala should equal(Some("hej"))
4319-
}
4320-
4321-
it("when not available.") {
4322-
val result = rp.finishRegistration(
4323-
FinishRegistrationOptions
4324-
.builder()
4325-
.request(testData.request)
4326-
.response(testData.response)
4327-
.build()
4328-
)
4329-
4330-
result.getAuthenticatorDisplayName.toScala should equal(None)
4331-
}
4332-
}
4333-
43344288
describe("support the largeBlob extension") {
43354289
it("being enabled at registration time.") {
43364290
val testData = RegistrationTestData.Packed.BasicAttestation

0 commit comments

Comments
 (0)