{"id":13805780,"url":"https://github.com/meltmedia/dropwizard-crypto","last_synced_at":"2025-04-22T23:24:16.067Z","repository":{"id":23480427,"uuid":"26845372","full_name":"meltmedia/dropwizard-crypto","owner":"meltmedia","description":"A Crytpographic Bundle for Dropwizard","archived":false,"fork":false,"pushed_at":"2017-11-14T17:22:27.000Z","size":51,"stargazers_count":13,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-04-17T14:38:59.820Z","etag":null,"topics":["cryptography","dropwizard","dropwizard-bundle","encryption","java"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jamesmehorter/device-theme-switcher","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meltmedia.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}},"created_at":"2014-11-19T05:05:02.000Z","updated_at":"2023-06-29T17:23:05.000Z","dependencies_parsed_at":"2022-08-22T00:50:55.738Z","dependency_job_id":null,"html_url":"https://github.com/meltmedia/dropwizard-crypto","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meltmedia%2Fdropwizard-crypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meltmedia%2Fdropwizard-crypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meltmedia%2Fdropwizard-crypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meltmedia%2Fdropwizard-crypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meltmedia","download_url":"https://codeload.github.com/meltmedia/dropwizard-crypto/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250338755,"owners_count":21414240,"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":["cryptography","dropwizard","dropwizard-bundle","encryption","java"],"created_at":"2024-08-04T01:01:04.776Z","updated_at":"2025-04-22T23:24:16.043Z","avatar_url":"https://github.com/meltmedia.png","language":"Java","funding_links":[],"categories":["Open Source"],"sub_categories":["Eclipse"],"readme":"# Dropwizard Crypto\n\nA Dropwizard bundle that adds encryption support to an application's ObjectMapper.\n\n[![Build Status](https://travis-ci.org/meltmedia/dropwizard-crypto.svg)](https://travis-ci.org/meltmedia/dropwizard-crypto)\n\n## Usage\n\n### Maven\n\nThis project releases to Maven Central.  To use the bundle, simply include its dependency in your project.\n\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.meltmedia.dropwizard\u003c/groupId\u003e\n  \u003cartifactId\u003edropwizard-crypto\u003c/artifactId\u003e\n  \u003cversion\u003e0.3.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nTo use SNAPSHOTs of this project, you will need to include the sonatype repository in your POM.\n\n```\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003csnapshots\u003e\n        \u003cenabled\u003etrue\u003c/enabled\u003e\n        \u003c/snapshots\u003e\n        \u003cid\u003esonatype-nexus-snapshots\u003c/id\u003e\n        \u003cname\u003eSonatype Nexus Snapshots\u003c/name\u003e\n        \u003curl\u003ehttps://oss.sonatype.org/content/repositories/snapshots\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\n### Java\n\nInclude the bundle in the `initialize` method of your application:\n\n```\nimport com.meltmedia.dropwizard.crypto.CryptoBundle;\n\n...\n\n@Override\npublic void initialize(Bootstrap\u003cMyConfiguration\u003e bootstrap) {\n  bootstrap.addBundle(\n    CryptoBundle\n      .builder().build());\n}\n```\n\nAnd include the `@Encrypted` annotations on your Configuration object's encrypted properties:\n\n```\n@Encrypted\npublic String getSecret() {\n  return secret;\n}\n```\n\n### Environment\n\nWhen running your application, define the passphrase in the environment.\n\n```\nexport DROPWIZARD_PASSPHRASE='correct horse battery staple'\n```\n\n### Configuration\n\nCreate an unencrypted version of your configuration.\n\n```\nsecret: secret\n```\n\nThen pass it through the encryption command.\n\n```\ndropwizard-app encrypt -p /secret unencrypted.yml encrypted.yml\n```\n\nThis will give you an encrypted version of your config.\n\n```\n---\nsecret:\n  salt: \"tKD8wQ==\"\n  iv: \"s9hTJRaZn6fxxpA4nVfDag==\"\n  value: \"UZENJOltf+9EZS03AXbmeg==\"\n  cipher: \"aes-256-cbc\"\n  keyDerivation: \"pbkdf2\"\n  keyLength: 256\n  iterations: 2000\n  encrypted: true\n```\n\n### Running\n\nRun any of your application's configured commands like you normally would, just pass in a version of the configuration with encrypted values.\n\n```\ndropwizard-app server encrypted.yml\n```\n\n## Building\n\nThis project builds with Java8 and Maven 3.  Simply clone the repo and run\n\n```\nmvn clean install\n```\n\nfrom the root directory.\n\n## Contributing\n\nThis project accepts PRs, so feel free to fork the project and send contributions back.\n\n### Formatting\n\nThis project contains formatters to help keep the code base consistent.  The formatter will update Java source files and add headers to other files.  When running the formatter, I suggest the following procedure:\n\n1. Make sure any outstanding stages are staged.  This will prevent the formatter from destroying your code.\n2. Run `mvn format`, this will format the source and add any missing license headers.\n3. If the changes look good and the project still compiles, add the formatting changes to your staged code.\n\nIf things go wrong, you can run `git checkout -- .` to drop the formatting changes. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeltmedia%2Fdropwizard-crypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeltmedia%2Fdropwizard-crypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeltmedia%2Fdropwizard-crypto/lists"}