{"id":21538342,"url":"https://github.com/rarimo/passport-identity-provider","last_synced_at":"2025-04-10T03:23:50.754Z","repository":{"id":241080178,"uuid":"754776424","full_name":"rarimo/passport-identity-provider","owner":"rarimo","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-26T10:41:40.000Z","size":15766,"stargazers_count":8,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T18:11:04.988Z","etag":null,"topics":["did","icao","zkp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rarimo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audits/halborn_2024-03-16.pdf","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-08T18:42:54.000Z","updated_at":"2024-12-10T23:14:53.000Z","dependencies_parsed_at":"2024-11-24T04:11:47.212Z","dependency_job_id":"3f4b3225-90f4-4641-95dd-d54f05374fdb","html_url":"https://github.com/rarimo/passport-identity-provider","commit_stats":null,"previous_names":["rarimo/passport-identity-provider"],"tags_count":76,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rarimo%2Fpassport-identity-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rarimo%2Fpassport-identity-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rarimo%2Fpassport-identity-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rarimo%2Fpassport-identity-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rarimo","download_url":"https://codeload.github.com/rarimo/passport-identity-provider/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248149292,"owners_count":21055744,"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":["did","icao","zkp"],"created_at":"2024-11-24T04:11:42.471Z","updated_at":"2025-04-10T03:23:50.730Z","avatar_url":"https://github.com/rarimo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# identity-provider-service\n\n## Description\n\nThis service is responsible for verifying a user-provided ZKP, real-world identity certificate and issuing voting permission claim.\n\n## Endpoints\n\n### create_identity\n\n`create_identity` verifies a user-provided ZKP that proves the real-world identity ownership, validates this real-world identity certificate and issues a PollsCredential claim.\u003cbr\u003e\u003cbr\u003e\nPath: `POST /integrations/identity-provider-service/v1/create-identity`\u003cbr\u003e\nPayload example (proof is provided as an example and actually does not prove anything):\n```json\n{\n  \"data\": {\n    \"id\": \"did:iden3:readonly:tJWarsbwqiUxHm8BPi4aYSnnj54AbuR4D2RrhkykQ\",\n    \"document_sod\": {\n      \"signed_attributes\": \"hex_string\",\n      \"algorithm\": \"SHA256withRSA\",\n      \"signature\": \"hex_string\",\n      \"pem_file\": \"-----BEGIN CERTIFICATE-----\\n{...}\\n-----END CERTIFICATE-----\",\n      \"encapsulated_content\": \"hex_string\"\n    },\n    \"zkproof\": {\n      \"proof\": {\n        \"pi_a\": [\n          \"4486400337619062702179111506341517111494111681111222111137338836157671763417\",\n          \"4486400337619062702179111506341517111494111681111222111137338836157671763417\",\n          \"1\"\n        ],\n        \"pi_b\": [\n          [\n            \"4486400337619062702179111506341517111494111681111222111137338836157671763417\",\n            \"4486400337619062702179111506341517111494111681111222111137338836157671763417\"\n          ],\n          [\n            \"4486400337619062702179111506341517111494111681111222111137338836157671763417\",\n            \"4486400337619062702179111506341517111494111681111222111137338836157671763417\"\n          ],\n          [\n            \"1\",\n            \"0\"\n          ]\n        ],\n        \"pi_c\": [\n          \"44864003376190627021791115063415171114941116811112221111373388361576717634171\",\n          \"4486400337619062702179111506341517111494111681111222111137338836157671763417\",\n          \"1\"\n        ],\n        \"protocol\": \"groth16\",\n        \"curve\": \"bn128\"\n      },\n      \"pub_signals\": [\n        \"311829949927574718572524671081106490489\",\n        \"311829949927574718572524671081106490489\",\n        \"4903111\",\n        \"24\",\n        \"1\",\n        \"25\",\n        \"25\",\n        \"1\",\n        \"25\",\n        \"18\"\n      ]\n    }\n  }\n}\n```\n\n## Issuer Node Integration\n\nThe only Issuer Node that is used is CreateCredential that issues claim. This claim is always stored in the issuer's Claims Tree (considering that the CreateCredential payload field `mtProof` is always `true`) that is automatically transited on-chain.\u003cbr\u003e\u003cbr\u003e\n`CreateCredential` payload example:\n```json\n{\n  \"credentialSchema\": \"https://bafybeif5xytac5352no62kalpdin3vbwp3pknijmzwd5dqgsi72jnnss6y.ipfs.w3s.link/PollsCredential.json\",\n  \"credentialSubject\": {\n    \"id\": \"did:iden3:readonly:tMF5BykcV7fiDSRi3HQSH8VHjTR24fqz2BhJHHzuY\",\n    \"isAdult\": true,\n    \"issuingAuthority\": 4903594,\n    \"documentNullifier\": \"18586133768512220936620570745912940619677854269274689475585506675881198879027\",\n    \"credentialHash\": \"8645981980787649023086883978738420856660271013038108762834452721572614684349\"\n  },\n  \"type\": \"PollsCredential\",\n  \"mtProof\": true,\n  \"signatureProof\": true,\n  \"expiration\": \"2023-10-26T10:59:08Z\"\n}\n```\n\n## Install\n\n  ```\n  git clone github.com/rarimo/passport-identity-provider\n  cd identity-provider-service\n  go build main.go\n  export KV_VIPER_FILE=./config.yaml\n  ./main migrate up\n  ./main run service\n  ```\n\n## Documentation\n\nWe do use openapi:json standard for API. We use swagger for documenting our API.\n\nTo open online documentation, go to [swagger editor](http://localhost:8080/swagger-editor/) here is how you can start it\n```\n  cd docs\n  npm install\n  npm start\n```\nTo build documentation use `npm run build` command,\nthat will create open-api documentation in `web_deploy` folder.\n\nTo generate resources for Go models run `./generate.sh` script in root folder.\nuse `./generate.sh --help` to see all available options.\n\nNote: if you are using Gitlab for building project `docs/spec/paths` folder must not be\nempty, otherwise only `Build and Publish` job will be passed.  \n\n## Running from docker \n  \nMake sure that docker installed.\n\nuse `docker run ` with `-p 8080:80` to expose port 80 to 8080\n\n  ```\n  docker build -t github.com/rarimo/passport-identity-provider .\n  docker run -e KV_VIPER_FILE=/config.yaml github.com/rarimo/passport-identity-provider\n  ```\n\n## Running from Source\n\n* Set up environment value with config file path `KV_VIPER_FILE=./config.yaml`\n* Provide valid config file\n* Launch the service with `migrate up` command to create database schema\n* Launch the service with `run service` command\n\n\n### Database\nFor services, we do use ***PostgresSQL*** database. \nYou can [install it locally](https://www.postgresql.org/download/) or use [docker image](https://hub.docker.com/_/postgres/).\n\n\n### Third-party services\n\n\n## Contact\n\nResponsible\nThe primary contact for this project is  [//]: # (TODO: place link to your telegram and email)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frarimo%2Fpassport-identity-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frarimo%2Fpassport-identity-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frarimo%2Fpassport-identity-provider/lists"}