The WANdisco CVS Replicator has a pluggable authorization model. By default a No-op auth plugin is enabled which allows unrestricted access. A CVS administrator can customize the bundled lib/authperlscript and setup a PerlAuthPlugin. Peek inside the authperlscript for more details on how to use it for access control. In addition to cvs user name, the IP address of the CVS client machine is also available as a parameter to access control rules. This can be used to ensure commits happen only from valid subnets or IP addresses, further tightening security constraints. The commitinfo triggers that run from backend CVS repository does not have the client IP address available due to limitations of CVS server itself, but using the WANdisco CVS Replicator access control trigger, the administrator can setup rules based on client IP address.
In order to use the lib/authperlscript please add the following line to the CVSProxy section of the cvs-replicator/config/prefs.xml file:
<CVSProxy> .... <AccessControlPlugin>org.nirala.admin.cvsproxy.security.PerlAuthPlugin</AccessControlPlugin> .... </CVSProxy>
Follow these steps to invoke your own custom pre-replication trigger:
public interface AuthorizationPlugin {
/**
* Returns true if user is authorized to execute the CVS command in question
* else returns false.
* @param user CVS user trying to perform the write command
* @param ip IP address of the CVS client
* @param cmd CVS command user is trying to execute
* @param dirs List of CVS directories on which command will operate
* @param cvsroot The CVSROOT directory
* @return
*/
boolean allow(String user, String ip, String cmd, Set dirs, String cvsroot);
}
<CVSProxy> .... <AccessControlPlugin>my.custom.AuthPlugin</AccessControlPlugin> .... </CVSProxy>
| Copyright © 2005 WANdisco | Sitemap | Privacy Policy | User Agreement | Contact Us |