X-Git-Url: https://git.8kb.co.uk/?p=slony-i%2Fuser_replication;a=blobdiff_plain;f=README.md;h=6ab8a0ae9eda9540c30a906c09f99d11a8f3ccd3;hp=db135c5cf5b7150f4669ab66a464a8eb16db5f4e;hb=HEAD;hpb=8dcaa5a94ba2f13f1a513c87f3edb6d463fe9126 diff --git a/README.md b/README.md index db135c5..6ab8a0a 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,46 @@ -user_replication -================ - -A basic table and trigger based user replication example for use -with PostgreSQL and Slony-I. - -About ------ - -This is something I created back in 2008 to easily keep users in sync -across a slony cluster. - -The supplied functions have various limitations, one of which is the "options" -field only being useful for managing role membership, anything more complicated -will most likely fail without further work. - -It has the option to store the standard postgresql md5 encrypted passwords, or -or allow unencrypted password retrieval via a PGP encryption using a symmetric-key -obfuscated during construction with a (rather horrible) c function named "hkey". - -If you want to use the hkey obfuscation functionality see *Using the hkey obfuscation* -below. - -To use execute the sql script on each node: - - # psql -d user_replication.sql - -Now put the 'replicated_users' table into replication using slony and users -can be managed by the create_replicated_user etc functions. - -SELECT create_replicated_user('superted', 'test', 'IN GROUP users'); -SELECT detail_replicated_user('superted'); -SELECT alter_replicated_user('superted', 'test', 'IN GROUP admins'); -SELECT alter_replicated_user('superted', 'test', 'IN GROUP admins'); - -Using the hkey obfuscation --------------------------- - - # cd hkey - # make - # make install - # /usr/local/pgsql/bin/psql -d -U < hkey.sql - -Then alter "v_use_hkey := false" to "v_use_hkey := true" in both the -decrypt_replicated_users and encrypt_replicated_users functions. \ No newline at end of file +user_replication +================ + +A basic table and trigger based user replication example for use +with PostgreSQL and Slony-I. + +About +----- + +This is something I created back in 2008 to easily keep users in sync +across a slony cluster. + +The supplied functions have various limitations, one of which is the "options" +field only being useful for managing role membership, anything more complicated +will most likely fail without further work. + +It has the option to store the standard postgresql md5 encrypted passwords, or +or allow unencrypted password retrieval via a PGP encryption using a symmetric-key +obfuscated during construction with a (rather horrible) c function named "hkey". + +If you want to use the hkey obfuscation functionality see *Using the hkey obfuscation* +below. + +To use execute the sql script on each node: + + # psql -d user_replication.sql + +Now put the 'replicated_users' table into replication using slony and users +can be managed by the create_replicated_user etc functions. + +SELECT create_replicated_user('superted', 'test', 'IN GROUP users'); +SELECT detail_replicated_user('superted'); +SELECT alter_replicated_user('superted', 'test', 'IN GROUP admins'); +SELECT alter_replicated_user('superted', 'test', 'IN GROUP admins'); + +Using the hkey obfuscation +-------------------------- + + # cd hkey + # make + # make install + # /usr/local/pgsql/bin/psql -d -U < hkey.sql + +Then alter "v_use_hkey := false" to "v_use_hkey := true" in both the +decrypt_replicated_users and encrypt_replicated_users functions. +Note the pgcrypto contrib module is required for this.