https://github.com/dwolla/scala-secure-config
Tagged type and PureConfig ConfigReader for automatically decrypting encrypted config values in TypeSafe Config files.
https://github.com/dwolla/scala-secure-config
hacktoberfest
Last synced: 3 months ago
JSON representation
Tagged type and PureConfig ConfigReader for automatically decrypting encrypted config values in TypeSafe Config files.
- Host: GitHub
- URL: https://github.com/dwolla/scala-secure-config
- Owner: Dwolla
- License: mit
- Created: 2018-05-18T21:59:59.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2025-01-29T01:26:36.000Z (6 months ago)
- Last Synced: 2025-02-15T23:44:01.288Z (5 months ago)
- Topics: hacktoberfest
- Language: Scala
- Homepage:
- Size: 118 KB
- Stars: 0
- Watchers: 15
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Secure Config

[](https://github.com/Dwolla/scala-secure-config/blob/master/LICENSE)[PureConfig](https://pureconfig.github.io) [ConfigReader](https://github.com/pureconfig/pureconfig/blob/master/core/src/main/scala/pureconfig/ConfigReader.scala) for automatically decrypting encrypted config values using AWS KMS.
## Artifacts
#### Library
```scala
"com.dwolla" %% "secure-config" % "0.1-SNAPSHOT"
```## Examples
```scala
case class JenkinsConfig[F[_]](baseUri: Uri, username: String, password: F[SecurableString])val config: Stream[IO, JenkinsConfig[Id]] =
Stream.eval(loadConfigF[IO, JenkinsConfig[IO]]).through( _.evalMap { b ⇒
val cryptoTexts = b.password :: HNil
cryptoTexts.sequence.map {
case password :: HNil ⇒
JenkinsConfig[Id](b.baseUri, b.username, password)
}
})
```(The hope is that the pipe can eventually be made generic so that knowledge of the specific encrypted fields doesn't need to be maintained in the pipe.)