mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

david_page
05.58.2007 1b0a51f76a8d3d1f6df978e50ca8f869dbac48dc
refs
author david_page <david_page@localhost>
Wednesday, September 5, 2007 19:58 +0200
committer david_page <david_page@localhost>
Wednesday, September 5, 2007 19:58 +0200
commit1b0a51f76a8d3d1f6df978e50ca8f869dbac48dc
tree 984fd5046ca93710f4ca0d027fb9b8dcef187055 tree | zip | gz
parent e033bdae11ffbe9d2975e36fa08276093c1d3599 view | diff
Update CryptoManager secret key encryption public API:

1. Encapsulate Cipher object in CryptoManager instance.
2. Cipher key identifier (tag) and initialization vector prefix the cipher text.
3. New API consists of encrypt and getOutputCipherStream (with optional cipher transformation parameter), and decrypt and getInputCipherStream.

Limitations:
This is an update of the API only. The keys are stored in a Map object in the CryptoManager instance, so
1. The implementation works for a single instance only (e.g., no encrypted passwords in a replication domain).
2. The key map does not persists across instance restarts.
Both persistent key storage in a stand-alone instance and the secret key distribution protocol (via ADS) for replicated topologies needs to be implemented.

Other shortcomings:
1. The exception messages need to be added to the message catalogue.
2. The implementation could benefit from a review.
3. Only simple success test cases are implemented in the unit tests.
4. The uses of getInputCipherStream and getOutputCipherStream should be reviewed, since the cipher transformation used - as of now it is always the preferred (default) cipher transformation - is still stored in the backup info file, where it might be informative, but is redundant (the cipher info is encoded as the prologue of the backup data).
5. The preferred cipher, etc., should be configurable.
1 files added
4 files modified
715 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/backends/SchemaBackend.java 19 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/BackupManager.java 21 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/extensions/ConfigFileHandler.java 18 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/types/CryptoManager.java 539 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/types/CryptoManagerTestCase.java 118 ●●●●● diff | view | raw | blame | history