Skip to content
Snippets Groups Projects
Commit cc4e66a5 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

rename application as Access Check Manager

parent c0b06f98
Branches
Tags
No related merge requests found
...@@ -36,11 +36,11 @@ A database has to be created, and its schema populated. For instance, with Maria ...@@ -36,11 +36,11 @@ A database has to be created, and its schema populated. For instance, with Maria
``` ```
$> mysqladmin create -u root -p access_check $> mysqladmin create -u root -p access_check
Enter password: Enter password:
$> mysql -u root -p account_manager < conf/account_manager.sql $> mysql -u root -p access_check < conf/manager.sql
Enter password: Enter password:
$> mysql -u root -p mysql $> mysql -u root -p mysql
Enter password: Enter password:
MariaDB [mysql]> grant all privileges on account_manager.* to account_manager@localhost identified by 's3cr3t'; MariaDB [mysql]> grant all privileges on access_check.* to access_check@localhost identified by 's3cr3t';
Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec)
MariaDB [mysql]> quit MariaDB [mysql]> quit
``` ```
...@@ -48,21 +48,21 @@ MariaDB [mysql]> quit ...@@ -48,21 +48,21 @@ MariaDB [mysql]> quit
The web server has to be configured to map access to the CGI script. For instance, with Apache: The web server has to be configured to map access to the CGI script. For instance, with Apache:
``` ```
Alias /account-manager /usr/local/share/account-managerk/www Alias /access-check /usr/local/share/access-check/www
<Directory /usr/local/share/account-manager/www> <Directory /usr/local/share/access-check/www>
Require all granted Require all granted
Options ExecCGI Options ExecCGI
DirectoryIndex account-manager.cgi DirectoryIndex access-check-manager.cgi
AddHandler cgi-script .cgi AddHandler cgi-script .cgi
</Directory> </Directory>
``` ```
Additional directories have to be created for logs and data, with write permission for the web server: Additional directories have to be created for logs and data, with write permission for the web server:
``` ```
$> sudo mkdir /var/log/account-manager $> sudo mkdir /var/log/access-check
$> sudo mkdir /var/lib/account-manager $> sudo mkdir /var/lib/access-check
$> sudo chown apache.apache /var/log/account-manager $> sudo chown apache.apache /var/log/access-check
$> sudo chown apache.apache /var/lib/account-manager $> sudo chown apache.apache /var/lib/access-check
``` ```
The application has to be properly configured, using the installed ```manager.conf``` file. The application has to be properly configured, using the installed ```manager.conf``` file.
...@@ -70,15 +70,15 @@ The application has to be properly configured, using the installed ```manager.co ...@@ -70,15 +70,15 @@ The application has to be properly configured, using the installed ```manager.co
A cron task has to be set for downloading federation metadata. For instance: A cron task has to be set for downloading federation metadata. For instance:
``` ```
# download eduGAIN metadata hourly # download eduGAIN metadata hourly
01 * * * * root curl --silent http://mds.edugain.org/ -o /var/lib/account-manager/edugain.xml 01 * * * * root curl --silent http://mds.edugain.org/ -o /var/lib/access-manager/edugain.xml
``` ```
Another cron task has to be set for purging expired tokens and accounts. For instance: Another cron task has to be set for purging expired tokens and accounts. For instance:
``` ```
# purge expired tokens hourly # purge expired tokens hourly
01 * * * * root /usr/local/bin/account-manager.pl list_tokens --expired --delete > /dev/null 01 * * * * root /usr/local/bin/access-check-manager.pl list_tokens --expired --delete > /dev/null
# purge expired accounts daily # purge expired accounts daily
02 0 * * * root /usr/local/bin/account-manager.pl list_accounts --expired --delete > /dev/null 02 0 * * * root /usr/local/bin/access-check-manager.pl list_accounts --expired --delete > /dev/null
``` ```
## Identity Provider ## Identity Provider
......
bin_SCRIPTS = account-manager.pl bin_SCRIPTS = access-check-manager.pl
www_SCRIPTS = account-manager.cgi www_SCRIPTS = access-check-manager.cgi
CLEANFILES = $(bin_SCRIPTS) $(www_SCRIPTS) CLEANFILES = $(bin_SCRIPTS) $(www_SCRIPTS)
EXTRA_DIST = account-manager.pl.in account-manager.cgi.in EXTRA_DIST = access-check-manager.pl.in access-check-manager.cgi.in
account-manager.pl: Makefile account-manager.pl.in access-check-manager.pl: Makefile access-check-manager.pl.in
sed \ sed \
-e 's|[@]modulesdir[@]|$(modulesdir)|' \ -e 's|[@]modulesdir[@]|$(modulesdir)|' \
-e 's|[@]sysconfdir[@]|$(sysconfdir)|' \ -e 's|[@]sysconfdir[@]|$(sysconfdir)|' \
< $(srcdir)/$@.in > $@ < $(srcdir)/$@.in > $@
chmod +x $@ chmod +x $@
account-manager.cgi: Makefile account-manager.cgi.in access-check-manager.cgi: Makefile access-check-manager.cgi.in
sed \ sed \
-e 's|[@]modulesdir[@]|$(modulesdir)|' \ -e 's|[@]modulesdir[@]|$(modulesdir)|' \
-e 's|[@]sysconfdir[@]|$(sysconfdir)|' \ -e 's|[@]sysconfdir[@]|$(sysconfdir)|' \
......
File moved
File moved
AC_PREREQ(2.59) AC_PREREQ(2.59)
AC_INIT([Account Manager], 1.0) AC_INIT([Access Check Manager], 1.0)
AM_INIT_AUTOMAKE([foreign]) AM_INIT_AUTOMAKE([foreign])
AC_REQUIRE_AUX_FILE([tap-driver.sh]) AC_REQUIRE_AUX_FILE([tap-driver.sh])
wwwdir=$datadir/account-manager/www wwwdir=$datadir/access-check/www
modulesdir=$datadir/account-manager/lib modulesdir=$datadir/access-check/lib
templatesdir=$datadir/account-manager/templates templatesdir=$datadir/access-check/templates
AC_SUBST(wwwdir) AC_SUBST(wwwdir)
AC_SUBST(modulesdir) AC_SUBST(modulesdir)
......
modulesdir = $(pkgdatadir)/lib modulesdir = $(datadir)/access-check/lib
nobase_modules_DATA = \ nobase_modules_DATA = \
AccountManager/Token.pm \ AccountManager/Token.pm \
......
...@@ -26,7 +26,7 @@ subtest start_page => sub { ...@@ -26,7 +26,7 @@ subtest start_page => sub {
local $ENV{REQUEST_METHOD} = 'GET'; local $ENV{REQUEST_METHOD} = 'GET';
local $ENV{QUERY_STRING} = ''; local $ENV{QUERY_STRING} = '';
my ($out, $err, $rc) = run_executable('account-manager.cgi'); my ($out, $err, $rc) = run_executable('access-check-manager.cgi');
diag($out) if $ENV{TEST_DEBUG}; diag($out) if $ENV{TEST_DEBUG};
like( like(
$out, $out,
...@@ -53,7 +53,7 @@ subtest sp_selection_page => sub { ...@@ -53,7 +53,7 @@ subtest sp_selection_page => sub {
local $ENV{REQUEST_METHOD} = 'GET'; local $ENV{REQUEST_METHOD} = 'GET';
local $ENV{QUERY_STRING} = 'action=select_sp'; local $ENV{QUERY_STRING} = 'action=select_sp';
my ($out, $err, $rc) = run_executable('account-manager.cgi'); my ($out, $err, $rc) = run_executable('access-check-manager.cgi');
diag($out) if $ENV{TEST_DEBUG}; diag($out) if $ENV{TEST_DEBUG};
like( like(
$out, $out,
...@@ -80,7 +80,7 @@ subtest email_selection_page_missing_parameter => sub { ...@@ -80,7 +80,7 @@ subtest email_selection_page_missing_parameter => sub {
local $ENV{REQUEST_METHOD} = 'GET'; local $ENV{REQUEST_METHOD} = 'GET';
local $ENV{QUERY_STRING} = 'action=select_email'; local $ENV{QUERY_STRING} = 'action=select_email';
my ($out, $err, $rc) = run_executable('account-manager.cgi'); my ($out, $err, $rc) = run_executable('access-check-manager.cgi');
diag($out) if $ENV{TEST_DEBUG}; diag($out) if $ENV{TEST_DEBUG};
like( like(
$out, $out,
...@@ -107,7 +107,7 @@ subtest email_selection_page_wrong_parameter => sub { ...@@ -107,7 +107,7 @@ subtest email_selection_page_wrong_parameter => sub {
local $ENV{REQUEST_METHOD} = 'GET'; local $ENV{REQUEST_METHOD} = 'GET';
local $ENV{QUERY_STRING} = 'action=select_email&entityid=foo'; local $ENV{QUERY_STRING} = 'action=select_email&entityid=foo';
my ($out, $err, $rc) = run_executable('account-manager.cgi'); my ($out, $err, $rc) = run_executable('access-check-manager.cgi');
diag($out) if $ENV{TEST_DEBUG}; diag($out) if $ENV{TEST_DEBUG};
like( like(
$out, $out,
......
...@@ -12,7 +12,7 @@ plan tests => 48; ...@@ -12,7 +12,7 @@ plan tests => 48;
my ($out, $err, $rc); my ($out, $err, $rc);
($out, $err, $rc) = run_executable('account-manager.pl', '--help'); ($out, $err, $rc) = run_executable('access-check-manager.pl', '--help');
ok($rc == 0, '--help exit status'); ok($rc == 0, '--help exit status');
is($err, '', '--help stderr'); is($err, '', '--help stderr');
like( like(
...@@ -21,7 +21,7 @@ like( ...@@ -21,7 +21,7 @@ like(
'--help stdout' '--help stdout'
); );
($out, $err, $rc) = run_executable('account-manager.pl'); ($out, $err, $rc) = run_executable('access-check-manager.pl');
ok($rc == 2, 'no action exit status'); ok($rc == 2, 'no action exit status');
like( like(
$err, $err,
...@@ -62,21 +62,21 @@ EOF ...@@ -62,21 +62,21 @@ EOF
# reset database content # reset database content
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file list_accounts --delete" "--config $config_file list_accounts --delete"
); );
ok($rc == 0, 'delete accounts exit status'); ok($rc == 0, 'delete accounts exit status');
is($err, '', 'delete accounts stderr output'); is($err, '', 'delete accounts stderr output');
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file list_tokens --delete" "--config $config_file list_tokens --delete"
); );
ok($rc == 0, 'delete tokens exit status'); ok($rc == 0, 'delete tokens exit status');
is($err, '', 'delete tokens stderr output'); is($err, '', 'delete tokens stderr output');
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file list_services --delete" "--config $config_file list_services --delete"
); );
ok($rc == 0, 'delete services exit status'); ok($rc == 0, 'delete services exit status');
...@@ -86,7 +86,7 @@ EOF ...@@ -86,7 +86,7 @@ EOF
# initial list # initial list
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file list_accounts" "--config $config_file list_accounts"
); );
ok($rc == 0, 'list accounts exit status'); ok($rc == 0, 'list accounts exit status');
...@@ -95,7 +95,7 @@ EOF ...@@ -95,7 +95,7 @@ EOF
# creation failure # creation failure
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file add_account" "--config $config_file add_account"
); );
ok($rc == 2, 'add account without mandatory option exit status'); ok($rc == 2, 'add account without mandatory option exit status');
...@@ -108,7 +108,7 @@ EOF ...@@ -108,7 +108,7 @@ EOF
# creation success # creation success
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file add_account --profile foo --sp_entityid bar" "--config $config_file add_account --profile foo --sp_entityid bar"
); );
ok($rc == 0, 'add account with mandatory option exit status'); ok($rc == 0, 'add account with mandatory option exit status');
...@@ -117,7 +117,7 @@ EOF ...@@ -117,7 +117,7 @@ EOF
# final list # final list
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file list_accounts" "--config $config_file list_accounts"
); );
ok($rc == 0, 'list accounts exit status'); ok($rc == 0, 'list accounts exit status');
...@@ -128,7 +128,7 @@ EOF ...@@ -128,7 +128,7 @@ EOF
# initial list # initial list
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file list_services" "--config $config_file list_services"
); );
ok($rc == 0, 'list services exit status'); ok($rc == 0, 'list services exit status');
...@@ -137,7 +137,7 @@ EOF ...@@ -137,7 +137,7 @@ EOF
# creation failure # creation failure
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file add_service" "--config $config_file add_service"
); );
ok($rc == 2, 'add service without mandatory option exit status'); ok($rc == 2, 'add service without mandatory option exit status');
...@@ -150,7 +150,7 @@ EOF ...@@ -150,7 +150,7 @@ EOF
# creation success # creation success
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file add_service --sp_entityid bar --contacts joe,bob" "--config $config_file add_service --sp_entityid bar --contacts joe,bob"
); );
ok($rc == 0, 'add service with mandatory option exit status'); ok($rc == 0, 'add service with mandatory option exit status');
...@@ -159,7 +159,7 @@ EOF ...@@ -159,7 +159,7 @@ EOF
# final list # final list
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file list_services" "--config $config_file list_services"
); );
ok($rc == 0, 'list services exit status'); ok($rc == 0, 'list services exit status');
...@@ -170,7 +170,7 @@ EOF ...@@ -170,7 +170,7 @@ EOF
# initial list # initial list
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file list_tokens" "--config $config_file list_tokens"
); );
ok($rc == 0, 'list tokens exit status'); ok($rc == 0, 'list tokens exit status');
...@@ -179,7 +179,7 @@ EOF ...@@ -179,7 +179,7 @@ EOF
# creation failure # creation failure
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file add_token" "--config $config_file add_token"
); );
ok($rc == 2, 'add token without mandatory option exit status'); ok($rc == 2, 'add token without mandatory option exit status');
...@@ -192,7 +192,7 @@ EOF ...@@ -192,7 +192,7 @@ EOF
# creation success # creation success
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file add_token --sp_entityid bar --email_address joe" "--config $config_file add_token --sp_entityid bar --email_address joe"
); );
ok($rc == 0, 'add token with mandatory option exit status'); ok($rc == 0, 'add token with mandatory option exit status');
...@@ -201,7 +201,7 @@ EOF ...@@ -201,7 +201,7 @@ EOF
# final list # final list
($out, $err, $rc) = run_executable( ($out, $err, $rc) = run_executable(
'account-manager.pl', 'access-check-manager.pl',
"--config $config_file list_tokens" "--config $config_file list_tokens"
); );
ok($rc == 0, 'list tokens exit status'); ok($rc == 0, 'list tokens exit status');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment