Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Secret class to avoid logging secrets #73

Merged
merged 3 commits into from
Dec 8, 2017
Merged

Add Secret class to avoid logging secrets #73

merged 3 commits into from
Dec 8, 2017

Conversation

vlovgr
Copy link
Owner

@vlovgr vlovgr commented Dec 8, 2017

Introduces Secret[A] which can wrap values to avoid secret configuration values in log output.

scala> import ciris._, ciris.refined._, eu.timepit.refined.types.string._
import ciris._
import ciris.refined._
import eu.timepit.refined.types.string._

scala> env[Secret[NonEmptyString]]("DATABASE_PASSWORD")
res0: ciris.ConfigValue[ciris.Secret[eu.timepit.refined.types.string.NonEmptyString]] = ConfigValue(Right(Secret(***)))

Viktor Lövgren added 2 commits December 8, 2017 11:45
Breaks binary compatibility on Scala 2.10 and 2.11.
Repository owner deleted a comment from codecov bot Dec 8, 2017
Repository owner deleted a comment from codecov bot Dec 8, 2017
@codecov
Copy link

codecov bot commented Dec 8, 2017

Codecov Report

Merging #73 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
+ Coverage   97.74%   97.78%   +0.03%     
==========================================
  Files          31       33       +2     
  Lines         444      452       +8     
  Branches        3        3              
==========================================
+ Hits          434      442       +8     
  Misses         10       10
Impacted Files Coverage Δ
.../main/scala/ciris/readers/CirisConfigReaders.scala 100% <100%> (ø)
...ules/core/shared/src/main/scala/ciris/Secret.scala 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d14a02...15a6c4c. Read the comment docs.

@vlovgr vlovgr merged commit 531b335 into master Dec 8, 2017
@vlovgr vlovgr deleted the secret branch December 8, 2017 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant