-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat(#94): add jasypt
- Loading branch information
Showing
12 changed files
with
114 additions
and
238 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
backend/application/admin/src/main/kotlin/io/raemian/admin/config/JasyptConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package io.raemian.admin.config | ||
|
||
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties | ||
import org.jasypt.encryption.pbe.StandardPBEStringEncryptor | ||
import org.springframework.beans.factory.annotation.Value | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
@EnableEncryptableProperties | ||
class JasyptConfig( | ||
@Value("\${JASYPT_ENCRYPTION_PASSWORD}") val password: String, | ||
) { | ||
|
||
@Bean | ||
fun jasyptStringEncryptor(): StandardPBEStringEncryptor { | ||
val encryptor = StandardPBEStringEncryptor() | ||
encryptor.setAlgorithm("PBEWithMD5AndDES") | ||
encryptor.setPassword(password) | ||
return encryptor | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
backend/application/api/src/main/kotlin/io/raemian/api/config/JasyptConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package io.raemian.api.config | ||
|
||
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties | ||
import org.jasypt.encryption.pbe.StandardPBEStringEncryptor | ||
import org.springframework.beans.factory.annotation.Value | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
@EnableEncryptableProperties | ||
class JasyptConfig( | ||
@Value("\${JASYPT_ENCRYPTION_PASSWORD}") val password: String, | ||
) { | ||
|
||
@Bean | ||
fun jasyptStringEncryptor(): StandardPBEStringEncryptor { | ||
val encryptor = StandardPBEStringEncryptor() | ||
encryptor.setAlgorithm("PBEWithMD5AndDES") | ||
encryptor.setPassword(password) | ||
return encryptor | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
199 changes: 0 additions & 199 deletions
199
backend/application/api/src/main/resources/application-security.yml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.