{"id":18765246,"url":"https://github.com/technetos/iot_final_project","last_synced_at":"2025-12-07T16:30:13.882Z","repository":{"id":74868712,"uuid":"158873390","full_name":"technetos/iot_final_project","owner":"technetos","description":"A client-server rfid authentication system","archived":false,"fork":false,"pushed_at":"2018-12-05T23:54:24.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-29T05:44:02.359Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/technetos.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":"2018-11-23T20:02:01.000Z","updated_at":"2018-12-05T23:54:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"9aac09a3-1f4f-49b7-86a2-fb76a0d90771","html_url":"https://github.com/technetos/iot_final_project","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technetos%2Fiot_final_project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technetos%2Fiot_final_project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technetos%2Fiot_final_project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technetos%2Fiot_final_project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technetos","download_url":"https://codeload.github.com/technetos/iot_final_project/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239663367,"owners_count":19676572,"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-07T18:33:20.106Z","updated_at":"2025-12-07T16:30:13.836Z","avatar_url":"https://github.com/technetos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IoT RFID Security System\nA general purpose rfid based authentication system for protecting anything with\na plastic card :rofl:\n\n# Getting Started\n## Setting up the auth service\nThe core of the authentication service is provided by [heatshield][1].\n\nThe following tasks need to be achieved before the auth service can be used:\n\n### Set the database urls\n\n```\n$ cd rfid_auth_server\n$ source setup.sh\n```\n### Add a client and user to the database\nThis can be done with [heatshield-cli][2].\n\n# Infrastructure\n\n## Backend\nThe backend server is implemented in the Rust Programming Language and provides\naccess to a number of different functions the client can request.  \n\n## Frontend\nThe frontend is a command line client implemented in Python that talks to the\nbackend to perform operations.  Actions performed using the client require key card access.  \n\n### Actions\nThe table below describes the actions available in this PoC.\n\nAction | Description | Requires Key Card\n--- | --- | ---\n`file` | Request a file given an id card and filename.  Acts like a single flat directory for a users files, text only | yes\n`door` | Request that a door be opened.  Actual implementation only prints `Opening Door` on the server and serves as an example that anything can be put behind a protected route.  | yes\n\n# Authentication \u0026 Authorization\nWhen an rfid card/token is scanned the data stored on a section of the storage\nis read, parsed, and sent to the backend as a set of credentials.  Assuming that\nthe username and password supplied on the rfid card/token are valid, an access\ntoken is generated and stored in the backend database and then sent to the\nclient.  The client is then able to make requests to a protected route with the\naccess token in the header of the request like this:\n\n```\nAuthorization: Bearer ey.........................\n```\n\nAn authorized user will have a valid access token that matches the access token\nin the backend database and will not be rejected.  \n\nA user with username and password that are not in the database, that is they do\nnot have an account, will not be granted an access token.  \n\n# Protected Routes\nAny route can be a protected route by adding `policy: Bearer` as an argument to\nthe function.  The Bearer policy is what is known as a RequestGuard in the\nRocket HTTP framework.  When a RequestGuard fails, the route that its used on is\nnever evaluated, this allows us to use our Bearer policy to protect routes.\n\nAs in the aforementioned `door` example, if the user does not have an access\ntoken, the door route is never evaluated and thus never unlocked.  \n\n[1]: https://github.com/technetos/heatshield\n[2]: https://github.com/technetos/heatshield-cli\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnetos%2Fiot_final_project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnetos%2Fiot_final_project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnetos%2Fiot_final_project/lists"}