{"id":49309598,"url":"https://github.com/ximtech/jasypt-encrypt-plugin","last_synced_at":"2026-04-26T12:00:56.332Z","repository":{"id":132398127,"uuid":"591042466","full_name":"ximtech/jasypt-encrypt-plugin","owner":"ximtech","description":"Application properties encryption/decryption gradle plugin","archived":false,"fork":false,"pushed_at":"2026-04-22T14:32:24.000Z","size":322,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-22T15:13:20.275Z","etag":null,"topics":["decryption","encryption","gradle-plugin","jasypt","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/ximtech.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-19T19:51:04.000Z","updated_at":"2026-04-22T14:31:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"cbe846b3-7e06-4310-b56e-00a3edb943a0","html_url":"https://github.com/ximtech/jasypt-encrypt-plugin","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/ximtech/jasypt-encrypt-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ximtech%2Fjasypt-encrypt-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ximtech%2Fjasypt-encrypt-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ximtech%2Fjasypt-encrypt-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ximtech%2Fjasypt-encrypt-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ximtech","download_url":"https://codeload.github.com/ximtech/jasypt-encrypt-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ximtech%2Fjasypt-encrypt-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32296259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["decryption","encryption","gradle-plugin","jasypt","spring-boot"],"created_at":"2026-04-26T12:00:55.449Z","updated_at":"2026-04-26T12:00:56.320Z","avatar_url":"https://github.com/ximtech.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jasypt gradle plugin\n\n[![build](https://github.com/ximtech/jasypt-encrypt-plugin/actions/workflows/build.yml/badge.svg)](https://github.com/ximtech/jasypt-encrypt-plugin/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/ximtech/jasypt-encrypt-plugin/branch/main/graph/badge.svg?token=sHBgjzjp5Y)](https://codecov.io/gh/ximtech/jasypt-encrypt-plugin)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/92143660494d46789a1d5308bed6d17e)](https://app.codacy.com/gh/ximtech/jasypt-encrypt-plugin/dashboard)\n[![Gradle Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/io.github.ximtech.jasypt-encrypt-plugin)](https://plugins.gradle.org/plugin/io.github.ximtech.jasypt-encrypt-plugin)\n\nBased on [moberwasserlechner/jasypt-gradle-plugin](https://github.com/moberwasserlechner/jasypt-gradle-plugin)\n\nThis plugin uses [Jasypt](http://jasypt.org/) library for encrypting/decrypting application properties. Works great\nwith `Spring Boot`, but also can work independently. With provided `password` as encryption key plugin hides sensitive\ndata from direct reading and decrypt them at runtime. Can be useful for data that don't need to be changed frequently\nand also allow reducing parameters or system environment variables amount passing to the docker container.\n\n## How to use\n\n### Using plugins DSL\n\nCheck latest version at [Gradle repository](https://plugins.gradle.org/plugin/io.github.ximtech.jasypt-encrypt-plugin)\n\n```groovy\nplugins {\n    id \"io.github.ximtech.jasypt-encrypt-plugin\" version \"x.y.z\"\n}\n```\n\n#### Manually add to project\n\n1. Copy `jar` file to classpath. Get prebuild `jar` file from `assets -\u003e jasypt-encrypt-plugin-\u003cversion\u003e.jar`\n2. Add `buildscript` to the top of `build.gradle`\n\n```groovy\nbuildscript {\n    dependencies {\n        classpath files('jasypt-encrypt-plugin-x.y.z.jar')\n    }\n}\n```\n\nAdd plugin:\n\n```groovy\napply plugin: io.github.jasypt.encrypt.JasyptPlugin\n```\n\n### Jasypt configuration\n\n***NOTE:*** This section can be skipped if default configuration is ok for you.\n\nFor custom encryption configuration add `.yaml` or`.properties` file in the project root In Spring Boot application just\nadd `Jasypt` configuration to `application.yaml`\n\nExample:\n\n```yaml\njasypt:\n    encryptor:\n        password: ${JASYPT_ENCRYPTOR_PASSWORD}  # pass as environment variable\n        algorithm: \"PBEWITHHMACSHA512ANDAES_256\"\n        salt-generator-classname: \"org.jasypt.salt.RandomSaltGenerator\"\n        iv-generator-classname: \"org.jasypt.iv.RandomIvGenerator\"\n        provider-name: \"SunJCE\"\n        string-output-type: \"base64\"\n        pool-size: 1\n        key-obtention-iterations: 1000\n```\n\nAnd for `.properties` configuration:\n\n```properties\njasypt.encryptor.password=\"password\"\njasypt.encryptor.algorithm=\"PBEWITHHMACSHA512ANDAES_256\"\njasypt.encryptor.salt-generator-classname=\"org.jasypt.salt.RandomSaltGenerator\"\njasypt.encryptor.iv-generator-classname=\"org.jasypt.iv.RandomIvGenerator\"\njasypt.encryptor.provider-name=\"SunJCE\"\njasypt.encryptor.string-output-type=\"base64\"\njasypt.encryptor.pool-size=1\njasypt.encryptor.key-obtention-iterations=1000\n```\n\nPlugin will catch up configuration from file and setup encryptor/decryptor or use default if no configs found. More info\nabout `Spring Boot` usage with `Jasypt` you can find [here](https://github.com/ulisesbocchio/jasypt-spring-boot)\n\n### Project build configuration\n\nCreate environment variable `JASYPT_ENCRYPTOR_PASSWORD` with encryption password. Then add to project `build.gradle`\n\n```groovy\nencryptProperties {\n    password = System.getenv('JASYPT_ENCRYPTOR_PASSWORD')\n}\n\ndecryptProperties {\n    password = System.getenv('JASYPT_ENCRYPTOR_PASSWORD')\n}\n```\n\n***Optionally:*** setup executable build task for encryption 'open' properties\n\n```groovy\njar {\n    dependsOn(encryptProperties)\n}\n```\n\n### CI/CD pipeline\n\nFor running project in pipeline, add `JASYPT_ENCRYPTOR_PASSWORD` system environment variable in build configuration\n```yaml\nenv:\n  JASYPT_ENCRYPTOR_PASSWORD: ${{ secrets.JASYPT_ENCRYPTOR_PASSWORD }}\n```\n\n## Tasks\n\nAll plugin tasks require `password` parameter or system environment variable\n\n### encryptProperties\n\nSearch for all `.properties/.yaml` files for values wrapped with `ENCRYPT()` and encrypt them.\n\n```text\ngradle encryptProperties --password=encryptorToken\n```\n\nExample:\n\n```properties\nsome.very.secret.property=ENCRYPT(private)\n```\n\nWill be encrypted to:\n\n```properties\nsome.very.secret.property=ENC(Lk5VWETH98C0/E/wOqzioQ==)\n```\n\nProperty files can be filtered by pattern. In the example has been shown how search for non production yaml files and\nencrypt their values.\n\n```text\ngradle encryptProperties --file-filter-pattern='application-((?!prod).*)\\.yaml' --password=encryptorToken\n```\n\n#### Multiline properties\n\n- ***Yaml file example:***\n```yaml\nmultiline.property: |\n    ENCRYPT(\n    some\n    very\n    long\n    text\n    )\n```\n***NOTE:*** For the `yaml` file the indentation level should be the same for all multiline values. Also the pipe character '|' must be present on the first line,\notherwise encryption/decryption won't work correctly.\n\n- ***Properties file:***\n```properties\nmultiline.property=\\\n  ENCRYPT(\\\n  example\\\n  multiline\\\n  )\n```\n\n### decryptProperties\n\nSearch for all `.properties/.yaml` files for values wrapped with `ENC()` and decrypt them.\n\n```text\ngradle decryptProperties --password=encryptorToken\n```\n\nSearch for non production `.properties/.yaml` files and decrypt their values.\n\n```text\ngradle decryptProperties --file-filter-pattern='application-((?!prod).*)\\.yaml' --password=encryptorToken\n```\n\n### encryptText\n\n```text\ngradle encryptText --text=someText --password=encryptorToken\n```\n\n***Output***:\n\n```text\nEncrypted text: SCw2qhh2bvTFJ4TPXgolTqM1kDDZ8FWbSW3yHlvPLDV9yektRCO7Jx8I1ZMuzSzm\n```\n\n### decryptText\n\n```text\ngradle decryptText --text=SCw2qhh2bvTFJ4TPXgolTqM1kDDZ8FWbSW3yHlvPLDV9yektRCO7Jx8I1ZMuzSzm --password=encryptorToken\n```\n\n***Output***:\n\n```text\nDecrypted text: someText\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fximtech%2Fjasypt-encrypt-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fximtech%2Fjasypt-encrypt-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fximtech%2Fjasypt-encrypt-plugin/lists"}