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

david_page
05.58.2007 e6a7ecfc71d6b0144a6366cd2520e2f03846b033
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
commite6a7ecfc71d6b0144a6366cd2520e2f03846b033
tree ab8972f0c95c4a1b8dade1830bbcd69c865c846e tree | zip | gz
parent 8fb27822a0621950de7c1392fbda0f52e5c6be59 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
opends/src/server/org/opends/server/backends/SchemaBackend.java 19 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/backends/jeb/BackupManager.java 21 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/extensions/ConfigFileHandler.java 18 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/types/CryptoManager.java 539 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/types/CryptoManagerTestCase.java 118 ●●●●● diff | view | raw | blame | history