{"id":22104521,"url":"https://github.com/virtru/cse-smime-script","last_synced_at":"2025-03-24T02:41:56.485Z","repository":{"id":197020912,"uuid":"633491643","full_name":"virtru/cse-smime-script","owner":"virtru","description":"CSE S/MIME Script","archived":false,"fork":false,"pushed_at":"2024-11-19T19:26:34.000Z","size":9,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-29T08:43:34.599Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/virtru.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":"2023-04-27T16:03:00.000Z","updated_at":"2023-09-28T14:09:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4e5c83e-5439-4148-94a2-0525899884ce","html_url":"https://github.com/virtru/cse-smime-script","commit_stats":null,"previous_names":["virtru/cse-smime-script"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtru%2Fcse-smime-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtru%2Fcse-smime-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtru%2Fcse-smime-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtru%2Fcse-smime-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/virtru","download_url":"https://codeload.github.com/virtru/cse-smime-script/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245200668,"owners_count":20576673,"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-12-01T06:32:44.374Z","updated_at":"2025-03-24T02:41:56.465Z","avatar_url":"https://github.com/virtru.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Python Setup\n\n# Create a virtual environment and install required modules into it\n\n1. ```python3 -m venv cli_env```\n2. ```source cli_env/bin/activate``` \n3. ```pip install -r requirements.txt``` \n\n# Invoke the tool\n```python cse_cmd.py -h```\n\n# Sample steps to upload keys/certs for CSE\n\n1. Create a directory for storing all wrapped private keys. \u003cbr /\u003e\n  Ex: ```$root/wrapped_keys``` \u003cbr /\u003e\n  * The wrapped private key file for each user should have basename as email-id\n    and a '.wrap' extension. \u003cbr /\u003e\n      Ex: ```$root/wrapped_keys/user1@example.com.wrap```\n  * The wrapped private key file should have a json object with\n    two required fields: \u003cbr /\u003e \n    ```\n    { \n      'kacls_url': 'url of kacls configured in CSE Admin Console', \n      'wrapped_private_key': 'wrapped private key bytes' \n    } \n    ```\n\n2. Create a directory for storing all certificates in p7 pem format. \u003cbr /\u003e\n  Ex: ```$root/p7pem_certs``` \u003cbr /\u003e\n  * The certificate file should contain the full chain to root CA and should\n    have basename as email-id and a '.p7pem' extension.\n    Ex: ```$root/p7pem_certs/user1@example.com.p7pem```\n  * If you have p7b file, you can use the following openssl command to convert\n    it to a p7 pem format: \u003cbr /\u003e\n      ``` openssl pkcs7 -inform DER -in {old_name.p7b} -outform PEM -out {new_name.p7pem} ```\n\n3. Note that all commands require the following argument \u003cbr /\u003e\n  ```--creds```: a json file contains credentials to the service account created in\n        you GCP project. After creating a service account, you can download\n        the credentials to that account to a json file, which you will use here. \u003cbr /\u003e\n  Ex: stored at ```$root/svc_acct_creds.json``` \u003cbr /\u003e\n\n4. Easiest is to run the 'insert' command to insert key pairs and identities. Ex: \u003cbr /\u003e\n  ``` \n        python cse_cmd.py insert\n        --creds $root/svc_acct_creds.json \n        --inkeydir $root/wrapped_keys \n        --incertdir $root/p7pem_certs \n  ```\n\n  * alternatively, you could run ```insert_keypair```, note down the keypair id\n    and then run ```insert_identity``` using that keypair id. You can also get the\n    keypair id by running ```list_keypair``` command.\n\n5. You can check if user has a valid cse keypair or identity by running \u003cbr /\u003e\n  ```list_keypair``` and/or ```list_identity```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtru%2Fcse-smime-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvirtru%2Fcse-smime-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtru%2Fcse-smime-script/lists"}