Commit 5750fd5f authored by Marco Malavolti's avatar Marco Malavolti
Browse files

Replaced ECCS2 with ECCS

parent e1c4099c
*__pycache__*
*.pyc
*eccs2venv*
eccs2.pid
*eccs-venv*
eccs.pid
chromedriver
python*
eccs2.ini
eccs2.conf
eccs2.service
eccs2properties.py
eccs.ini
eccs.conf
eccs.service
eccs_properties.py
clean7daysOldFiles.sh
cleanAndRunEccs2.sh
cleanAndRunEccs.sh
......@@ -3,7 +3,7 @@ Please read this!
Before opening a new issue, make sure to search for keywords in the issues filtered by the "bug" label:
- https://gitlab.geant.org/marco.malavolti/eccs2/-/issues?label_name%5B%5D=bug
- https://gitlab.geant.org/edugain/eccs/-/issues?label_name%5B%5D=bug
and verify that the issue you're about to submit isn't a duplicate.
--->
......
......@@ -3,7 +3,7 @@ Please read this!
Before opening a new issue, make sure to search for keywords in the issues filtered by the "feature_request" label:
- https://gitlab.geant.org/marco.malavolti/eccs2/-/issues?label_name%5B%5D=feature_request
- https://gitlab.geant.org/edugain/eccs/-/issues?label_name%5B%5D=feature_request
and verify that the issue you're about to submit isn't a duplicate.
--->
......
# EduGAIN Connectivity Check Service 2 - ECCS2
# EduGAIN Connectivity Check Service - ECCS
1. [Introduction](#introduction)
2. [Check Performed on the IdPs](#check-performed-on-the-idps)
......@@ -8,25 +8,25 @@
6. [Requirements Hardware](#requirements-hardware)
7. [Requirements Software](#requirements-software)
8. [HOWTO Install and Configure](#howto-install-and-configure)
* [Install Python 3.9.x](#install-python-39x)
* [Python 3](#python-3)
+ [CentOS 7 requirements](#centos-7-requirements)
+ [Debian requirements](#debian-requirements)
+ [Python 3.9](#python-39)
9. [Install the Chromedriver](#install-the-chromedriver)
10. [Install Google Chrome needed by Selenium](#install-google-chrome-needed-by-selenium)
11. [ECCS2 Script](#eccs2-script)
* [Install](#install)
* [Configure](#configure)
* [Execute](#execute)
12. [ECCS2 API Server (UWSGI)](#eccs2-api-server-uwsgi)
* [Install](#install-1)
* [Configure](#configure-1)
* [Utility](#utility)
13. [ECCS2 API JSON](#eccs2-api-json)
14. [Utility for web interface](#utility-for-web-interface)
15. [Utility for developers](#utility-for-developers)
* [ECCS2 API Development Server](#eccs2-api-development-server)
16. [Authors](#authors)
+ [Install](#install)
* [Install the Chromedriver](#install-the-chromedriver)
* [Install Google Chrome needed by Selenium](#install-google-chrome-needed-by-selenium)
* [ECCS Script](#eccs-script)
+ [Install](#install-1)
+ [Configure](#configure)
+ [Execute](#execute)
9. [ECCS API Server (UWSGI)](#eccs-api-server-uwsgi)
* [Install](#install-1)
* [Configure](#configure-1)
* [Utility](#utility)
10. [ECCS API JSON](#eccs-api-json)
11. [Utility for web interface](#utility-for-web-interface)
12. [Utility for developers](#utility-for-developers)
* [ECCS API Development Server](#eccs-api-development-server)
13. [Authors](#authors)
# Introduction
......@@ -65,7 +65,7 @@ Disallow: /
# On-line interface
The test eduGAIN Connectivity Check web pages is available at: https://technical-test.edugain.org/eccs2
The test eduGAIN Connectivity Check web pages is available at: https://technical-test.edugain.org/eccs
The tool uses following status for IdPs:
......@@ -95,18 +95,18 @@ The tool uses following status for IdPs:
# Requirements Software
* Apache Server + WSGI
* Python 3.9 (tested with v3.9.1)
* Python 3 (tested with v3.9.1, v3.9.7)
* Selenim + Google Chrome Web Brower (tested with v91.0.4472.164)
* Chromedriver (tested with v91.0.4472.101)
* Git
# HOWTO Install and Configure
## Download ECCS2 Repository
## Download ECCS Repository
* `cd $HOME ; git clone https://gitlab.geant.org/marco.malavolti/eccs2.git`
* `cd $HOME ; git clone https://gitlab.geant.org/edugain/eccs.git`
## Install Python 3.9.x
## Install Python 3
### CentOS 7 requirements
......@@ -133,42 +133,42 @@ The tool uses following status for IdPs:
3. Install Git:
* `sudo apt install git`
### Python 3.9
### Install
1. Download the last version of Python 3.9.x from https://www.python.org/downloads/source/ into your home:
* `wget https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz -O $HOME/eccs2/Python-3.9.1.tgz`
1. Download the last version of Python 3 from https://www.python.org/downloads/source/ into your home:
* `wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz -O $HOME/eccs/Python-3.9.7.tgz`
2. Extract Python source package:
* `cd $HOME/eccs2/`
* `tar xzf Python-3.9.1.tgz`
* `cd $HOME/eccs/`
* `tar xzf Python-3.9.7.tgz`
3. Build Python from the source package:
* `cd $HOME/eccs2/Python-3.9.1`
* `./configure --prefix=$HOME/eccs2/python`
* `cd $HOME/eccs/Python-3.9.7`
* `./configure --prefix=$HOME/eccs/python`
* `make`
4. Install Python 3.9.x under `$HOME/eccs2/python`:
4. Install Python 3 under `$HOME/eccs/python`:
* `make install`
* `$HOME/eccs2/python/bin/python3.9 --version`
* `$HOME/eccs/python/bin/python3 --version`
This will install python under your $HOME directory.
This will install python3 under your $HOME/eccs directory.
5. Remove useless things:
* `rm -Rf $HOME/eccs2/Python-3.9.1 $HOME/eccs2/Python-3.9.1.tgz`
* `rm -Rf $HOME/eccs/Python-3.9.7 $HOME/eccs/Python-3.9.7.tgz`
# Install Google Chrome needed by Selenium
## Install Google Chrome needed by Selenium
* Debian (64 bit):
* `cd $HOME/eccs2`
* `cd $HOME/eccs`
* `sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb`
* `sudo apt install ./google-chrome-stable_current_amd64.deb`
* CentOS (64 bit):
* `cd $HOME/eccs2`
* `cd $HOME/eccs`
* `sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm`
* `sudo yum install ./google-chrome-stable_current_x86_64.rpm`
# Install the Chromedriver
## Install the Chromedriver
1. Find out which version of Chromium you are using:
* Debian 9 (stretch):
......@@ -183,7 +183,7 @@ The tool uses following status for IdPs:
4. Use the version number retrieved from the previous step to construct the URL to download ChromeDriver. With version `72.0.3626.69`, the URL would be "https://chromedriver.storage.googleapis.com/index.html?path=73.0.3683.68/"
5. Download the Chromedriver and extract it with:
* `cd $HOME/eccs2`
* `cd $HOME/eccs`
* `wget https://chromedriver.storage.googleapis.com/73.0.3683.75/chromedriver_linux64.zip`
* `unzip chromedriver_linux64.zip`
* `rm chromedriver_linux64.zip google-chrome-stable_current_amd64.deb`
......@@ -191,21 +191,21 @@ The tool uses following status for IdPs:
**Note:**
After the initial download, it is recommended that you occasionally go through the above process again to see if there are any bug fix releases.
# ECCS2 Script
## ECCS Script
## Install
### Install and Configure the Virtual Environment
* `cd $HOME/eccs2`
* `./python/bin/python3.9 -m pip install virtualenv`
* `$HOME/eccs2/python/bin/virtualenv --python=$HOME/eccs2/python/bin/python3.9 eccs2venv`
* `$HOME/eccs2/eccs2venv/bin/python -m pip install --upgrade pip`
* `source eccs2venv/bin/activate` (`deactivate` to exit Virtualenv)
* `python -m pip install -r requirements.txt`
* `cd $HOME/eccs`
* `./python/bin/python3 -m pip install virtualenv`
* `$HOME/eccs/python/bin/virtualenv --python=$HOME/eccs/python/bin/python3 eccs-venv`
* `$HOME/eccs/eccs-venv/bin/python3 -m pip install --upgrade pip`
* `source eccs-venv/bin/activate` (`deactivate` to exit Virtualenv)
* `python3 -m pip install -r requirements.txt`
## Configure
### Configure ECCS
1. Configure ECCS2 properties:
* `vim eccs2properties.py` (and change it upon your needs)
1. Configure ECCS properties:
* `vim eccs_properties.py` (and change it upon your needs)
2. Change `PATH` by adding the virtualenv Python `bin` dir:
* CentOS:
......@@ -213,9 +213,9 @@ After the initial download, it is recommended that you occasionally go through t
* Add the following lines at the tail:
```bash
# set PATH for ECCS2
if [ -d "$HOME/eccs2" ] ; then
PATH="$HOME/eccs2/eccs2venv/bin:$PATH"
# set PATH for ECCS
if [ -d "$HOME/eccs" ] ; then
PATH="$HOME/eccs/eccs-venv/bin:$PATH"
fi
```
......@@ -226,38 +226,38 @@ After the initial download, it is recommended that you occasionally go through t
* Add the following lines at the tail:
```bash
# set PATH for ECCS2
if [ -d "$HOME/eccs2" ] ; then
PATH="$HOME/eccs2/eccs2venv/bin:$PATH"
# set PATH for ECCS
if [ -d "$HOME/eccs" ] ; then
PATH="$HOME/eccs/eccs-venv/bin:$PATH"
fi
```
* `source $HOME/.bash_profile`
3. Configure ECCS2 cron job for the local user:
3. Configure ECCS cron job for the local user:
* `crontab -e`
```bash
SHELL=/bin/bash
0 4 * * * /bin/bash $HOME/eccs2/cleanAndRunEccs2.sh > $HOME/eccs2/logs/eccs2cron.log 2>&1
0 4 * * * /bin/bash $HOME/eccs/cleanAndRunEccs.sh > $HOME/eccs/logs/eccs-cron.log 2>&1
```
## Execute
* `cd $HOME/eccs2`
* `./cleanAndRunEccs2.py` (to run a full and clean check)
* `./runEccs2.py` (to run a full check on the existing inputs)
* `./runEccs2.py --idp <IDP-ENTITYID>` (to run check on a single IdP)
* `./runEccs2.py --test` (to run a full check without effects)
* `./runEccs2.py --idp <IDP-ENTITYID> --test` (to run check on a single IdP without effects)
* `./runEccs2.py --idp <IDP-ENTITYID> --replace` (to run check on a single IdP and replace, or add, a result)
* `cd $HOME/eccs`
* `./cleanAndRunEccs.py` (to run a full and clean check)
* `./runEccs.py` (to run a full check on the existing inputs)
* `./runEccs.py --idp <IDP-ENTITYID>` (to run check on a single IdP)
* `./runEccs.py --test` (to run a full check without effects)
* `./runEccs.py --idp <IDP-ENTITYID> --test` (to run check on a single IdP without effects)
* `./runEccs.py --idp <IDP-ENTITYID> --replace` (to run check on a single IdP and replace, or add, a result)
If something prevent the good execution of the ECCS2's check, the `logs/failed-cmd.sh` file will be not empty at the end of the execution.
If something prevent the good execution of the ECCS's check, the `logs/failed-cmd.sh` file will be not empty at the end of the execution.
The "--test" parameter will not change the result of ECCS2, but will write the output on the `logs/stdout_idp_YYYY-MM-DD.log`,`logs/stderr_idp_YYYY-MM-DD.log` and `logs/failed-cmd-idp.sh` files if the argument "--test" will be used.
The "--test" parameter will not change the result of ECCS, but will write the output on the `logs/stdout_idp_YYYY-MM-DD.log`,`logs/stderr_idp_YYYY-MM-DD.log` and `logs/failed-cmd-idp.sh` files if the argument "--test" will be used.
# ECCS2 API Server (uWSGI)
# ECCS API Server (uWSGI)
## Install
......@@ -266,32 +266,32 @@ After the initial download, it is recommended that you occasionally go through t
* `sudo apt-get install libpcre3 libpcre3-dev libapache2-mod-proxy-uwsgi build-essentials python3-dev unzip`
* CentOS:
* `sudo yum install mod_proxy_uwsgi unzip`
* Configure SElinux to enable ECCS2:
* `sudo semanage fcontext -a -t httpd_sys_content_t "$HOME/eccs2(/.*)?"`
* `sudo restorecon -R -e $HOME/eccs2/`
* Configure SElinux to enable ECCS:
* `sudo semanage fcontext -a -t httpd_sys_content_t "$HOME/eccs(/.*)?"`
* `sudo restorecon -R -e $HOME/eccs/`
* `sudo setsebool -P httpd_can_network_connect 1`
## Configure
1. Add the systemd service to enable ECCS2 API:
* `cd $HOME/eccs2`
* `cp eccs2.ini.template eccs2.ini`
* `cp eccs2.service.template eccs2.service`
* `vim eccs2.ini` (and change "`uid`", "`gid`" and "`base`" values opportunely)
* `vim eccs2.service` (and change "`User`","`Group`","`WorkingDirectory`","`RuntimeDirectory`","`ExecStart`" values opportunely)
* `sudo cp $HOME/eccs2/eccs2.service /etc/systemd/system/eccs2.service`
1. Add the systemd service to enable ECCS API:
* `cd $HOME/eccs`
* `cp eccs.ini.template eccs.ini`
* `cp eccs.service.template eccs.service`
* `vim eccs.ini` (and change "`uid`", "`gid`" and "`base`" values opportunely)
* `vim eccs.service` (and change "`User`","`Group`","`WorkingDirectory`","`RuntimeDirectory`","`ExecStart`" values opportunely)
* `sudo cp $HOME/eccs/eccs.service /etc/systemd/system/eccs.service`
* `sudo systemctl daemon-reload`
* `sudo systemctl enable eccs2.service`
* `sudo systemctl start eccs2.service`
* `sudo systemctl enable eccs.service`
* `sudo systemctl start eccs.service`
2. Configure Apache for ECCS2 web side:
2. Configure Apache for ECCS web side:
* Debian:
* `sudo cp $HOME/eccs2/eccs2-debian.conf /etc/apache2/conf-available/eccs2.conf`
* `sudo a2enconf eccs2.conf`
* `sudo cp $HOME/eccs/eccs-debian.conf /etc/apache2/conf-available/eccs.conf`
* `sudo a2enconf eccs.conf`
* `sudo chgrp www-data $HOME ; sudo chmod g+rx $HOME` (Apache needs permission to access the $HOME dir)
* `sudo systemctl restart apache2.service`
* CentOS:
* `sudo cp $HOME/eccs2/eccs2-centos.conf /etc/httpd/conf.d/eccs2.conf`
* `sudo cp $HOME/eccs/eccs-centos.conf /etc/httpd/conf.d/eccs.conf`
* `sudo chgrp apache $HOME ; sudo apache g+rx $HOME` (Apache needs permission to access the $HOME dir)
* `sudo systemctl restart httpd.service`
......@@ -301,22 +301,22 @@ After the initial download, it is recommended that you occasionally go through t
```bash
SHELL=/bin/bash
0 3 * * * /usr/bin/touch $HOME/eccs2/eccs2.ini
0 3 * * * /usr/bin/touch $HOME/eccs/eccs.ini
```
## Utility
To perform a restart after an API change use the following command:
* `touch $HOME/eccs2/eccs2.ini`
* `touch $HOME/eccs/eccs.ini`
# ECCS2 API JSON
# ECCS API JSON
* `/api/eccsresults` (Return the results of the last check ready for ECCS web interface)
* `/api/eccsresults?<parameter1>=<value1>&<parameter2>=<value2>`:
* `date=2020-02-20` (select date)
* `idp=https://idp.example.org/idp/shibboleth` (select a specific idp)
* `status=` (select specific ECCS2 status)
* `status=` (select specific ECCS status)
* 'OK'
* 'ERROR'
* 'DISABLED'
......@@ -339,18 +339,18 @@ The available dates are provided by the first and the last file created into the
## Clean old results
To clean the ECCS2 results from files older than last 7 days use (modify it on your needs):
To clean the ECCS results from files older than last 7 days use (modify it on your needs):
* `crontab -e`
```bash
SHELL=/bin/bash
0 10 * * * /bin/bash $HOME/eccs2/clean7daysOldFiles.sh > $HOME/eccs2/logs/clean7daysOldFiles.log 2>&1
0 10 * * * /bin/bash $HOME/eccs/clean7daysOldFiles.sh > $HOME/eccs/logs/clean7daysOldFiles.log 2>&1
```
## User interface
The eduGAIN Connectivity Check 2 test web page is available at https://technical-test.edugain.org/eccs2
The eduGAIN Connectivity Check Service web page is available at https://technical-test.edugain.org/eccs
## User interface parameters
......@@ -364,13 +364,13 @@ The eduGAIN Connectivity Check 2 test web page is available at https://technical
**Example:**
`https://technical-test.edugain.org/eccs2?reg_auth=http://www.idem.garr.it/&check_result=SSL-Error`
`https://technical-test.edugain.org/eccs?reg_auth=http://www.idem.garr.it/&check_result=SSL-Error`
# Utility for developers
## ECCS2 API Development Server
## ECCS API Development Server
* `cd $HOME/eccs2 ; ./api.py`
* `cd $HOME/eccs ; ./api.py`
# Authors
......
......@@ -4,7 +4,7 @@ import json
import logging
import re
from eccs2properties import DAY, ECCS2LOGSDIR, ECCS2OUTPUTDIR, ECCS2LISTFEDSURL, ECCS2LISTFEDSFILE
from eccs_properties import DAY, ECCS_LOGSDIR, ECCS_OUTPUTDIR, ECCS_LISTFEDSURL, ECCS_LISTFEDSFILE, ECCS_RESULTSLOG
from flask import Flask, request, jsonify
from flask_restful import Resource, Api
from utils import get_logger, get_list_feds, get_reg_auth_dict
......@@ -15,7 +15,7 @@ api = Api(app)
### Functions
# Build Email Addresses Link for ECCS2 Web Gui
# Build Email Addresses Link for ECCS Web Gui
def buildEmailAddress(listContacts):
listCtcs = listContacts.split(",")
hrefList = []
......@@ -25,7 +25,7 @@ def buildEmailAddress(listContacts):
return hrefList
# Research the value of the research_item into ECCS2 output files
# Research the value of the research_item into ECCS output files
def existsInFile(file_path, value, research_item, eccsDataTable, date):
try:
with open(file_path,"r",encoding="utf-8") as fo:
......@@ -34,7 +34,7 @@ def existsInFile(file_path, value, research_item, eccsDataTable, date):
if (eccsDataTable):
return ''
else:
return jsonify(error=f'FileNotFound: ECCS2 script has not been executed on {date} yet')
return jsonify(error=f'FileNotFound: ECCS script has not been executed on {date} yet')
for line in lines:
aux = json.loads(line)
......@@ -70,7 +70,7 @@ class Test(Resource):
class EccsResults(Resource):
def get(self):
file_path = f"{ECCS2OUTPUTDIR}/eccs2_{DAY}.log"
file_path = f"{ECCS_OUTPUTDIR}/{ECCS_RESULTSLOG}"
date = DAY
status = None
idp = None
......@@ -83,7 +83,7 @@ class EccsResults(Resource):
eccsDataTable = True
if 'date' in request.args:
date = request.args['date']
file_path = f"{ECCS2OUTPUTDIR}/eccs2_{date}.log"
file_path = f"{ECCS_OUTPUTDIR}/eccs_{date}.log"
if 'status' in request.args:
status = request.args['status'].upper()
if (status not in ['OK','DISABLED','ERROR']):
......@@ -114,7 +114,7 @@ class EccsResults(Resource):
if (eccsDataTable):
return ''
else:
return jsonify(error=f'FileNotFound: ECCS2 script has not been executed on {date}')
return jsonify(error=f'FileNotFound: ECCS script has not been executed on {date}')
for line in lines:
# Strip the line feed and carriage return characters
......@@ -125,7 +125,7 @@ class EccsResults(Resource):
aux['date'] = date
# If the results are for ECCS2 DataTable, otherwise... remove only "mailto:" prefix
# If the results are for ECCS DataTable, otherwise... remove only "mailto:" prefix
if (eccsDataTable):
aux['contacts']['technical'] = buildEmailAddress(aux['contacts']['technical'])
aux['contacts']['support'] = buildEmailAddress(aux['contacts']['support'])
......@@ -195,17 +195,17 @@ class EccsResults(Resource):
# /api/fedstats
class FedStats(Resource):
def get(self):
list_feds = get_list_feds(ECCS2LISTFEDSURL, ECCS2LISTFEDSFILE)
list_feds = get_list_feds(ECCS_LISTFEDSURL, ECCS_LISTFEDSFILE)
regAuthDict = get_reg_auth_dict(list_feds)
file_path = f"{ECCS2OUTPUTDIR}/eccs2_{DAY}.log"
file_path = f"{ECCS_OUTPUTDIR}/{ECCS_RESULTSLOG}"
date = DAY
reg_auth = None
eccsDataTable = False
if ('date' in request.args):
date = request.args['date']
file_path = f"{ECCS2OUTPUTDIR}/eccs2_{date}.log"
file_path = f"{ECCS_OUTPUTDIR}/eccs_{date}.log"
if ('reg_auth' in request.args):
reg_auth = request.args['reg_auth']
if (not existsInFile(file_path, reg_auth, "registrationAuthority", eccsDataTable, date)):
......@@ -221,7 +221,7 @@ class FedStats(Resource):
if (eccsDataTable):
return ''
else:
return jsonify(error=f'FileNotFound: ECCS2 script has not been executed on {date} yet')
return jsonify(error=f'FileNotFound: ECCS script has not been executed on {date} yet')
if (reg_auth):
resultDict = {'date': date, 'registrationAuthority': reg_auth, 'OK': 0, 'ERROR': 0, 'DISABLED': 0}
......@@ -269,7 +269,7 @@ class FedStats(Resource):
# /api/
class Help(Resource):
def get(self):
return { 'ECCS2 JSON Interface': 'https://wiki.geant.org/display/eduGAIN/eduGAIN+Connectivity+Check+2#eduGAINConnectivityCheck2-JSONinterface' }
return { 'ECCS JSON Interface': 'https://wiki.geant.org/display/eduGAIN/eduGAIN+Connectivity+Check+2#eduGAINConnectivityCheck2-JSONinterface' }
# Routes
......@@ -283,5 +283,5 @@ if __name__ == '__main__':
# Useful only for API development Server
#app.config['JSON_AS_ASCII'] = True
#app.logger.removeHandler(default_handler)
#app.logger = get_logger("eccs2api.log", ECCS2LOGSDIR, "w", "INFO")
#app.logger = get_logger("eccs_api.log", ECCS_LOGSDIR, "w", "INFO")
app.run(port='5002')
#!/bin/bash
BASEDIR=$HOME/eccs2
BASEDIR=$HOME/eccs
# Remove ECCS2 result older than 7 days
find $BASEDIR/output/* -mtime +6 -type f -delete
......
......@@ -7,10 +7,10 @@ BASEDIR=$HOME
source $HOME/.bash_profile
# Remove old IdP and Fed List
rm -f $BASEDIR/eccs2/input/*.json
rm -f $BASEDIR/eccs/input/*.json
# Run ECCS2
$BASEDIR/eccs2/runEccs2.py
$BASEDIR/eccs/runEccs.py
# Run again ECCS2 for those IdPs who failed check
$BASEDIR/eccs2/retryFailedChecks.py
$BASEDIR/eccs/retryFailedChecks.py
<IfModule mod_alias.c>
Alias /eccs2 /home/<USER>/eccs2/web
Alias /eccs2html /home/<USER>/eccs2/html
Alias /eccs /home/<USER>/eccs/web
Alias /eccs/html /home/<USER>/eccs/html
<Directory /home/<USER>/eccs2/web>
<Directory /home/<USER>/eccs/web>
DirectoryIndex index.php
Require all granted
</Directory>
<Directory /home/<USER>/eccs2/html>
<Directory /home/<USER>/eccs/html>
Require all granted
</Directory>
</IfModule>
LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
ProxyPass /eccs2/api uwsgi://127.0.0.1:8000/
ProxyPass /eccs/api uwsgi://127.0.0.1:8000/
<IfModule mod_alias.c>
Alias /eccs2 /home/<USER>/eccs2/web
Alias /eccs2html /home/<USER>/eccs2/html
Alias /eccs /home/<USER>/eccs/web
Alias /eccs/html /home/<USER>/eccs/html
<Directory /home/<USER>/eccs2/web>
<Directory /home/<USER>/eccs/web>
DirectoryIndex index.php
Require all granted
</Directory>
<Directory /home/<USER>/eccs2/html>
<Directory /home/<USER>/eccs/html>
Require all granted
</Directory>
</IfModule>
<IfModule mod_proxy_uwsgi.c>
ProxyPass /eccs2/api uwsgi://127.0.0.1:8000/
ProxyPass /eccs/api uwsgi://127.0.0.1:8000/
</IfModule>
#!/usr/bin/env python3.8
#!/usr/bin/env python3
from api import app as application
......
[uwsgi]
project = eccs2
project = eccs
base = /home/<USER>
chdir = %(base)/%(project)
......@@ -16,15 +16,15 @@ vacuum = true
die-on-term = true
# set max connections to 1024 in uWSGI
# set max connections to 128 in uWSGI
listen = 128
virtualenv = eccs2venv
wsgi-file = eccs2wsgi.py
virtualenv = eccs-venv
wsgi-file = eccs-wsgi.py
logto = logs/%(project)uwsgi.log
logto = logs/%(project)-uwsgi.log
log-maxsize = 100000000
log-backupname = logs/%(project)uwsgi.old.log
log-backupname = logs/%(project)-uwsgi.old.log
# Each 1000 request restart workers
max-requests = 1000
......
......@@ -4,13 +4,13 @@ import argparse
import json
import sys
import utils
import eccs2properties as e2p
import eccs_properties as e_p
from pathlib import Path
"""
The check works with the wayfless url of two SP and successed if the IdP Login Page appears and contains the fields "username" and "password" for each of them.
It is possible to disable the check by eccs2properties IDP_DISABLE_DICT or by "robots.txt" put on the SAMLRequest endpoint root web dir.
It is possible to disable the check by eccs_properties IDP_DISABLE_DICT or by "robots.txt" put on the SAMLRequest endpoint root web dir.
"""
# Extract IdP DisplayName by fixing input string
......@@ -35,7 +35,7 @@ def store_eccs_result(idp,sp,check_results,idp_status,test):
str_support_contacts = ','.join(list_support_contacts)
if (test):
sys.stdout.write("\nECCS2:")
sys.stdout.write("\nECCS:")
sys.stdout.write('{"displayName":"%s","entityID":"%s","registrationAuthority":"%s","contacts":{"technical":"%s","support":"%s"},"status":"%s","sp1":{"wayflessUrl":"%s","checkTime":"%s","checkResult":"%s"},"sp2":{"wayflessUrl":"%s","checkTime":"%s","checkResult":"%s"}}\n' % (