{"id":16304937,"url":"https://github.com/moznion/secelf","last_synced_at":"2025-04-10T23:55:00.414Z","repository":{"id":145078090,"uuid":"156089334","full_name":"moznion/secelf","owner":"moznion","description":" A secret shelf that uses Google Drive as backend storage.","archived":false,"fork":false,"pushed_at":"2018-11-22T02:30:57.000Z","size":243,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T23:54:54.967Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/moznion.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}},"created_at":"2018-11-04T14:14:56.000Z","updated_at":"2018-11-22T02:30:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"eecfa6ee-bd12-4b8f-bcb4-2fd764b382c7","html_url":"https://github.com/moznion/secelf","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/moznion%2Fsecelf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fsecelf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fsecelf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fsecelf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moznion","download_url":"https://codeload.github.com/moznion/secelf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317701,"owners_count":21083528,"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-10-10T21:05:14.479Z","updated_at":"2025-04-10T23:55:00.398Z","avatar_url":"https://github.com/moznion.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"secelf\n==\n\nA secret shelf that uses Google Drive as backend storage.\n\nOverview\n--\n\n```\n+--------+                +----------+                        +----------------+\n|        |  upload file   |          |  encrypt file by AES   |                |\n|        | -------------\u003e |          | ---------------------\u003e |                |\n|  User  |                |  secelf  |                        |  Google Drive  |\n|        | \u003c------------- |          | \u003c--------------------- |                |\n|        |   serve file   |          |      decrypt file      |                |\n+--------+                +----------+                        +----------------+\n```\n\nHow to setup\n--\n\n1. setup SQLite3 database\n    - `sqlite3 YOUR_DB.sqlite3 \u003c ./sql/000-file.sql`\n2. get a credential and a token from Google Drive\n3. run secelf!\n\nHow to run\n--\n\n```\nUsage of secelf\n  -basic-auth-pswd string\n        user password for BASIC authentication\n  -basic-auth-user string\n        user name for BASIC authentication\n  -credential-json string\n        [mandatory] credential of Google Drive as JSON string\n  -key string\n        [mandatory] AES key for file encryption (must be 128bit, 192bit or 256bit)\n  -port int\n        [mandatory] port for listen (default -1)\n  -root-dir-id string\n        [mandatory] identifier fo root directory for storing files\n  -sqlite-db-path string\n        [mandatory] path to SQLite DB file\n  -token-json string\n        [mandatory] token for accessing to Google Drive as JSON string\n```\n\nExample:\n\n```\nsecelf \\\n  --token-json=\"$(cat token.json)\" \\\n  --credential-json=\"$(cat credentials.json)\" \\\n  --key='this-aes-key-has-32-charactersss' \\\n  --root-dir-id='your-google-drive-dir-ID' \\\n  --sqlite-db-path='/path/to/YOUR_DB.sqlite3' \\\n  --port=8888\n```\n\n👍 then you can access the application as `127.0.0.1:8888`.\n\n![image](https://user-images.githubusercontent.com/1422834/48304468-478de180-e55d-11e8-8ee9-6d1e7aa0c570.png)\n\nExample of `token.json`:\n\n```json\n{\"access_token\":\"your-token\",\"token_type\":\"Bearer\",\"refresh_token\":\"your-refresh-token\",\"expiry\":\"2018-11-02T22:25:25.321592+09:00\"}\n```\n\nExample of `credentials.json`:\n\n```json\n{\"installed\":{\"client_id\":\"your-client-id\",\"project_id\":\"your-project-id\",\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"token_uri\":\"https://www.googleapis.com/oauth2/v3/token\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\",\"client_secret\":\"your-client-secret\",\"redirect_uris\":[\"urn:ietf:wg:oauth:2.0:oob\"]}}\n```\n\n### How to enable BASIC authentication\n\nPlease pass `--basic-auth-user` and `--basic-auth-pswd` parameter via command line option; then the application enables BASIC authentication.\n\nLicense\n--\n\n```\nCopyright 2018 moznion, http://moznion.net/ \u003cmoznion@gmail.com\u003e\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoznion%2Fsecelf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoznion%2Fsecelf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoznion%2Fsecelf/lists"}