Trees | Indices | Help |
|
---|
|
Module interacting with PAM performing authorization and authentication
This module authenticates and authorizes RAPI users based on their credintials. Both actions are performed by interaction with PAM as a 'ganeti-rapi' service.
|
|||
PamHandleT Wrapper for PamHandleT |
|||
PamMessage Wrapper for PamMessage |
|||
PamResponse Wrapper for PamResponse |
|||
PamConv Wrapper for PamConv |
|||
CFunctions | |||
PamAuthenticator Class providing an Authenticate method based on interaction with PAM. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
c = None hash(x) |
|||
DEFAULT_SERVICE_NAME = 'ganeti-rapi'
|
|||
MAX_STR_LENGTH = 100000
|
|||
MAX_MSG_COUNT = 100
|
|||
PAM_ENV_URI = 'GANETI_RAPI_URI'
|
|||
PAM_ENV_BODY = 'GANETI_REQUEST_BODY'
|
|||
PAM_ENV_METHOD = 'GANETI_REQUEST_METHOD'
|
|||
PAM_ENV_ACCESS = 'GANETI_RESOURCE_ACCESS'
|
|||
PAM_ABORT = 26
|
|||
PAM_BUF_ERR = 5
|
|||
PAM_CONV_ERR = 19
|
|||
PAM_SILENT = 32768
|
|||
PAM_SUCCESS = 0
|
|||
PAM_PROMPT_ECHO_OFF = 1
|
|||
PAM_AUTHTOK = 6
|
|||
PAM_USER = 2
|
|||
CONV_FUNC = c.CFUNCTYPE(c.c_int, c.c_int, c.POINTER(c.POINTER(
|
Imports: logging, util, constants, PamRapiAuthError, http, HttpServerRequestAuthentication, auth
|
Performs authentication via PAM. Perfroms two steps:
|
Performs authorization via PAM. Performs two steps:
|
Checks whether ValidateRequest has been called with a correct params. These checks includes:
|
Checks whether it's permitted to execute an rapi request. Calls pam_authenticate and then pam_acct_mgmt in order to check whether a request should be executed.
|
Converts a string to a valid C string. As a C side treats non-unicode strings, encode unicode string with 'ascii'. Also ensure that C string will not be longer than MAX_STR_LENGTH in order to prevent attacs based on too long buffers. |
|
CONV_FUNC
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Mar 11 11:23:31 2016 | http://epydoc.sourceforge.net |