summaryrefslogtreecommitdiffstats
path: root/notFinishedCode/Report/test.tex~
diff options
context:
space:
mode:
Diffstat (limited to 'notFinishedCode/Report/test.tex~')
-rw-r--r--notFinishedCode/Report/test.tex~90
1 files changed, 84 insertions, 6 deletions
diff --git a/notFinishedCode/Report/test.tex~ b/notFinishedCode/Report/test.tex~
index b128f38..171ab81 100644
--- a/notFinishedCode/Report/test.tex~
+++ b/notFinishedCode/Report/test.tex~
@@ -335,7 +335,7 @@ The truth table class was built to identify the broken and working parts of the
It requires the list with test results to be present to be operable.
\begin{figure}[ht!]
\centering
- \includegraphics[width=120mm]{trueTable.png}
+ \includegraphics[width=60mm]{trueTable.png}
\caption[]{Truth table class}
\end{figure}
Then the class tries to identify the broken parts of our telecommunication network.
@@ -347,6 +347,11 @@ All the test results are stored in a list and can be easily read by calling the
The main purpose of the class is to get device data from the database and to process it.
The processed data get forwarded to the controller class and in the end the class
fetches the results from the test. This class contains the \emph{smart test} functionality.
+\begin{figure}[ht!]
+ \centering
+ \includegraphics[width=60mm]{initTestClass.png}
+ \caption[]{Init test class}
+\end{figure}
It selects automatically the important tests to perform. In the next step it
tries to identify the problem in the network.
More details can be found in the \emph{smart test} description.
@@ -354,6 +359,11 @@ More details can be found in the \emph{smart test} description.
The controller class is used to assign jobs to handlers (in other words, which one is
going to be the caller and callee). Simultaneously, it defines the port addresses for
the communication between the handlers and the main test software (controller).
+\begin{figure}[ht!]
+ \centering
+ \includegraphics[width=60mm]{controllerclass.png}
+ \caption[]{Controller class}
+\end{figure}
If the callee or the caller are nanoBTS control boxes (i.e. BeagleBoards outside
the Rechenzentrum), it will first create an SSH connection to make a tunnel before
the local socket connection is created. Then the controller class sends all the
@@ -631,7 +641,9 @@ refik@ubuntu:/etc/apache2/sites-available$ sudo cp default-ssl default-ssl_origi
refik@ubuntu:/etc/apache2/sites-available$ sudo vim default-ssl
\end{lstlisting}
\par Only the beginning of the file is listed here and we have modified the line starting with \emph{DocumentRoot}
-from \emph{DocumentRoot /var/www} to \emph{DocumentRoot /var/www-ssl} (i.e. we had to redefine the location of our SSL directory).
+and \emph{<Directory /var/www/>} from \emph{DocumentRoot /var/www} to \emph{DocumentRoot /var/www-ssl}
+and from \emph{<Directory /var/www/>} to \emph{<Directory /var/www-ssl/>}
+(i.e. we had to redefine the location of our SSL directory).
\begin{lstlisting}
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
@@ -642,7 +654,14 @@ from \emph{DocumentRoot /var/www} to \emph{DocumentRoot /var/www-ssl} (i.e. we h
Options FollowSymLinks
AllowOverride None
</Directory>
+ <Directory /var/www-ssl/>
+ Options Indexes FollowSymLinks MultiViews
+ AllowOverride None
+ Order allow,deny
+ allow from all
+ </Directory>
\end{lstlisting}
+Also change
\par One should keep in mind that the port 443 should be free for Apache to use it. In the proceeding step we had to ensure that Apache listens on the given port for a \emph{https} connection.
One could test that by going into the \emph{/etc/apache2/ports.conf}.
\begin{lstlisting}
@@ -660,7 +679,6 @@ In our last configuration step we had to edit \emph{default-ssl} file to define
\begin{lstlisting}
refik@ubuntu:/etc/apache2/sites-available$ sudo vim default-ssl
\end{lstlisting}
-\newpage
\par The following part of the file had to be found and modified according to our locations:
\begin{lstlisting}
SSLEngine on
@@ -685,9 +703,66 @@ refik@ubuntu:/etc/apache2/sites-available$
\end{lstlisting}
\subsubsection{Password protecting the web site using .htaccess}
Aside from using a secure communication protocol on the web, \emph{https}, it is important
-to ensure that only privileged users have access to the web site.
-
-
+to ensure that only permissioned users gain access to the web site. We had achieved it using
+the \emph{.htaccess} file. However, to enable the use of Apache \emph{.htaccess} files,
+we will have to reconfigure the Apache configuration files again. \emph{root} access will
+be required. First we have to edit the \emph{/etc/apache2/sites-available/default-ssl} file.
+Find the following lines and modify the \emph{AllowOverride None} to \emph{AllowOverride All}
+like in the given configuration segment:
+\begin{lstlisting}
+ <Directory /var/www-ssl/>
+ Options Indexes FollowSymLinks MultiViews
+ AllowOverride All
+ Order allow,deny
+ allow from all
+ </Directory>
+\end{lstlisting}
+This will tell Apache web server that it is okay to allow \emph{.htaccess} files
+to over-ride previous directives. We must reload the Apache web server before the
+changes can take effect. We can do it by typing:
+\begin{lstlisting}
+sudo /etc/init.d/apache2 reload
+\end{lstlisting}
+The next step is to go to the directory where our test software web page is located
+(e.g. \emph{/var/www-ssl/testsoftware}) and to create a file called \emph{.htaccess}.
+Please insert the following code segment inside the created \emph{.htaccess} file where
+\emph{/var/www-ssl/testsoftware/.htpasswd} is your full path address to \emph{.htpasswd}:
+\begin{lstlisting}
+AuthUserFile /var/www-ssl/testsoftware/.htpasswd
+AuthName "Authorization Required"
+AuthType Basic
+require valid-user
+\end{lstlisting}
+Then in the next step, create another file called \emph{.htpasswd}. After you have created it,
+we will add the usernames that should have access to the web site. We do that by typing the
+following command, where you can replace \emph{konrad} with any other combination of letters
+which will represent your username:
+\begin{lstlisting}
+refik@ubuntu:/var/www-ssl/testsoftware$ sudo htpasswd -c .htpasswd konrad
+\end{lstlisting}
+Afterwards, you will be required to type twice the same password for the username
+you want to create, in this case \emph{konrad}. ``The -c flag is used only when you
+are creating a new file. After the first time, you will omit the -c flag,
+when you are adding new users to an already-existing password file. Otherwise you
+will overwrite the file!'' \cite{htaccess}. You can add as many users as you wish,
+do not forget to remove the -c flag when you do it.
+In the last step, we have to modify the \emph{/etc/apache2/apache2.conf} file and
+to add at the end of it the following code segment where \emph{/vaw/www-ssl/testsoftware}
+is the full path to your web page directory where you put the \emph{.htpasswd} file:
+\begin{lstlisting}
+<Directory /vaw/www-ssl/testsoftware>
+AllowOverride All
+</Directory>
+\end{lstlisting}
+We are done with editing. All we have to do now is to restart the Apache web server. We
+can do that by typing:
+\begin{lstlisting}
+sudo /etc/init.d/apache2 restart
+\end{lstlisting}
+You can test it now by opening a new browser tab and navigating to \emph{https://localhost/testsoftware}
+(keep in mind to replace \emph{testsoftware} with your name of the folder where the web page
+is located). If you configured everything properly, you should get a dialog where you can
+try to login with your created username and password.
\newpage
\section{Web page}
@@ -952,6 +1027,9 @@ Springer Verlag, Weizmann Institute of Science, Israel, ISBN: 978-1-84628-769-5,
\bibitem{https} P. Bramscher, \emph{Creating Certificate Authorities and self-signed SSL certificates}, accessed on 05.09.2011, available at
\url{http://www.tc.umn.edu/~brams006/selfsign.html}.
+\bibitem{htaccess} \emph{EnablingUseOfApacheHtaccessFiles}, accessed on 18.08.2011, available at
+\url{https://help.ubuntu.com/community/EnablingUseOfApacheHtaccessFiles}.
+
\bibitem{pChart} \emph{pChart}, accessed on 15.08.2011, available at
\url{http://www.pchart.net/}.