[java-idp-plugin-webauthn] branch main updated: Fix bean names which did not get updated

Phil Smart philip.smart at jisc.ac.uk
Fri Nov 15 12:04:38 UTC 2024


This is an automated email from the git hooks/post-receive script.

philsmart pushed a commit to branch main
in repository java-idp-plugin-webauthn.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-webauthn.git;a=commit;h=028e3c0c73dbb83a3a2241b83de9177d0ea895db

The following commit(s) were added to refs/heads/main by this push:
     new 028e3c0  Fix bean names which did not get updated
028e3c0 is described below

commit 028e3c0c73dbb83a3a2241b83de9177d0ea895db
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Fri Nov 15 12:04:35 2024 +0000

    Fix bean names which did not get updated
---
 .../idp/plugin/authn/webauthn/admin/impl/AddUserName.java  |  4 ++--
 .../storage/impl/CredentialRegistrationSerializer.java     |  3 ++-
 .../webauthn-registration/webauthn-registration-beans.xml  | 14 +++++++-------
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/AddUserName.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/AddUserName.java
index 8b766db..3c90b1e 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/AddUserName.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/admin/impl/AddUserName.java
@@ -78,7 +78,7 @@ public class AddUserName extends AbstractWebAuthnAction<WebAuthnRegistrationCont
     }
     
     /**
-     * Set the strategy used to lookup or create the user.name.
+     * Set the strategy used to lookup or create the WebAuthn user.name.
      * 
      * @param strategy the strategy
      */
@@ -86,7 +86,7 @@ public class AddUserName extends AbstractWebAuthnAction<WebAuthnRegistrationCont
             @Nonnull final Function<ProfileRequestContext,String> strategy) {
         checkSetterPreconditions();
         userNameLookupStrategy =
-                Constraint.isNotNull(strategy, "Challenge Generator cannot be null");
+                Constraint.isNotNull(strategy, "Username lookup strategy cannot be null");
     }
     
     /** {@inheritDoc} */
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/CredentialRegistrationSerializer.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/CredentialRegistrationSerializer.java
index 1a04a4f..f2a88fd 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/CredentialRegistrationSerializer.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/CredentialRegistrationSerializer.java
@@ -31,6 +31,7 @@ import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
 import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
 
 import net.shibboleth.idp.plugin.authn.webauthn.storage.CredentialRecord;
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
 import net.shibboleth.shared.annotation.constraint.NotLive;
 import net.shibboleth.shared.annotation.constraint.Unmodifiable;
 import net.shibboleth.shared.collection.CollectionSupport;
@@ -58,7 +59,7 @@ public class CredentialRegistrationSerializer extends AbstractInitializableCompo
     }
 
     @Override
-    public String serialize(final Set<CredentialRecord> instance) throws IOException {
+    @Nonnull @NotEmpty public String serialize(final Set<CredentialRecord> instance) throws IOException {
         checkComponentActive();
         final String valueAsString = jsonMapper.writeValueAsString(instance);
         if (valueAsString == null) {
diff --git a/webauthn-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/admin/webauthn-registration/webauthn-registration-beans.xml b/webauthn-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/admin/webauthn-registration/webauthn-registration-beans.xml
index 7ebf419..361d5bc 100644
--- a/webauthn-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/admin/webauthn-registration/webauthn-registration-beans.xml
+++ b/webauthn-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/admin/webauthn-registration/webauthn-registration-beans.xml
@@ -101,24 +101,24 @@
     <bean id="shibboleth.authn.WebAuthn.registration.SubjectContextUsernameLookupStrategy" lazy-init="true" scope="singleton"
         class="net.shibboleth.idp.plugin.authn.webauthn.context.navigate.UsernameLookupFromSubjectContext" />
     
-    <bean id="shibboleth.authn.WebAuthn.AttributeContextWebAuthnNameLookupStrategy" lazy-init="true" scope="singleton"
+    <bean id="shibboleth.authn.WebAuthn.registration.AttributeContextWebAuthnNameLookupStrategy" lazy-init="true" scope="singleton"
         class="net.shibboleth.idp.plugin.authn.webauthn.context.navigate.AttributeContextStringLookupStrategy"
         p:attributeId="%{idp.authn.webauthn.registration.name.attributeId:#{null}}"/>
     
     <bean id="AddAttestationConveyancePreference" scope="prototype" parent="AbstractWebAuthnRegistrationAction"
         class="net.shibboleth.idp.plugin.authn.webauthn.admin.impl.AddAttestationConveyancePreference"
-        p:attestationConveyancePreference="#{getObject('shibboleth.authn.WebAuthn.AttestationConveyancePreferenceLookupStrategy') == null ? '%{idp.authn.webauthn.registration.attestationConveyancePreference:none}' : null}"
-        p:attestationConveyancePreferenceLookupStrategy="#{getObject('shibboleth.authn.WebAuthn.AttestationConveyancePreferenceLookupStrategy')}"/>
+        p:attestationConveyancePreference="#{getObject('shibboleth.authn.WebAuthn.registration.AttestationConveyancePreferenceLookupStrategy') == null ? '%{idp.authn.webauthn.registration.attestationConveyancePreference:none}' : null}"
+        p:attestationConveyancePreferenceLookupStrategy="#{getObject('shibboleth.authn.WebAuthn.registration.AttestationConveyancePreferenceLookupStrategy')}"/>
 
     <bean id="AddResidentKeyRequirement" scope="prototype" parent="AbstractWebAuthnRegistrationAction"
         class="net.shibboleth.idp.plugin.authn.webauthn.admin.impl.AddResidentKeyRequirement"
-        p:residentKeyRequirement="#{getObject('shibboleth.authn.WebAuthn.ResidentKeyRequirementLookupStrategy') == null ? '%{idp.authn.webauthn.registration.residentKey:preferred}' : null}"
-        p:residentKeyRequirementLookupStrategy="#{getObject('shibboleth.authn.WebAuthn.ResidentKeyRequirementLookupStrategy')}" />
+        p:residentKeyRequirement="#{getObject('shibboleth.authn.WebAuthn.registration.ResidentKeyRequirementLookupStrategy') == null ? '%{idp.authn.webauthn.registration.residentKey:preferred}' : null}"
+        p:residentKeyRequirementLookupStrategy="#{getObject('shibboleth.authn.WebAuthn.registration.ResidentKeyRequirementLookupStrategy')}" />
 
     <bean id="AddAuthenticatorAttachmentRequirement" scope="prototype" parent="AbstractWebAuthnRegistrationAction"
         class="net.shibboleth.idp.plugin.authn.webauthn.admin.impl.AddAuthenticatorAttachmentRequirement"
-        p:authenticatorAttachmentRequirement="#{getObject('shibboleth.authn.WebAuthn.AuthenticatorAttachmentRequirementLookupStrategy') == null ? '%{idp.authn.webauthn.registration.authenticatorAttachment:any}' : null}" 
-        p:authenticatorAttachmentRequirementLookupStrategy="#{getObject('shibboleth.authn.WebAuthn.AuthenticatorAttachmentRequirementLookupStrategy')}"/>
+        p:authenticatorAttachmentRequirement="#{getObject('shibboleth.authn.WebAuthn.registration.AuthenticatorAttachmentRequirementLookupStrategy') == null ? '%{idp.authn.webauthn.registration.authenticatorAttachment:any}' : null}" 
+        p:authenticatorAttachmentRequirementLookupStrategy="#{getObject('shibboleth.authn.WebAuthn.registration.AuthenticatorAttachmentRequirementLookupStrategy')}"/>
 
     <bean id="AddUserVerificationRequired" parent="AbstractWebAuthnBaseAction"
         class="net.shibboleth.idp.plugin.authn.webauthn.impl.AddUserVerificationRequirement" scope="prototype"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list