{"id":22783507,"url":"https://github.com/tap30/hiss-spring-boot-mongo-starter","last_synced_at":"2025-03-30T15:16:10.577Z","repository":{"id":243677684,"uuid":"813113574","full_name":"Tap30/hiss-spring-boot-mongo-starter","owner":"Tap30","description":"Integrates Hiss library with Spring data mongo","archived":false,"fork":false,"pushed_at":"2025-01-03T22:14:53.000Z","size":75,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-05T16:46:32.993Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tap30.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-10T14:00:53.000Z","updated_at":"2025-01-03T22:14:57.000Z","dependencies_parsed_at":"2024-06-10T16:10:23.364Z","dependency_job_id":"ce4f688d-bb38-4cc3-a2aa-83f0a134deb1","html_url":"https://github.com/Tap30/hiss-spring-boot-mongo-starter","commit_stats":null,"previous_names":["tap30/hiss-spring-boot-mongo-starter"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tap30%2Fhiss-spring-boot-mongo-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tap30%2Fhiss-spring-boot-mongo-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tap30%2Fhiss-spring-boot-mongo-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tap30%2Fhiss-spring-boot-mongo-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tap30","download_url":"https://codeload.github.com/Tap30/hiss-spring-boot-mongo-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246334427,"owners_count":20760644,"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-11T22:08:19.695Z","updated_at":"2025-03-30T15:16:10.550Z","avatar_url":"https://github.com/Tap30.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hiss Spring Boot Mongo Starter [![build status](https://github.com/Tap30/hiss-spring-boot-mongo-starter/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/Tap30/hiss-spring-boot-mongo-starter/actions/workflows/build.yml)\n\nAn small library which uses Spring Boot autoconfiguration capability that integrates Hiss with Spring Boot and Spring Data Mongo.\n\nBy integrating Hiss with Spring Boot project we mean registration of:\n- Hiss bean [using environment variables](https://github.com/Tap30/hiss?tab=readme-ov-file#creating-properties-from-environment-variables)\n- Mongo interceptor which automatically encrypts objects before saving to DB and decrypts them after loading.\n\nAn example project is created [here](https://github.com/mkay1375/spring-with-hiss-example).\n\n## Quick Start\n\n### 1. Add Hiss dependency\n\nApache Maven:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.tap30\u003c/groupId\u003e\n    \u003cartifactId\u003ehiss-spring-boot-mongo-starter\u003c/artifactId\u003e\n    \u003cversion\u003e0.10.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nGradle (Groovy):\n```groovy\nimplementation 'io.github.tap30:hiss-spring-boot-mongo-starter:0.10.0'\n```\n\nGradle (Kotlin):\n```kotlin\nimplementation(\"io.github.tap30:hiss-spring-boot-mongo-starter:0.10.0\")\n```\n\n### 2. Set environment variables\n\n```bash\nHISS_KEYS_A=AAAAAAAAAAAAAAAAAAAAAA==\nHISS_KEYS_B=AAAAAAAAAAAAAAAAAAAAAA==\n# other keys...\nHISS_DEFAULT_ENCRYPTION_KEY_ID=a\nHISS_DEFAULT_ENCRYPTION_ALGORITHM=aes-128-gcm\nHISS_DEFAULT_HASHING_KEY_ID=b\nHISS_DEFAULT_HASHING_ALGORITHM=hmac-sha256\n```\n\nFor more information about envs see\n[this](https://github.com/Tap30/hiss?tab=readme-ov-file#creating-properties-from-environment-variables).\n\n### 3. Annotate your class with `@Encrypted`\n\n```java\nimport io.github.tap30.Encrypted;\n\npublic class User {\n    @Encrypted\n    private String phoneNumber;\n    private String hashedPhoneNumber;\n\n    // getters and setters\n}\n```\n\nNote: Getters and setters must exist as Hiss use them to get/set values.\n\n## Using custom `HissPropertiesProvider`\n\nBy implementing `HissPropertiesProvider` and annotating it with `@Component`\nthis library will pick your implementation rather than default one.\n\n## Using custom encryption and hashing algorithms\n\nJust like custom `HissPropertiesProvider` by implementing `Encryptor` and `Hasher` interfaces\nand annotating them with `@Component`, this library will pick them up.\n\nFor more information about `Encryptor`s and `Hasher`s see [Hiss readme](https://github.com/Tap30/hiss?tab=readme-ov-file#supported-algorithms).\n\n## Querying Data\n\nCurrently there is not an easy way to support querying encrypted fields.\n\nTo query data, inject Hiss bean (`@Autowired Hiss hiss`)\nand use `Hiss$hash(String)` method to generate hash of content;\nthen pass it to the queries which use hashed fields.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftap30%2Fhiss-spring-boot-mongo-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftap30%2Fhiss-spring-boot-mongo-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftap30%2Fhiss-spring-boot-mongo-starter/lists"}