From e3131034dd00c61ed5ca4f6a38f74250f0ac5726 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 15 Jun 2012 10:55:58 -0400 Subject: added support for encrypting different elements in a single Properties file with different passphrases --- doc/server/plugins/connectors/properties.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/server/plugins/connectors/properties.txt b/doc/server/plugins/connectors/properties.txt index 19814a54f..ca0e9cf63 100644 --- a/doc/server/plugins/connectors/properties.txt +++ b/doc/server/plugins/connectors/properties.txt @@ -128,12 +128,12 @@ then you need to use the ``--properties`` flag to ``bcfg2-crypt``:: The first time you run ``bcfg2-crypt`` on a Properties file, it will encrypt all character data of all elements. Additionally, it will add -``encrypted="true"`` to each element that has encrypted character -data. It also adds ``encryption=""`` to the top-level +``encrypted=""`` to each element that has encrypted character +data. It also adds ``encryption="true"`` to the top-level ```` tag as a flag to the server that it should try to decrypt the data in that file. (If you are using Properties schemas, you will need to make sure to add support for these attributes.) On -subsequent runs, only those elements flagged with ``encrypted="true"`` +subsequent runs, only those elements flagged with ``encrypted="*"`` are encrypted or decrypted. To decrypt a Properties file, simply re-run ``bcfg2-crypt``:: @@ -141,19 +141,19 @@ To decrypt a Properties file, simply re-run ``bcfg2-crypt``:: bcfg2-crypt foo.xml This decrypts the encrypted elements, but it does *not* remove the -``encrypted="true"`` attribute; this way, you can decrypt a Properties +``encrypted`` attribute; this way, you can decrypt a Properties file, modify the contents, and then simply re-run ``bcfg2-crypt`` to encrypt it again. If you added elements that you also want to be -encrypted, you can either add the ``encrypted="true"`` attribute to +encrypted, you can either add the ``encrypted`` attribute to them manually, or run:: bcfg2-crypt --xpath '*' foo.xml You can also use the ``--xpath`` option to specify more restrictive -XPath expressions to only encrypt a subset of elements. - -All encrypted elements in a single Properties file must be encrypted -with the same passphrase. +XPath expressions to only encrypt a subset of elements, or to encrypt +different elements with different passphrases. Alternatively, you can +manally set the ``encrypted`` attribute on various elements and +``bcfg2-crypt`` will automatically do the right thing. Accessing Properties contents from TGenshi ========================================== -- cgit v1.2.3-1-g7c22