From 882358a9520b40ba693e8229926a48af78998fda Mon Sep 17 00:00:00 2001 From: Spomky Date: Mon, 6 Jan 2020 13:23:47 +0100 Subject: [PATCH 1/5] Webauthn Bundle configuration, env and routes added --- .../3.0/config/routes/webauthn_routes.php | 9 +++++ .../3.0/config/webauthn.yaml | 37 +++++++++++++++++++ .../webauthn-symfony-bundle/3.0/manifest.json | 12 ++++++ 3 files changed, 58 insertions(+) create mode 100644 web-auth/webauthn-symfony-bundle/3.0/config/routes/webauthn_routes.php create mode 100644 web-auth/webauthn-symfony-bundle/3.0/config/webauthn.yaml create mode 100644 web-auth/webauthn-symfony-bundle/3.0/manifest.json diff --git a/web-auth/webauthn-symfony-bundle/3.0/config/routes/webauthn_routes.php b/web-auth/webauthn-symfony-bundle/3.0/config/routes/webauthn_routes.php new file mode 100644 index 00000000..f8355132 --- /dev/null +++ b/web-auth/webauthn-symfony-bundle/3.0/config/routes/webauthn_routes.php @@ -0,0 +1,9 @@ +import('.', 'webauthn'); +}; diff --git a/web-auth/webauthn-symfony-bundle/3.0/config/webauthn.yaml b/web-auth/webauthn-symfony-bundle/3.0/config/webauthn.yaml new file mode 100644 index 00000000..f269f575 --- /dev/null +++ b/web-auth/webauthn-symfony-bundle/3.0/config/webauthn.yaml @@ -0,0 +1,37 @@ +webauthn: +# logger: null + credential_repository: 'Webauthn\Bundle\Repository\DummyPublicKeyCredentialSourceRepository' # CREATE YOUR REPOSITORY AND CHANGE THIS! + user_repository: 'Webauthn\Bundle\Repository\DummyPublicKeyCredentialUserEntityRepository' # CREATE YOUR REPOSITORY AND CHANGE THIS! + creation_profiles: + default: + rp: + name: '%env(RELAYING_PARTY_NAME)%' # CHANGE THIS! + id: '%env(RELAYING_PARTY_ID)%' # Please adapt the env file with the correct relaying party ID or set null +# icon: null # +# challenge_length: 32 +# timeout: 60000 +# authenticator_selection_criteria: +# attachment_mode: !php/const Webauthn\AuthenticatorSelectionCriteria::AUTHENTICATOR_ATTACHMENT_NO_PREFERENCE +# require_resident_key: false +# user_verification: !php/const Webauthn\AuthenticatorSelectionCriteria::USER_VERIFICATION_REQUIREMENT_PREFERRED +# extensions: +# loc: true +# public_key_credential_parameters: # You should not change this list +# - !php/const Cose\Algorithms::COSE_ALGORITHM_EdDSA #Order is important. Preferred algorithms go first +# - !php/const Cose\Algorithms::COSE_ALGORITHM_ES256 +# - !php/const Cose\Algorithms::COSE_ALGORITHM_ES256K +# - !php/const Cose\Algorithms::COSE_ALGORITHM_ES384 +# - !php/const Cose\Algorithms::COSE_ALGORITHM_ES512 +# - !php/const Cose\Algorithms::COSE_ALGORITHM_RS256 +# - !php/const Cose\Algorithms::COSE_ALGORITHM_RS384 +# - !php/const Cose\Algorithms::COSE_ALGORITHM_RS512 +# - !php/const Cose\Algorithms::COSE_ALGORITHM_PS256 +# - !php/const Cose\Algorithms::COSE_ALGORITHM_PS384 +# - !php/const Cose\Algorithms::COSE_ALGORITHM_PS512 +# attestation_conveyance: !php/const Webauthn\PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_NONE + request_profiles: + default: + rp_id: '%env(RELAYING_PARTY_ID)%' # Please adapt the env file with the correct relaying party ID or set null +# metadata_service: +# enabled: false +# repository: 'App\Repository\MetadataStatementRepository' diff --git a/web-auth/webauthn-symfony-bundle/3.0/manifest.json b/web-auth/webauthn-symfony-bundle/3.0/manifest.json new file mode 100644 index 00000000..0c2d2d7d --- /dev/null +++ b/web-auth/webauthn-symfony-bundle/3.0/manifest.json @@ -0,0 +1,12 @@ +{ + "bundles": { + "Webauthn\\Bundle\\WebauthnBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%" + }, + "env": { + "RELAYING_PARTY_ID": "example.com", + "RELAYING_PARTY_NAME": "My Application" + } +} From e80d81fbe744eb796f5f60ab66dd1fb6fd17ded2 Mon Sep 17 00:00:00 2001 From: Spomky Date: Tue, 7 Jan 2020 22:16:28 +0100 Subject: [PATCH 2/5] Token binding handler added --- web-auth/webauthn-symfony-bundle/3.0/config/webauthn.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web-auth/webauthn-symfony-bundle/3.0/config/webauthn.yaml b/web-auth/webauthn-symfony-bundle/3.0/config/webauthn.yaml index f269f575..2a912843 100644 --- a/web-auth/webauthn-symfony-bundle/3.0/config/webauthn.yaml +++ b/web-auth/webauthn-symfony-bundle/3.0/config/webauthn.yaml @@ -2,6 +2,7 @@ webauthn: # logger: null credential_repository: 'Webauthn\Bundle\Repository\DummyPublicKeyCredentialSourceRepository' # CREATE YOUR REPOSITORY AND CHANGE THIS! user_repository: 'Webauthn\Bundle\Repository\DummyPublicKeyCredentialUserEntityRepository' # CREATE YOUR REPOSITORY AND CHANGE THIS! + token_binding_support_handler: 'Webauthn\TokenBinding\IgnoreTokenBindingHandler' creation_profiles: default: rp: @@ -32,6 +33,11 @@ webauthn: request_profiles: default: rp_id: '%env(RELAYING_PARTY_ID)%' # Please adapt the env file with the correct relaying party ID or set null +# challenge_length: 32 +# timeout: 60000 +# user_verification: !php/const Webauthn\AuthenticatorSelectionCriteria::USER_VERIFICATION_REQUIREMENT_PREFERRED +# extensions: +# loc: true # metadata_service: # enabled: false # repository: 'App\Repository\MetadataStatementRepository' From dde395e52693af71699c9db26773a1e72f7b1f7a Mon Sep 17 00:00:00 2001 From: Spomky Date: Tue, 7 Jan 2020 22:40:35 +0100 Subject: [PATCH 3/5] Config moved to the correct folder --- .../3.0/config/{ => packages}/webauthn.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename web-auth/webauthn-symfony-bundle/3.0/config/{ => packages}/webauthn.yaml (100%) diff --git a/web-auth/webauthn-symfony-bundle/3.0/config/webauthn.yaml b/web-auth/webauthn-symfony-bundle/3.0/config/packages/webauthn.yaml similarity index 100% rename from web-auth/webauthn-symfony-bundle/3.0/config/webauthn.yaml rename to web-auth/webauthn-symfony-bundle/3.0/config/packages/webauthn.yaml From 9a4b7e6021012f7cf01555caba1c5276975458be Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Fri, 14 Feb 2020 09:28:12 +0100 Subject: [PATCH 4/5] Commented sections removed The commented sections have been removed. A link to the documentation page has been added --- .../3.0/config/packages/webauthn.yaml | 34 ++----------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/web-auth/webauthn-symfony-bundle/3.0/config/packages/webauthn.yaml b/web-auth/webauthn-symfony-bundle/3.0/config/packages/webauthn.yaml index 2a912843..e2ab0807 100644 --- a/web-auth/webauthn-symfony-bundle/3.0/config/packages/webauthn.yaml +++ b/web-auth/webauthn-symfony-bundle/3.0/config/packages/webauthn.yaml @@ -1,43 +1,13 @@ +# Please see the following page for more information: https://webauthn-doc.spomky-labs.com/the-webauthn-server/the-symfony-way#configuration + webauthn: -# logger: null credential_repository: 'Webauthn\Bundle\Repository\DummyPublicKeyCredentialSourceRepository' # CREATE YOUR REPOSITORY AND CHANGE THIS! user_repository: 'Webauthn\Bundle\Repository\DummyPublicKeyCredentialUserEntityRepository' # CREATE YOUR REPOSITORY AND CHANGE THIS! - token_binding_support_handler: 'Webauthn\TokenBinding\IgnoreTokenBindingHandler' creation_profiles: default: rp: name: '%env(RELAYING_PARTY_NAME)%' # CHANGE THIS! id: '%env(RELAYING_PARTY_ID)%' # Please adapt the env file with the correct relaying party ID or set null -# icon: null # -# challenge_length: 32 -# timeout: 60000 -# authenticator_selection_criteria: -# attachment_mode: !php/const Webauthn\AuthenticatorSelectionCriteria::AUTHENTICATOR_ATTACHMENT_NO_PREFERENCE -# require_resident_key: false -# user_verification: !php/const Webauthn\AuthenticatorSelectionCriteria::USER_VERIFICATION_REQUIREMENT_PREFERRED -# extensions: -# loc: true -# public_key_credential_parameters: # You should not change this list -# - !php/const Cose\Algorithms::COSE_ALGORITHM_EdDSA #Order is important. Preferred algorithms go first -# - !php/const Cose\Algorithms::COSE_ALGORITHM_ES256 -# - !php/const Cose\Algorithms::COSE_ALGORITHM_ES256K -# - !php/const Cose\Algorithms::COSE_ALGORITHM_ES384 -# - !php/const Cose\Algorithms::COSE_ALGORITHM_ES512 -# - !php/const Cose\Algorithms::COSE_ALGORITHM_RS256 -# - !php/const Cose\Algorithms::COSE_ALGORITHM_RS384 -# - !php/const Cose\Algorithms::COSE_ALGORITHM_RS512 -# - !php/const Cose\Algorithms::COSE_ALGORITHM_PS256 -# - !php/const Cose\Algorithms::COSE_ALGORITHM_PS384 -# - !php/const Cose\Algorithms::COSE_ALGORITHM_PS512 -# attestation_conveyance: !php/const Webauthn\PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_NONE request_profiles: default: rp_id: '%env(RELAYING_PARTY_ID)%' # Please adapt the env file with the correct relaying party ID or set null -# challenge_length: 32 -# timeout: 60000 -# user_verification: !php/const Webauthn\AuthenticatorSelectionCriteria::USER_VERIFICATION_REQUIREMENT_PREFERRED -# extensions: -# loc: true -# metadata_service: -# enabled: false -# repository: 'App\Repository\MetadataStatementRepository' From 86cd7f640fe909cd8348263321651a344b86b5e1 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Fri, 14 Feb 2020 09:29:22 +0100 Subject: [PATCH 5/5] Update webauthn.yaml --- .../webauthn-symfony-bundle/3.0/config/packages/webauthn.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-auth/webauthn-symfony-bundle/3.0/config/packages/webauthn.yaml b/web-auth/webauthn-symfony-bundle/3.0/config/packages/webauthn.yaml index e2ab0807..741c5d68 100644 --- a/web-auth/webauthn-symfony-bundle/3.0/config/packages/webauthn.yaml +++ b/web-auth/webauthn-symfony-bundle/3.0/config/packages/webauthn.yaml @@ -6,7 +6,7 @@ webauthn: creation_profiles: default: rp: - name: '%env(RELAYING_PARTY_NAME)%' # CHANGE THIS! + name: '%env(RELAYING_PARTY_NAME)%' # Please adapt the env file with the correct relaying party ID or set null id: '%env(RELAYING_PARTY_ID)%' # Please adapt the env file with the correct relaying party ID or set null request_profiles: default: