Get a Quote

Your source for insights and trends in software development

Configuring Mod Security (Web Application Firewall)

ModSecurity is an Apache web server module that provides a web application firewall engine. This article is a short guide for configuring mod_security vs apache2 which reverses proxy to application that uses https protocol. So the steps are: Install and configure mod_secure: install: sudo apt-get -y install libapache-mod-security configure:make a file “/etc/apache2/conf.d/modsecurity2.conf”. In this one can enable filters which make possible to prevent exploitation of known, or new unpublished vulnerabilities. <ifmodule mod_security2.c>Include conf.d/modsecurity/*.conf</ifmodule> add rules (example): sudo mkdir /etc/apache2/conf.d/modsecuritysudo cp…

Google App Engine application in URL Frame

We’re working on project, which has several user roles and one of the requirements is that it should be available for different users via different domain names. Apache and other HTTP servers provides simple solution for this issue, but we are using Google App Engine. It does not provide mechanisms for handling domain names, e.g. configuration virtual hosts. Thus we have used “URL Frame” option for DNS host records. It works fine, but some weeks ago we have found one…

Puppet framework: manage your servers

I’ve written one post about problems in puppet that I faced. Now I found a bit time to describe what is it. Generally, Puppet framework is a tool to administer your servers. There are three majour purposes I see it can be used for the moment: * If you have plenty of servers and you want to have identical (or repeatable) configuration on them * If you want to be sure your important files has particular owner and permissions *…

Status of working application

Requirements Show the status (various images) of working application in the browser.  Solution We will use for it the technology javaFX. So we need to create: ImageView, Image[] with all images; Timeline that will check a status every second; Scene that will change an image if the status is changed. But where will our program get this status? What happens when user clicks on image’s area? The (e.g.) Winstone server starts working and invokes application. And this application contains status…

Run Winston on JRE

Requirements Start the web-server ‘Winstone’ that will run any web-applications on user’s machine.   Problem During startup the server checks java-home directory, particularly file ‘tools.jar’. It seems where a problem is? But unfortunately (or luckily) not all users have installed JDK on their computers. And JRE doesn’t have this file.  Solution What should we do in this situation? It is simple. Download the source code from the web site and open it in any IDE (i prefer IDEA), than find…

Difference between ‘instanceof’ and Class.isAssignableFrom(…)

Sometimes it is necessary to determine the ownership of a specific instance of a class to a hierarchy of inheritance, as well as belonging to implement a specific interface. In Java, there are several approaches to solving this problem, from which we draw attention to the distinction between using the instanceof operator and Class.isAssignableFrom (Class <?> Cls) method. One of the main differences is that the use of instanceof operator can detect errors at compile time. Sample code that allows…

Postgres ENUM, Java ENUM and JPA

We have a postgres DB with postgres enums on one side and Java enums on the other. The question is – how to combine them together over JPA? The problem is in JDBC driver which returns Postgres enums as an instance of type PGObject. The type property of this has the name of postgres enum, and the value property its value (the ordinal is not stored however, so technically it’s not an enum anymore and possibly completely useless because of…

Installing glassfish with puppet

There are two major problems with installing glassfish through puppet in default configuration of puppetmaster: * The jar file of glassfish is too big * You have to accept sun lisense during the installation The cause of first problem is that by default puppetmasterd uses WEBRICK as it web-server. It would be probably not a problem if it was not using at the same time xmlrpc calls. The consequence of such configuration is that big files timeouts to be transfered….

Java Web Start on Google App Engine

Java Web Start is cool technology, which allows to automatically update client application to the latest version. So the latest client application is placed on server side. Unfortunately this technology does not work by default on Google App Engine. This post contains information about how to run it in the Google clouds. How Web Start checks updates? “How Web Start checks updates?” is the first question, which is occurred. The answer is simple (but I did not find it in…

About some testing tools

About some testing tools

Reasons for using testing tools during development: After each iteration of implementation you should always check that you have not spoiled/lost some old features. Running some set of test cases takes a lot time, so developers need to write unit and acceptance tests. But you can also use some well-known decisions for fast testing. Sometimes you need to reproduce bug which can occur only on peak load. It is the way to find some performance problem. So, some testing tools:…

Ready To Take The Next Step?

quote Get a Quote

Sumbit your project request by special form.
We'll get to you promtly with our costing of your project.