StrongKey / fido2

Open-source FIDO server, featuring the FIDO2 standard. https://demo4.strongkey.com/getstarted/#/openapi/fido

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need help on Basic Java Sample Demo

wsideveloper opened this issue · comments

I am able to install a SKFS server with my internet domain. I can do a ping to my server too:
java -jar skfsclient.jar P https://mydomain:8181 1 REST PASSWORD svcfidouser Abcd1234!

However when I install the Basic Java Sample Demo and launch it to my server https://mydomain:8181//basicdemo/

I get this error when I do a register:
SecurityError: The relying party ID is not a registrable domain suffix of, nor equal to the current domain.

I have tried to change the policy for DID 1 in the database by only replacing "strongkey.com" to mydomain:

{"FidoPolicy":{"name":"MinimalPolicy","copyright":"","version":"1.0","startDate":"1635942582","endDate":"1760103870871","system":{"requireCounter":"mandatory","integritySignatures":false,"userVerification":["required","preferred","discouraged"],"userPresenceTimeout":0,"allowedAaguids":["all"],"jwtKeyValidity":365,"jwtRenewalWindow":30,"transport":["usb","internal"]},"algorithms":{"curves":["secp256r1","secp384r1","secp521r1","curve25519"],"rsa":["RS256","RS384","RS512","PS256","PS384","PS384"],"signatures":["ES256","ES384","ES512","EdDSA","ES256K"]},"attestation":{"conveyance":["none","indirect","direct","enterprise"],"formats":["fido-u2f","packed","tpm","android-key","android-safetynet","apple","none"]},"registration":{"displayName":"required","attachment":["platform","cross-platform"],"discoverableCredential":["required","preferred","discouraged"],"excludeCredentials":"enabled"},"authentication":{"allowCredentials":"enabled"},"authorization":{"maxdataLength":256,"preserve":true},"rp":{"id":"strongkey.com","name":"FIDOServer"},"extensions":{},"mds":{"authenticatorStatusReport":[{"status":"FIDO_CERTIFIED_L1","priority":"1","decision":"IGNORE"},{"status":"FIDO_CERTIFIED_L2","priority":"1","decision":"ACCEPT"},{"status":"UPDATE_AVAILABLE","priority":"5","decision":"IGNORE"},{"status":"REVOKED","priority":"10","decision":"DENY"}]},"jwt":{"algorithms":["ES256","ES384","ES521"],"duration":30,"required":["rpid","iat","exp","cip","uname","agent"],"signingCerts":{"DN":"CN=StrongKey KeyAppliance,O=StrongKey","certsPerServer":3}}}}

but the registering still does not work. It shows a new error "WEBAUTHN-WS-ERR-1000: An unexpected error occurred. Please check server logs for details."

Any pointers?

Thank you for your quick reply. mydomain is just a representation of my FDQN.

I managed to solve the problem. A \n is needed at the end of the policy string.

{"FidoPolicy":{"name":"MinimalPolicy","copyright":"","version":"1.0","startDate":"1635942582","endDate":"1760103870871","system":{"requireCounter":"mandatory","integritySignatures":false,"userVerification":["required","preferred","discouraged"],"userPresenceTimeout":0,"allowedAaguids":["all"],"jwtKeyValidity":365,"jwtRenewalWindow":30,"transport":["usb","internal"]},"algorithms":{"curves":["secp256r1","secp384r1","secp521r1","curve25519"],"rsa":["RS256","RS384","RS512","PS256","PS384","PS384"],"signatures":["ES256","ES384","ES512","EdDSA","ES256K"]},"attestation":{"conveyance":["none","indirect","direct","enterprise"],"formats":["fido-u2f","packed","tpm","android-key","android-safetynet","apple","none"]},"registration":{"displayName":"required","attachment":["platform","cross-platform"],"discoverableCredential":["required","preferred","discouraged"],"excludeCredentials":"enabled"},"authentication":{"allowCredentials":"enabled"},"authorization":{"maxdataLength":256,"preserve":true},"rp":{"id":"strongkey.com","name":"FIDOServer"},"extensions":{},"mds":{"authenticatorStatusReport":[{"status":"FIDO_CERTIFIED_L1","priority":"1","decision":"IGNORE"},{"status":"FIDO_CERTIFIED_L2","priority":"1","decision":"ACCEPT"},{"status":"UPDATE_AVAILABLE","priority":"5","decision":"IGNORE"},{"status":"REVOKED","priority":"10","decision":"DENY"}]},"jwt":{"algorithms":["ES256","ES384","ES521"],"duration":30,"required":["rpid","iat","exp","cip","uname","agent"],"signingCerts":{"DN":"CN=StrongKey KeyAppliance,O=StrongKey","certsPerServer":3}}}} \n