{"id":18518423,"url":"https://github.com/identitypython/pyeleven","last_synced_at":"2025-04-09T08:31:48.347Z","repository":{"id":21157784,"uuid":"24460461","full_name":"IdentityPython/pyeleven","owner":"IdentityPython","description":"python PKCS11 REST proxy","archived":false,"fork":false,"pushed_at":"2024-05-17T09:34:01.000Z","size":82,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-24T04:01:44.691Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IdentityPython.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-25T14:06:25.000Z","updated_at":"2024-12-02T06:48:45.000Z","dependencies_parsed_at":"2023-02-11T05:05:15.478Z","dependency_job_id":null,"html_url":"https://github.com/IdentityPython/pyeleven","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/IdentityPython%2Fpyeleven","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IdentityPython%2Fpyeleven/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IdentityPython%2Fpyeleven/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IdentityPython%2Fpyeleven/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IdentityPython","download_url":"https://codeload.github.com/IdentityPython/pyeleven/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248003176,"owners_count":21031743,"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-06T17:13:19.634Z","updated_at":"2025-04-09T08:31:44.773Z","avatar_url":"https://github.com/IdentityPython.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![Code Health](https://landscape.io/github/leifj/pyeleven/master/landscape.png)](https://landscape.io/github/leifj/pyeleven/master)\n[![Travis](https://travis-ci.org/identitypython/pyeleven.svg?branch=master)](https://travis-ci.org/leifj/pyeleven)\n[![Coverage Status](https://coveralls.io/repos/identitypython/pyeleven/badge.png)](https://coveralls.io/r/leifj/pyeleven)\n\nPython PKCS11 REST Proxy\n========================\n\nA flask REST proxy for talking to a PKCS11 token wo having access to a native pkcs11 shim layer. Useful for cripled languages.\n\nGetting started\n---------------\n\n1. build a virtualenv\n2. install gunicorn\n3. install this application\n4. create config for your token\n\nCheckout code\n-------------\n\n    # git clone \u003cthis github url\u003e\n\nBuild a virtualenv\n------------------\n\n    # apt-get install python-virtualenv\n    # virtualenv /path/to/venv\n    # . /path/to/venv/bin/activate\n\nInstall packages\n----------------\n\n    # pip install -r requirements.txt\n    # pip install gunicorn\n\nInstall this application\n------------------------\n\n    # ./setup develop\n\nCreate config\n-------------\n\nIn the examples directory there is a script (gen-token.sh) that builds a sample config based on softhsm. Install softhsm first, then run gen-token.sh to create token, generate keys and create config.py. Finally start pyeleven in the same directory as the config.py file:\n\n    # apt-get install libhsm-bin\n    # cd examples\n    # make\n    # ls\n    config.py  gen-token.sh  Makefile  openssl.conf  softhsm.conf  softhsm.db  test.crt  test.der\n    # env SOFTHSM_CONF=softhsm.conf gunicorn --log-level debug -b :8080 pyeleven:app\n\nThis should start pyeleven on port 8080. Now try to sign something by POSTing a JSON object with 'mech' and 'data' fields. Currently 'mech' is silently ignored and RSASHA1 is used for everything. This will change soon.\n\nAPI\n---\n\n**Sign**\n\nPOST a JSON object to\n\n    /\u003cslot\u003e/\u003ckeyalias\u003e/sign\n    \nwith the following pattern:\n    \n    {'mech': 'RSAPKCS1', 'data': base64(\u003cto be signed\u003e)}\n    \nif successful the response will be a JSON object:\n\n    {'mech': 'RSAPKCS1', 'slot': \u003cslot\u003e, 'signed': base64(\u003csigned bytes\u003e)}\n\n**Slot Info**\n\nGET\n    /\u003cslot\u003e\n\nreturns a JSON datastructure representing information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidentitypython%2Fpyeleven","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidentitypython%2Fpyeleven","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidentitypython%2Fpyeleven/lists"}