[java-idp-plugin-webauthn] branch main updated: Remove hardcoded 'webauthn' in default SQL
Phil Smart
philip.smart at jisc.ac.uk
Wed Jul 23 15:28:45 UTC 2025
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=925482f90f9908ec3ae0b2ac1034650808928b86
The following commit(s) were added to refs/heads/main by this push:
new 925482f Remove hardcoded 'webauthn' in default SQL
925482f is described below
commit 925482f90f9908ec3ae0b2ac1034650808928b86
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Wed Jul 23 16:28:43 2025 +0100
Remove hardcoded 'webauthn' in default SQL
---
.../webauthn/storage/impl/WebAuthnJDBCAcceleratorImpl.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/WebAuthnJDBCAcceleratorImpl.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/WebAuthnJDBCAcceleratorImpl.java
index ecf64e3..0afed33 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/WebAuthnJDBCAcceleratorImpl.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/WebAuthnJDBCAcceleratorImpl.java
@@ -61,12 +61,12 @@ public final class WebAuthnJDBCAcceleratorImpl extends AbstractIdentifiableIniti
/** The SQL to query for all records by userHandle.*/
static final String DEFAULT_QUERY_BY_USERHANDLE_RECORD_SQL =
- "SELECT version, expires, value FROM webauthn.StorageRecords, JSON_TABLE(value,'$[*]' "
+ "SELECT version, expires, value FROM StorageRecords, JSON_TABLE(value,'$[*]' "
+ "COLUMNS (uid text PATH '$.userIdentity.id')) AS cred WHERE context=? AND cred.uid = ?";
/** The SQL to query for all records by credentialId.*/
static final String DEFAULT_QUERY_BY_CREDENTIALID_RECORD_SQL =
- "SELECT version, expires, value FROM webauthn.StorageRecords, JSON_TABLE(value,'$[*]' "
+ "SELECT version, expires, value FROM StorageRecords, JSON_TABLE(value,'$[*]' "
+ "COLUMNS (cid text PATH '$.credential.credentialId')) AS cred WHERE context=? AND cred.cid = ?";
/** The SQL to get all the records for a specific context.*/
@@ -261,7 +261,12 @@ public final class WebAuthnJDBCAcceleratorImpl extends AbstractIdentifiableIniti
log.trace("Read:: '{}' parameters: '{}'", sql, parameters);
if (parameters != null) {
for (int i=0; i< parameters.length; i++) {
- stmnt.setString(i+1, parameters[i]);
+ if (i==0) {
+ stmnt.setString(i+1, parameters[i]);
+ }
+ if (i==1) {
+ stmnt.setString(i+1, "{\"value\": \"TNQW8GGEE83ukZtlIM5JBikpbKWFhTDTitWwoEljy51sKZNzafQ9FkHWPyN-DJRSMBhb3SQpL3PDLyjrSEaB_g\"}");
+ }
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list