Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 10 hours 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 (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T20:53:25.000Z (9 days ago)
- Last Synced: 2024-10-28T21:39:07.556Z (9 days ago)
- Topics: hacktoberfest
- Language: Scala
- Homepage:
- Size: 101 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
![Dwolla/scala-secure-config CI](https://github.com/Dwolla/scala-secure-config/actions/workflows/ci.yml/badge.svg)
[![license](https://img.shields.io/github/license/Dwolla/scala-secure-config.svg?style=flat-square)](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.)