{"id":21878313,"url":"https://github.com/pepabo/libpam-mruby","last_synced_at":"2025-10-19T13:14:38.353Z","repository":{"id":66391872,"uuid":"42672213","full_name":"pepabo/libpam-mruby","owner":"pepabo","description":"A PAM module to authenticate user with mruby","archived":false,"fork":false,"pushed_at":"2017-05-18T06:06:02.000Z","size":10,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-14T03:35:09.073Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","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/pepabo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2015-09-17T17:52:49.000Z","updated_at":"2017-11-10T07:25:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"400818e4-20e8-486e-9f90-7668291feae6","html_url":"https://github.com/pepabo/libpam-mruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pepabo/libpam-mruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Flibpam-mruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Flibpam-mruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Flibpam-mruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Flibpam-mruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pepabo","download_url":"https://codeload.github.com/pepabo/libpam-mruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Flibpam-mruby/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265409167,"owners_count":23760238,"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-28T08:12:17.526Z","updated_at":"2025-10-19T13:14:33.302Z","avatar_url":"https://github.com/pepabo.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libpam-mruby\n\nA PAM module to authenticate user with mruby.\n\n## Usage\n\nAdd a file that has a line like below into `/etc/.pam.d` (or other location along with your environment):\n\n```\nauth sufficient pam_mruby.so rbfile=/path/to/auth.rb try_first_pass\n```\n\nThen write an auth handler in mruby like below.\n\n`auth.rb`:\n\n```ruby\ndef authenticate(username, password)\n  if username == 'kentaro' \u0026\u0026 password == 'p@ssw0rd'\n    true\n  else\n    false\n  end\nend\n```\n\n`authenticate()` method at top-level is called when your mruby handler is executed.\n\nFor more practical usage, you can use this module, for instance, to handle authentication request using some external user information repository service. Thanks to mruby's flexibility, you can easily introduce mrbgems to your auth handler script.\n\n## How to Build\n\n### Using Docker\n\nOn Mac OSX or other:\n\n```\n$ docker-compose build libpam-mruby\n$ docker-compose run libpam-mruby\n```\n\nYou'll see the artifact at `build/pam_mruby.so`.\n\n### Build Directly\n\nInstall prerequisites like below(on CentOS):\n\n```\n$ yum -y install gcc bison rake\n$ yum -y pam pam-devel\n```\n\nThen execute `rake` command:\n\n```\n$ rake\n```\n\nAlso you'll see the artifact at `build/pam_mruby.so`.\n\n## Author\n\n* Kentaro Kuribayashi\n* Uchio KONDO\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepabo%2Flibpam-mruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpepabo%2Flibpam-mruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepabo%2Flibpam-mruby/lists"}