Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

lcas_userallow.c File Reference

Interface to the LCAS plugins. More...

#include "lcas_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lcas_modules.h"
#include "lcas_gridlist.h"

Go to the source code of this file.

Functions

int plugin_initialize (int argc, char **argv)
 initialize the plugin.

int plugin_confirm_authorization (lcas_request_t request, lcas_cred_id_t lcas_cred)
 Ask the plugin authorization module for authorization.

int plugin_terminate ()
 Whatever is needed to terminate the plugin module goes in here.


Detailed Description

Interface to the LCAS plugins.

Author:
Martijn Steenbakkers for the EU DataGrid.
This file contains the code for the plugin that checks a plain text file containing a list of the DN (subjects of X509 certificates) of the users that are allowed on the site. The interface consists of the following functions:
  1. plugin_initialize()
  2. plugin_confirm_authorization()
  3. plugin_terminate()

Definition in file lcas_userallow.c.


Function Documentation

plugin_confirm_authorization lcas_request_t  request,
lcas_cred_id_t  lcas_cred
 

Ask the plugin authorization module for authorization.

Ask for authorization by passing the RSL (later JDL) and the user credential. The user credential will contain information on the role the user wants to have. In the RSL (JDL) the user might specify the resources he wants to use. The authorization decision has to be made using this information. The LCAS provides no library for parsing the RSL (JDL).

Parameters:
request LCAS (RSL) request
lcas_cred LCAS credential
Return values:
LCAS_MOD_SUCCESS authorization succeeded
LCAS_MOD_FAIL authorization failed
LCAS_MOD_NOFILE private plugin database could not be found (LCAS will deny authorization)

Definition at line 185 of file lcas_userallow.c.

References lcas_cred_id_t, lcas_get_dn(), lcas_log(), lcas_log_debug(), LCAS_MOD_FAIL, LCAS_MOD_NOENTRY, LCAS_MOD_NOFILE, LCAS_MOD_SUCCESS, lcas_request_t, and plugin_confirm_authorization().

Referenced by plugin_confirm_authorization().

plugin_initialize int  argc,
char **  argv
 

initialize the plugin.

Everything that is needed to initialize the plugin should be put inside this function. Arguments as read from the LCAS database (argc, argv) are passed to the plugin.

Parameters:
argc number of passed arguments.
argv argument list. argv[0] contains the name of the plugin.
Return values:
LCAS_MOD_SUCCESS successful initialization
LCAS_MOD_FAIL failure in the plugin initialization
LCAS_MOD_NOFILE private plugin database could not be found (same effect as LCAS_MOD_FAIL)

Definition at line 120 of file lcas_userallow.c.

References lcas_findfile(), lcas_getfexist(), lcas_log(), lcas_log_debug(), LCAS_MOD_NOFILE, LCAS_MOD_SUCCESS, and plugin_initialize().

Referenced by plugin_initialize().

plugin_terminate  ) 
 

Whatever is needed to terminate the plugin module goes in here.

Return values:
LCAS_MOD_SUCCESS success
LCAS_MOD_FAIL failure (will result in an authorization failure)

Definition at line 265 of file lcas_userallow.c.

References lcas_log_debug(), and LCAS_MOD_SUCCESS.


Generated on Fri May 27 18:10:49 2005 for lcas by doxygen 1.3.5