Name | jwe-encryptify JSON |
Version |
0.0.1
JSON |
| download |
home_page | None |
Summary | A Python package to facilitate JSON Web Encryption (JWE) with enhanced security, leveraging AWS Key Management Service (KMS) and Secrets Manager for secure input and output handling. |
upload_time | 2024-11-13 11:19:57 |
maintainer | None |
docs_url | None |
author | M Santhosh Kumar |
requires_python | >=3.11 |
license | None |
keywords |
jwe
kms
secret manager
encryption
aws
cryptography
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# jwe-encryptify
`jwe-encryptify` is a Python package designed for secure encryption and decryption using
JSON Web Encryption (JWE), enhanced by AWS Key Management Service (KMS) and AWS Secrets Manager
integration. This package offers a straightforward solution for handling sensitive data, allowing
encrypted data exchange while securely managing encryption keys through AWS
## Features
* **Robust Data Encryption**: Uses JSON Web Encryption (JWE) to ensure data security and integrity.
* **AWS KMS Integration**: Leverages AWS KMS for secure key encryption and decryption.
* **AWS Secrets Manager**: Efficiently manages public and private key pairs for encryption processes.
* **User-Friendly API**: Simplified methods for secure JSON payload encryption and decryption.
## Installation
You can install the package via `pip` from PyPI:
```bash
pip install jwe-encryptify
```
## Usage
* **AWS Configuration**: Ensure that your AWS credentials and region are set up. The package requires AWS permissions to access KMS and Secrets Manager.
* **Environment Variable**: Set `AWS_DEFAULT_REGION` as an environment variable or configure it in your AWS settings.
## Encrypting Data
Use the `encrypt` method to secure JSON data with a public key stored in AWS Secrets Manager.
```python
from jwe_encryptify import encrypt
# Sample data to encrypt
data_to_encrypt = {"user": "John Doe", "account_id": "123456"}
# Encrypt the data
encrypted_jwe = encrypt(
kms_id="your-kms-key-id",
secret_name="your-secret-name",
secret_key="public-key",
api_response=data_to_encrypt
)
print("Encrypted JWE token:", encrypted_jwe)
```
## Decrypting Data
Use the `decrypt` method to decrypt an encrypted JWE token using a private key from AWS Secrets Manager.
```python
from jwe_encryptify import decrypt
# JWE token to decrypt
jwe_token = "your-encrypted-jwe-token"
# Decrypt the data
decrypted_data = decrypt(
kms_id="your-kms-key-id",
secret_name="your-secret-name",
secret_key="private-key",
jwe_payload=jwe_token
)
print("Decrypted Data:", decrypted_data)
```
## AWS Permissions
To use jwe-encryptify, your AWS IAM role or user should have permissions to:
* Access the specified KMS key (`kms_id`) for encryption and decryption.
* Retrieve secrets from AWS Secrets Manager for the specified secret names.
## Dependencies
The package requires:
* `jwcrypto`: For JWE encoding and decoding.
* `boto3`: AWS SDK for Python, used to interact with KMS and Secrets Manager.
* `botocore`: Core functionality required by `boto3`.
## License
This project is licensed under the MIT License.
## Contributing
We welcome contributions! Feel free to submit issues or pull requests to help improve the package.
## Authors
M Santhosh Kumar
Initial work
santhoshse7en@gmail.com
Raw data
{
"_id": null,
"home_page": null,
"name": "jwe-encryptify",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "JWE, KMS, Secret Manager, Encryption, AWS, Cryptography",
"author": "M Santhosh Kumar",
"author_email": "santhoshse7en@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e2/79/c68983d3dbaff9ec08dc46b1ec3b18581f61578eb8a5e58c031ea8671af2/jwe_encryptify-0.0.1.tar.gz",
"platform": null,
"description": "# jwe-encryptify\n\n`jwe-encryptify` is a Python package designed for secure encryption and decryption using \nJSON Web Encryption (JWE), enhanced by AWS Key Management Service (KMS) and AWS Secrets Manager \nintegration. This package offers a straightforward solution for handling sensitive data, allowing \nencrypted data exchange while securely managing encryption keys through AWS\n\n## Features\n\n* **Robust Data Encryption**: Uses JSON Web Encryption (JWE) to ensure data security and integrity.\n* **AWS KMS Integration**: Leverages AWS KMS for secure key encryption and decryption.\n* **AWS Secrets Manager**: Efficiently manages public and private key pairs for encryption processes.\n* **User-Friendly API**: Simplified methods for secure JSON payload encryption and decryption.\n\n## Installation\n\nYou can install the package via `pip` from PyPI:\n\n```bash\npip install jwe-encryptify\n```\n\n## Usage\n\n* **AWS Configuration**: Ensure that your AWS credentials and region are set up. The package requires AWS permissions to access KMS and Secrets Manager.\n* **Environment Variable**: Set `AWS_DEFAULT_REGION` as an environment variable or configure it in your AWS settings.\n\n## Encrypting Data\n\nUse the `encrypt` method to secure JSON data with a public key stored in AWS Secrets Manager.\n\n```python\nfrom jwe_encryptify import encrypt\n\n# Sample data to encrypt\ndata_to_encrypt = {\"user\": \"John Doe\", \"account_id\": \"123456\"}\n\n# Encrypt the data\nencrypted_jwe = encrypt(\n kms_id=\"your-kms-key-id\",\n secret_name=\"your-secret-name\",\n secret_key=\"public-key\",\n api_response=data_to_encrypt\n)\n\nprint(\"Encrypted JWE token:\", encrypted_jwe)\n```\n\n## Decrypting Data\n\nUse the `decrypt` method to decrypt an encrypted JWE token using a private key from AWS Secrets Manager.\n\n```python\nfrom jwe_encryptify import decrypt\n\n# JWE token to decrypt\njwe_token = \"your-encrypted-jwe-token\"\n\n# Decrypt the data\ndecrypted_data = decrypt(\n kms_id=\"your-kms-key-id\",\n secret_name=\"your-secret-name\",\n secret_key=\"private-key\",\n jwe_payload=jwe_token\n)\n\nprint(\"Decrypted Data:\", decrypted_data)\n```\n\n## AWS Permissions\n\nTo use jwe-encryptify, your AWS IAM role or user should have permissions to:\n\n* Access the specified KMS key (`kms_id`) for encryption and decryption.\n* Retrieve secrets from AWS Secrets Manager for the specified secret names.\n\n## Dependencies\n\nThe package requires:\n\n* `jwcrypto`: For JWE encoding and decoding.\n* `boto3`: AWS SDK for Python, used to interact with KMS and Secrets Manager.\n* `botocore`: Core functionality required by `boto3`.\n\n## License\n\nThis project is licensed under the MIT License.\n\n\n## Contributing\n\nWe welcome contributions! Feel free to submit issues or pull requests to help improve the package.\n\n## Authors\nM Santhosh Kumar\nInitial work\nsanthoshse7en@gmail.com\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python package to facilitate JSON Web Encryption (JWE) with enhanced security, leveraging AWS Key Management Service (KMS) and Secrets Manager for secure input and output handling.",
"version": "0.0.1",
"project_urls": {
"Documentation": "https://github.com/santhoshse7en/jwe-encryptify#readme",
"Source": "https://github.com/santhoshse7en/jwe-encryptify",
"Tracker": "https://github.com/santhoshse7en/jwe-encryptify/issues"
},
"split_keywords": [
"jwe",
" kms",
" secret manager",
" encryption",
" aws",
" cryptography"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aef99d658a0702550feebce083cadc70389d0b095e997c6bc7d0d7a29611d7bc",
"md5": "cffe76351a326b79da70e568b6241164",
"sha256": "a29c8743212ac15e08902d1259899123503e69909fa6bb59117647c423e63665"
},
"downloads": -1,
"filename": "jwe_encryptify-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cffe76351a326b79da70e568b6241164",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 3969,
"upload_time": "2024-11-13T11:19:55",
"upload_time_iso_8601": "2024-11-13T11:19:55.999737Z",
"url": "https://files.pythonhosted.org/packages/ae/f9/9d658a0702550feebce083cadc70389d0b095e997c6bc7d0d7a29611d7bc/jwe_encryptify-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e279c68983d3dbaff9ec08dc46b1ec3b18581f61578eb8a5e58c031ea8671af2",
"md5": "f548566f7e16603c2ce48394dae6c578",
"sha256": "8f8e97c62bbd81f14020b63481a585f07e83a6ca3f4c3ba6bef1eae3a09eb37d"
},
"downloads": -1,
"filename": "jwe_encryptify-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "f548566f7e16603c2ce48394dae6c578",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 4260,
"upload_time": "2024-11-13T11:19:57",
"upload_time_iso_8601": "2024-11-13T11:19:57.313085Z",
"url": "https://files.pythonhosted.org/packages/e2/79/c68983d3dbaff9ec08dc46b1ec3b18581f61578eb8a5e58c031ea8671af2/jwe_encryptify-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-13 11:19:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "santhoshse7en",
"github_project": "jwe-encryptify#readme",
"github_not_found": true,
"lcname": "jwe-encryptify"
}