From 882358a9520b40ba693e8229926a48af78998fda Mon Sep 17 00:00:00 2001 From: Spomky Date: Mon, 6 Jan 2020 13:23:47 +0100 Subject: [PATCH] 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" + } +}