{"id":25835703,"url":"https://github.com/djoos/escapewsseauthenticationbundle","last_synced_at":"2025-04-04T11:12:14.085Z","repository":{"id":1985468,"uuid":"2917445","full_name":"djoos/EscapeWSSEAuthenticationBundle","owner":"djoos","description":"Symfony bundle to implement WSSE authentication","archived":false,"fork":false,"pushed_at":"2019-04-23T16:02:18.000Z","size":162,"stargazers_count":137,"open_issues_count":9,"forks_count":59,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-17T09:02:53.012Z","etag":null,"topics":["php","symfony","wsse"],"latest_commit_sha":null,"homepage":"http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/djoos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"Security/Core/Authentication/Provider/Provider.php","support":null}},"created_at":"2011-12-05T15:24:19.000Z","updated_at":"2023-10-11T13:19:24.000Z","dependencies_parsed_at":"2022-08-21T10:50:10.612Z","dependency_job_id":null,"html_url":"https://github.com/djoos/EscapeWSSEAuthenticationBundle","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djoos%2FEscapeWSSEAuthenticationBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djoos%2FEscapeWSSEAuthenticationBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djoos%2FEscapeWSSEAuthenticationBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djoos%2FEscapeWSSEAuthenticationBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djoos","download_url":"https://codeload.github.com/djoos/EscapeWSSEAuthenticationBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166168,"owners_count":20894654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","symfony","wsse"],"created_at":"2025-03-01T01:32:49.903Z","updated_at":"2025-04-04T11:12:14.066Z","avatar_url":"https://github.com/djoos.png","language":"PHP","readme":"[![Build Status](https://secure.travis-ci.org/djoos/EscapeWSSEAuthenticationBundle.png)](http://travis-ci.org/djoos/EscapeWSSEAuthenticationBundle)\n\n## Introduction\n\nThe EscapeWSSEAuthentication bundle is a simple and easy way to implement WSSE authentication in Symfony applications\n\n## Installation\n\n`Command Line`\n\n```sh\ncomposer require escapestudios/wsse-authentication-bundle\n```\n\n`composer.json`\n\n```json\n\"require\": {\n    ...\n    \"escapestudios/wsse-authentication-bundle\": \"^2.2\",\n    ...\n}\n```\n\n`app/AppKernel.php`\n\n```php\npublic function registerBundles()\n{\n    return array(\n        //...\n        new Escape\\WSSEAuthenticationBundle\\EscapeWSSEAuthenticationBundle(),\n        //...\n    );\n    ...\n```\n\n## Commands\n\nDelete expired nonces via the `escape:wsseauthentication:nonces:delete` command that ships with this bundle; it takes the firewall name as a (required) parameter.\n\n`php app/console --env=dev escape:wsseauthentication:nonces:delete wsse_secured`\n\n## Quick usage example\n\n`app/config/security.yml`\n\n```yml\nfirewalls:\n    wsse_secured:\n        pattern:   ^/api/.*\n        stateless: true\n        wsse:\n            realm: \"Secured with WSSE\" #identifies the set of resources to which the authentication information will apply (WWW-Authenticate)\n            profile: \"UsernameToken\" #WSSE profile (WWW-Authenticate)\n```\n\n...that's it! Your \"wsse_secured\"-firewall is now secured via the (out-of-the-box) WSSE Authentication setup. You can now start calling your API endpoints: generate a X-WSSE header (Symfony\\Component\\Security\\Core\\Encoder\\MessageDigestPasswordEncoder) and add it to your request (cUrl).\nIt is strongly recommended to have a read through the more advanced configuration below once you're up and running with the basics...\n\n## Advanced configuration\n\n### Specify a custom token lifetime\n\nDefault value: 300\n\n`app/config/security.yml`\n\n```yml\nfirewalls:\n    wsse_secured:\n        #...\n        wsse:\n            #...\n            lifetime: 300 # or -1 for infinite lifetime tokens (please use with extreme care!)\n```\n\n### Specify a custom date format\n\nDefault value: see regular expression below for ISO8601 ([check out](http://www.pelagodesign.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/))\n\n`app/config/security.yml`\n\n```yml\nfirewalls:\n    wsse_secured:\n        #...\n        wsse:\n            #...\n            date_format: '/^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/'\n```\n\n### Specify a custom digest algorithm\n\nDefault value: base 64-encoded sha1 with 1 iteration\n\n:warning: Please change the digest algorithm to a stronger one, like bcrypt :warning:\n\n`app/config/security.yml`\n\n```yml\nfirewalls:\n    wsse_secured:\n        #...\n        wsse:\n            #...\n            encoder: #digest algorithm\n                algorithm: sha1\n                encodeHashAsBase64: true\n                iterations: 1\n```\n\n### Specify a custom nonce cache\n\nDefault value: Doctrine\\Common\\Cache\\PhpFileCache in %kernel.cache_dir%/security/nonces\n\n`app/config/security.yml`\n\n```yml\nservices:\n    #...\n    cache_nonces:\n        class: Doctrine\\Common\\Cache\\PhpFileCache\n        arguments: [%kernel.cache_dir%/security/nonces]\n```\n\n`app/config/security.yml`\n\n```yml\nfirewalls:\n    wsse_secured:\n        #...\n        wsse:\n            #...\n            nonce_cache_service_id: cache_nonces\n```\n\n### Use multiple providers\n\n`app/config/security.yml`\n\n```yml\nproviders:\n    provider_one:\n        #...\n    provider_two:\n        #...\n\nfirewalls:\n    wsse_secured_by_provider_one:\n        provider: provider_one\n        wsse:\n            #...\n\n    wsse_secured_by_provider_two:\n        provider: provider_two\n        wsse:\n            #...\n```\n\n### Make use of a specific user provider on a firewall with WSSE as one of multiple authentication mechanisms\n\n`app/config/security.yml`\n\n```yml\nproviders:\n    users:\n        #...\n    wsse_users:\n        memory:\n            users:\n                - { name: 'someuser', password: 'somesecret' }\n\nfirewalls:\n    secured:\n        provider: users\n        wsse:\n            #...\n            provider: wsse_users #don't make use of firewall's \"users\"-provider, but \"wsse_users\"-provider for WSSE\n```\n\n### Specify custom authentication class(es)\n\n`app/config/config.yml`\n\n```yml\n# Escape WSSE authentication configuration\nescape_wsse_authentication:\n    authentication_provider_class: Escape\\WSSEAuthenticationBundle\\Security\\Core\\Authentication\\Provider\\Provider\n    authentication_listener_class: Escape\\WSSEAuthenticationBundle\\Security\\Http\\Firewall\\Listener\n    authentication_entry_point_class: Escape\\WSSEAuthenticationBundle\\Security\\Http\\EntryPoint\\EntryPoint\n    authentication_encoder_class: Symfony\\Component\\Security\\Core\\Encoder\\MessageDigestPasswordEncoder\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjoos%2Fescapewsseauthenticationbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjoos%2Fescapewsseauthenticationbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjoos%2Fescapewsseauthenticationbundle/lists"}