@POST @Path("/key") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @CheckPermission(roles={Role.SECURITY_ADMIN,Role.RESTRICTED_SECURITY_ADMIN},blockProxies=true) public String rotateIPsecKey(){
  ipsecMgr.verifyIPsecOpAllowable();
  String version=ipsecMgr.rotateKey();
  auditMgr.recordAuditLog(null,null,IPSEC_SERVICE_TYPE,OperationTypeEnum.UPDATE_SYSTEM_PROPERTY,System.currentTimeMillis(),AuditLogManager.AUDITLOG_SUCCESS,null,"config_version=" + version);
  return version;
}

@ POST @ Path ( "/key" ) @ Produces ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ Consumes ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ CheckPermission ( roles = { Role . SECURITY_ADMIN , Role . RESTRICTED_SECURITY_ADMIN } , blockProxies = true ) public String rotateIPsecKey ( ) { ipsecMgr . verifyIPsecOpAllowable ( ) ; String version = ipsecMgr . rotateKey ( ) ; auditMgr . recordAuditLog ( null , null , IPSEC_SERVICE_TYPE , OperationTypeEnum . UPDATE_SYSTEM_PROPERTY , System . currentTimeMillis ( ) , AuditLogManager . AUDITLOG_SUCCESS , null , "config_version=" + version ) ; return version ; }
rotate the vipr ipsec pre - shared key .
