blublu
Module author: Andrea Bonomi <a.bonomi@endian.com>
Try to Authenticate an user, identified by an username, password and a scope. Raise ‘ClientAuthException’ if the user authentication failed.
Returns: | Return a dictionary of user attributes in case of success. |
---|---|
Return type: | dict |
Get an user, identified by an username and a scope. Raise ‘ClientAuthException’ if the user authentication failed.
Parameters: |
|
---|---|
Returns: | Return a dictionary of user attributes in case of success. |
Return type: | dict |
Get the list of all the users of a scope. For each user, is extracted a subset of the attributes, specified by the retrieve_attributes parameter This method depends on the ability of the providers to retrieve the user list (not all the kinds of providers are able to do this). The additional arguments (argv) are used to filter the users list.
Parameters: |
|
---|---|
Returns: | a list of users with the selected attributes |
Return type: | list of dict |
Update an user attribute
Parameters: |
|
---|---|
Returns: | Return a dictionary of user attributes in case of success. |
Return type: | dict |
Update an user attribute
Parameters: |
|
---|---|
Returns: | Return a dictionary of user attributes in case of success. |
Return type: | dict |
Update an user attribute
Parameters: |
|
---|---|
Returns: | Return a dictionary of user attributes in case of success. |
Return type: | dict |
sync users from remote source to make service options overwriteable
Parameters: | scope (string) – scope |
---|---|
Returns: | Return a dict containing a list of available users, removed users and created users |
Return type: | dict |
Get an group, identified by an groupname and a scope. Raise ‘ClientAuthException’ if the user authentication failed.
Parameters: |
|
---|---|
Returns: | Return a dictionary of user attributes in case of success. |
Return type: | dict |
Get the list of all the groups of a scope. For each group, is extracted a subset of the attributes, specified by the retrieve_attributes parameter This method depends on the ability of the providers to retrieve the group list (not all the kinds of providers are able to do this). The additional arguments (argv) are used to filter the groups list.
Parameters: |
|
---|---|
Returns: | a list of groups with the selected attributes |
Return type: | list of dict |
Update an user attribute
Parameters: |
|
---|---|
Returns: | Return a dictionary of group attributes in case of success. |
Return type: | dict |
Delete a group by name
Parameters: |
|
---|---|
Returns: | Return a dictionary of group attributes in case of success. |
Return type: | dict |
Update an group attribute
Parameters: |
|
---|---|
Returns: | Return a dictionary of group attributes in case of success. |
Return type: | dict |
sync groups from remote source to make service options overwriteable
Parameters: | scope (string) – scope |
---|---|
Returns: | Return a dict containing a list of available groups, invalidated groups and created users |
Return type: | dict |
Send a generic cmd to the authentication layer. Raise ‘ClientAuthException’ if case of error.
Returns: | Return the result of the command execution. |
---|---|
Return type: | a dict or a list |
Return the authentication scopes list
Returns: | Return a list of scopes. |
---|---|
Return type: | list of dict |
Return the list of all the defined authentication scopes
Return the list of all the defined authentication scopes
Parameters: | name (string) – scope title by name, fallback to name if not present |
---|---|
Return type: | string |
Return the authentication providers list
Returns: | Return a list of providers. |
---|---|
Return type: | list of dict |
Return the list of all the providers types
Return the provider type by id
Parameters: | id (string) – provider id |
---|---|
Return type: | dict |
Reload the scopes and providers configuration
Create a new certificate
Parameters: |
|
---|
Create a new certificate
Parameters: |
|
---|
Revoke a certificate
Parameters: | cert_name (string) – Certificate name |
---|
Verify a certificate
Parameters: | cert_name (string) – Certificate name |
---|
Sign a certificate request
Parameters: |
|
---|
Create the certificate hash symlink used by openssl
Parameters: | cert_name (string) – Certificate name |
---|
Create the CA certificate hash symlink used by openssl
Parameters: | cert_name (string) – CA Certificate name |
---|
Sets up a user session for a previously successful authenticated user. The session should later be terminated with a call to close_session.
Parameters: |
|
---|
This function is used to indicate that an authenticated session has ended. The session should have been created with a call to open_session.
Parameters: |
|
---|
List the open sessions.
Parameters: |
|
---|
Create the CRL hash symlink used by openssl
Parameters: | crl_name (string) – CA Certificate name |
---|
Generate/regenerate the CRL file
Checks index.txt for expired certificates and mark them
Bases: exceptions.Exception
Bases: endian.core.daemon.Daemon
Bases: BaseHTTPServer.BaseHTTPRequestHandler
Respond to a GET request.
Index page, return the list of the available actions
Send an error reply as json
Send the response header and log the response code.
Bases: object
Try to Authenticate an user, identified by an username, password and (optional) additional arguments on a scope. Raise ‘AuthException’ if the user authentication failed. Return a dictionary of user attributes in case of success.
Parameters: |
|
---|
Create a new group Raise ‘AuthException’ if it is impossibile to create the group.
Parameters: |
|
---|
Create a new user Raise ‘AuthException’ if it is impossibile to create the user.
Parameters: |
|
---|
Delete an group Raise ‘AuthException’ if it is impossibile to delete the group.
Parameters: |
|
---|
Delete an user Raise ‘AuthException’ if it is impossibile to delete the user.
Parameters: |
|
---|
Get a group, identified by a groupname and a scope. Raise ‘GroupNotFoundError’ if the group does not exist. Return a dictionary of group attributes in case of success.
Parameters: |
|
---|---|
Returns: | results – the groups found |
Return type: | int |
Raises: | GroupNotFoundError |
Return a provider by its name
Return the a providers type based on the id
Return the list of all the providers types
Return the authentication providers list
Return a list of providers for a scope
Parameters: | scope (string) – a scope name or a string starting with the prefix ‘provider:’ followed by the name of a provider |
---|
Return the scope module by name
Return the list of all the defined authentication scopes
Return the name of a scope by name
Return the authentication scopes list
Get an user, identified by an username and a scope. Raise ‘UserNotFoundError’ if the user does not exist. Return a dictionary of user attributes in case of success.
Parameters: |
|
---|
Get the list of all the groups of a scope. For each group, is extracted a subset of the attributes, specified by the retrieve_attributes parameter This method depends on the ability of the providers to retrieve the group list (not all the kinds of providers are able to do this). The additional arguments are used to filter the groups list.
Parameters: |
|
---|---|
Returns: | a list of groups with the selected attributes |
Return type: | list of dict |
Get the list of all the users of a scope. For each user, is extracted a subset of the attributes, specified by the retrieve_attributes parameter This method depends on the ability of the providers to retrieve the user list (not all the kinds of providers are able to do this). The additional arguments are used to filter the users list.
Parameters: |
|
---|---|
Returns: | a list of users with the selected attributes |
Return type: | list of dict |
Register a new type of provider (e.g. file, local db, radius)
Register a scope and create the default scope configuration and providers if missing
Reload the scopes and providers configuration
Sync groups from remote source e.g. LDAP Raise ‘AuthException’ if it is impossibile to sync the groups.
Parameters: | scope (string) – a scope name or a string starting with the prefix ‘provider:’ followed by the name of a provider |
---|
Sync users from remote source e.g. LDAP Raise ‘AuthException’ if it is impossibile to sync the users.
Parameters: | scope (string) – a scope name or a string starting with the prefix ‘provider:’ followed by the name of a provider |
---|
Update an group attribute
Parameters: |
|
---|---|
Returns: | Return a dictionary of group attributes in case of success. |
Return type: | dict |
Update an user attribute
Parameters: |
|
---|---|
Returns: | Return a dictionary of user attributes in case of success. |
Return type: | dict |