{"id":19794107,"url":"https://github.com/simplesamlphp/simplesamlphp-module-yubikey","last_synced_at":"2025-05-01T02:30:54.346Z","repository":{"id":47137133,"uuid":"77220675","full_name":"simplesamlphp/simplesamlphp-module-yubikey","owner":"simplesamlphp","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-20T17:27:52.000Z","size":190,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-06T07:52:52.686Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simplesamlphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-23T11:14:32.000Z","updated_at":"2025-01-06T22:09:19.000Z","dependencies_parsed_at":"2023-11-08T04:44:43.999Z","dependency_job_id":"9e9847a0-7a93-4557-9cf9-4dc9c3b25d91","html_url":"https://github.com/simplesamlphp/simplesamlphp-module-yubikey","commit_stats":{"total_commits":77,"total_committers":5,"mean_commits":15.4,"dds":"0.23376623376623373","last_synced_commit":"00b610a914289251a5b0bed4ee87c952d4b2b463"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesamlphp%2Fsimplesamlphp-module-yubikey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesamlphp%2Fsimplesamlphp-module-yubikey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesamlphp%2Fsimplesamlphp-module-yubikey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesamlphp%2Fsimplesamlphp-module-yubikey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplesamlphp","download_url":"https://codeload.github.com/simplesamlphp/simplesamlphp-module-yubikey/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251812302,"owners_count":21647884,"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":[],"created_at":"2024-11-12T07:12:07.135Z","updated_at":"2025-05-01T02:30:53.862Z","avatar_url":"https://github.com/simplesamlphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YubiKey\n\n![Build Status](https://github.com/simplesamlphp/simplesamlphp-module-yubikey/actions/workflows/php.yml/badge.svg)\n[![Coverage Status](https://codecov.io/gh/simplesamlphp/simplesamlphp-module-yubikey/branch/master/graph/badge.svg)](https://codecov.io/gh/simplesamlphp/simplesamlphp-module-yubikey)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/simplesamlphp/simplesamlphp-module-yubikey/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/simplesamlphp/simplesamlphp-module-yubikey/?branch=master)\n[![Type Coverage](https://shepherd.dev/github/simplesamlphp/simplesamlphp-module-yubikey/coverage.svg)](https://shepherd.dev/github/simplesamlphp/simplesamlphp-module-yubikey)\n[![Psalm Level](https://shepherd.dev/github/simplesamlphp/simplesamlphp-module-yubikey/level.svg)](https://shepherd.dev/github/simplesamlphp/simplesamlphp-module-yubikey)\n\nThis is a SimpleSAMLphp module to leverage YubiKey devices to authenticate\nusers in different ways. For the moment, it provides an authentication\nprocessing filter that allows you to require a user to use a YubiKey to\ncomplete authentication, effectively implementing two-factor authentication.\nThis filter can be combined with any other authentication source, provided\nthat the identifier (or identifiers) of the key registered for that user is\navailable as an attribute.\n\n## Installation\n\nOnce you have installed SimpleSAMLphp, installing this module is very simple.\nJust execute the following command in the root of your SimpleSAMLphp\ninstallation:\n\n```shell\nvendor/bin/composer require simplesamlphp/simplesamlphp-module-yubikey\n```\n\nThen, you need to do is to enable the Yubikey module: in\n `config.php`, search for the `module.enable` key and set `yubikey` to true:\n\n```php\n    'module.enable' =\u003e [\n        'yubikey' =\u003e true,\n        …\n    ],\n```\n\n## OTP authentication processing filter\n\nThis filter allows you to ask for YubiKey authentication before proceeding\nfurther. As any other processing filter, it can be configured either in the\ngeneral configuration, in the authsources, in the hosted IdP metadata or in\nthe remote SP metadata. See [documentation](documentation).\n\n[documentation]: https://simplesamlphp.org/docs/stable/simplesamlphp-authproc#section_1\n\nYou can configure the filter by adding an authproc filter with the class\n`yubikey:OTP`. At the very least, you will need an API client identifier and an\nAPI key. By default, the filter will let you use [YubiCloud](YubiCload), which\nwill require you to [register](register) to obtain a client identifier and an\nAPI key.\n\n[YubiCloud]: https://www.yubico.com/products/services-software/yubicloud\n[register]: https://upgrade.yubico.com/getapikey\n\nIf you would like to run the YubiKey validation server yourself (i.e. the\nserver running the API), [you can also do it](you can also do it). In that\ncase, you will need to configure the hostname of your validation server\ninstead of the default addresses.\n\n[you can also do it]: https://developers.yubico.com/Software_Projects/Yubico_OTP/YubiCloud_Validation_Servers\n\nHere are all the options available:\n\n### API configuration options\n\n- `api_client_id`: The client identifier to present to the API.\n  This option is **mandatory**.\n- `api_key`: The key that grants you access to the YubiKey API.\n  This option is **mandatory**.\n- `api_hosts`: An array containing the hosts where the API can be contacted to\n  authenticate a given YubiKey. Please note that\n  **all hosts will be queried**, and **all the responses must be successful**\n  in order to consider the authentication of a device to be successful.\n  Therefore, if you want to use your own API with high availability, you\n  should only specify one hostname here and configure a high availability\n  setup for that hostname.\n  This is optional and defaults to Yubico's public API servers, those being:\n  - `api.yubico.com`\n\n### Operational configuration options\n\n- `abort_if_missing`: A boolean value telling whether the whole login process\n  should be aborted if the user has no YubiKey devices registered\n  (set to `true`) or continue, skipping YubiKey authentication\n  (set to `false`). Optional. Defaults to `false`.\n- `key_id_attribute`: This is the name of an attribute that holds one or more\n  YubiKey device identifiers that are known and accepted for the user.\n  Optional. Defaults to `yubikey`.\n\n### Assurance configuration options\n\n- `assurance_attribute`: This is the name of an attribute that we will use to\n  indicate that a successful authentication with the YubiKey device was\n  performed (only when authentication was successful, of course).\n  Optional. Defaults to `eduPersonAssurance`.\n- `assurance_value`: This is the value that we will add to the attribute\n  specified by `assurance_attribute`.\n  Optional. Defaults to `OTP`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplesamlphp%2Fsimplesamlphp-module-yubikey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplesamlphp%2Fsimplesamlphp-module-yubikey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplesamlphp%2Fsimplesamlphp-module-yubikey/lists"}