univention.management.console package#
- class univention.management.console.Translation(*args, **kwargs)[source]#
Bases:
NullTranslationTranslation.
- classmethod set_all_languages(language: str) None[source]#
Set the language of all existing
Translationinstances. This is required when instances are created during import time but later on the language should be changed.
Subpackages#
- univention.management.console.modules package
- Subpackages
- univention.management.console.modules.adconnector package
- univention.management.console.modules.admindiary package
- univention.management.console.modules.adtakeover package
reset_progress()Instance- Submodules
- univention.management.console.modules.adtakeover.takeover module
ProgressTakeoverErrorComputerUnreachableAuthenticationFailedDomainJoinFailedSysvolGPOMissingSysvolGPOVersionTooLowSysvolGPOVersionMismatchSysvolErrorADServerRunningTimeSynchronizationFailedManualTimeSynchronizationRequiredLicenseInsufficientcount_domain_objects_on_server()join_to_domain_and_copy_domain_data()take_over_domain()check_status()check_sysvol()set_status_done()AD_Takeover_StateAD_Takeover_State.check_sysvol()AD_Takeover_State.check_takeover()AD_Takeover_State.check_start()AD_Takeover_State.set_start()AD_Takeover_State.set_joined()AD_Takeover_State.set_sysvol()AD_Takeover_State.set_takeover()AD_Takeover_State.set_finished()AD_Takeover_State.set_done()AD_Takeover_State.current()
get_ip_and_hostname_of_ad()get_ad_hostname()sysvol_info()UCS_License_detectionAD_ConnectionAD_TakeoverAD_Takeover.time_sync()AD_Takeover.disable_admember_mode()AD_Takeover.join_AD()AD_Takeover.cleanup_failed_join()AD_Takeover.post_join_tasks_and_start_samba_without_drsuapi()AD_Takeover.remove_conflicting_msgpo_objects()AD_Takeover.rewrite_sambaSIDs_in_OpenLDAP()AD_Takeover.resync_s4connector_listener()AD_Takeover.start_s4_connector()AD_Takeover.rebuild_idmap()AD_Takeover.set_nameserver1_to_local_default_ip()AD_Takeover.reset_sysvol_ntacls()
AD_Takeover_FinalizeAD_Takeover_Finalize.ping_AD()AD_Takeover_Finalize.post_join_fix_samDB()AD_Takeover_Finalize.fix_sysvol_acls()AD_Takeover_Finalize.create_DNS_alias_for_AD_hostname()AD_Takeover_Finalize.remove_AD_server_account_from_samdb()AD_Takeover_Finalize.remove_AD_server_account_from_UDM()AD_Takeover_Finalize.create_NETBIOS_alias_for_AD_hostname()AD_Takeover_Finalize.create_virtual_IP_alias()AD_Takeover_Finalize.create_reverse_DNS_records()AD_Takeover_Finalize.reconfigure_nameserver_for_samba_backend()AD_Takeover_Finalize.claim_FSMO_roles()AD_Takeover_Finalize.configure_SNTP()AD_Takeover_Finalize.finalize()
check_gpo_presence()Timerdetermine_IP_version()ldap_uri_for_host()ping()lookup_adds_dc()run_and_output_to_log()get_stable_last_id()wait_for_listener_replication()wait_for_s4_connector_replication()check_samba4_started()UserRenameHandlerGroupRenameHandleroperatingSystem_attribute()takeover_DC_Behavior_Version()takeover_hasInstantiatedNCs()takeover_hasMasterNCs()let_samba4_manage_etc_krb5_keytab()add_servicePrincipals()sync_position_s4_to_ucs()parse_unc()run_phaseI()run_phaseIII()
- univention.management.console.modules.appcenter package
NoneCandidateUMCProgressHandlerProgressInfoHandlerProgressPercentageHandlerrequire_apps_update()InstanceInstance.init()Instance.get_updater()Instance.get_component_manager()Instance.error_handling()Instance.version()Instance.version2()Instance.resolve()Instance.run()Instance.query()Instance.update_applications()Instance.suggestions()Instance.enable_docker()Instance.sync_ldap()Instance.get_by_component_id()Instance.app_updates()Instance.get()Instance.config()Instance.configure()Instance.unpin_app()Instance.app_service()Instance.track()Instance.locked()Instance.keep_alive()Instance.ping()Instance.buy()Instance.enable_disable_app()Instance.packages_sections()Instance.packages_query()Instance.packages_get()Instance.packages_invoke_dry_run()Instance.packages_invoke()Instance.is_working()Instance.working()Instance.custom_progress()Instance.components_query()Instance.components_get()Instance.components_put()Instance.components_add()Instance.components_del()Instance.settings_get()Instance.settings_put()
- Submodules
- univention.management.console.modules.appcenter.constants module
- univention.management.console.modules.appcenter.sanitizers module
- univention.management.console.modules.appcenter.util module
- univention.management.console.modules.apps package
- univention.management.console.modules.computerroom package
compare_dn()check_room_access()reset_room_settings()IPAddressSanitizerPeriodSanitizerComputerSanitizerComputerRoomDNSanitizerPluginInstanceInstance.ATJOB_KEYInstance.prepare()Instance.init()Instance.destroy()Instance.lessons()Instance.internetrules()Instance.room_acquire()Instance.rooms()Instance.guess_room()Instance.query()Instance.update()Instance.lock()Instance.screenshot()Instance.settings_get()Instance.finish_exam()Instance.start_exam()Instance.settings_set()Instance.reload_cups()Instance.reset_smb_connections()Instance.demo_start()Instance.demo_stop()Instance.computer_state()Instance.user_logout()Instance.plugins_load()Instance.plugins_execute()
- Subpackages
- Submodules
- univention.management.console.modules.computerroom.room_management module
ComputerRoomErrorUserInfoUserMapLockableAttributeComputerRoomManagerComputerRoomManager.SCHOOLComputerRoomManager.ROOMComputerRoomManager.ROOM_DNComputerRoomManager.VEYON_BACKENDComputerRoomManager.get_screenshot_dimension()ComputerRoomManager.roomComputerRoomManager.roomDNComputerRoomManager.schoolComputerRoomManager.usersComputerRoomManager.veyon_backendComputerRoomManager.veyon_clientComputerRoomManager.ipAddresses()ComputerRoomManager.isDemoActiveComputerRoomManager.demoServerComputerRoomManager.demoClientsComputerRoomManager.startDemo()ComputerRoomManager.stopDemo()
VeyonComputerVeyonComputer.run()VeyonComputer.update_paused()VeyonComputer.update_intervalVeyonComputer.nameVeyonComputer.userVeyonComputer.stateVeyonComputer.teacherVeyonComputer.isTeacherVeyonComputer.descriptionVeyonComputer.configuration_okVeyonComputer.ipAddressVeyonComputer.macAddressVeyonComputer.objectTypeVeyonComputer.hasChangedVeyonComputer.screenshot()VeyonComputer.hide_screenshotVeyonComputer.flagsDictVeyonComputer.dictVeyonComputer.screenLockVeyonComputer.inputLockVeyonComputer.demoServerVeyonComputer.demoClientVeyonComputer.update()VeyonComputer.stop()VeyonComputer.reset_state()VeyonComputer.open()VeyonComputer.close()VeyonComputer.lockScreen()VeyonComputer.lockInput()VeyonComputer.startDemoServer()VeyonComputer.stopDemoServer()VeyonComputer.startDemoClient()VeyonComputer.stopDemoClient()VeyonComputer.powerOff()VeyonComputer.powerOn()VeyonComputer.restart()VeyonComputer.logOut()
- univention.management.console.modules.computerroom.wakeonlan module
- univention.management.console.modules.diagnostic package
- univention.management.console.modules.distribution package
compare_dn()Instance- Submodules
- univention.management.console.modules.distribution.util module
DistributionExceptionInvalidProjectFilenamejsonEncode()jsonDecode()UserGroupopenRecipients()ProjectProject.projectfileProject.cachedirProject.sender_projectdirProject.atJobDistributeProject.atJobCollectProject.num_resultsProject.user_projectdir()Project.starttimeProject.deadlineProject.validate()Project.isNameInUse()Project.save()Project.getRecipients()Project.distribute()Project.collect()Project.purge()Project.sanitize_project_filename()Project.load()Project.list()
initPaths()
- univention.management.console.modules.helpdesk package
- univention.management.console.modules.internetrules package
- univention.management.console.modules.ipchange package
- univention.management.console.modules.join package
- univention.management.console.modules.lessontimes package
- univention.management.console.modules.lib package
- univention.management.console.modules.passwordreset package
forward_to_master()forward_to_master_if_authentication_disabled()prevent_denial_of_service()ConnectionLimitReachedServiceForbiddenTokenNotFoundNoMethodsAvailableTokenSendMessageInstanceInstance.init()Instance.usersmodInstance.get_service_specific_passwords()Instance.set_service_specific_passwords()Instance.get_contact()Instance.get_user_attributes()Instance.get_user_attributes_values()Instance.get_user_attributes_descriptions()Instance.get_registration_attributes()Instance.validate_user_attributes()Instance.set_user_attributes()Instance.create_self_registered_account()Instance.send_verification_token()Instance.set_contact()Instance.send_token()Instance.verify_contact()Instance.deregister_account()Instance.set_password()Instance.get_reset_methods()Instance.create_token()Instance.send_message()Instance.auth()Instance.authenticate_user()Instance.set_contact_data()Instance.admember_set_password()Instance.udm_set_password()Instance.is_blacklisted()Instance.get_groups()Instance.get_nested_groups()Instance.dns_to_groupname()Instance.get_udm_user_by_dn()Instance.get_udm_user()Instance.get_udm_group()Instance.email2username()
- Subpackages
- univention.management.console.modules.passwordreset.sending package
get_plugins()- Submodules
- univention.management.console.modules.passwordreset.sending.send_email module
- univention.management.console.modules.passwordreset.sending.send_sms module
- univention.management.console.modules.passwordreset.sending.send_with_external module
- univention.management.console.modules.passwordreset.sending.verify_email module
- univention.management.console.modules.passwordreset.sending package
- Submodules
- univention.management.console.modules.passwordreset.send_plugin module
UniventionSelfServiceTokenEmitterUniventionSelfServiceTokenEmitter.send_method()UniventionSelfServiceTokenEmitter.send_method_label()UniventionSelfServiceTokenEmitter.message_application()UniventionSelfServiceTokenEmitter.is_enabled()UniventionSelfServiceTokenEmitter.udm_propertyUniventionSelfServiceTokenEmitter.password_reset_verified_recovery_email()UniventionSelfServiceTokenEmitter.token_lengthUniventionSelfServiceTokenEmitter.set_data()UniventionSelfServiceTokenEmitter.send()
- univention.management.console.modules.passwordreset.tokendb module
- univention.management.console.modules.pkgdb package
- univention.management.console.modules.printermoderation package
- univention.management.console.modules.printers package
- univention.management.console.modules.quota package
- univention.management.console.modules.reboot package
- univention.management.console.modules.schoolexam package
load_smb_default_file()InstanceInstance.init()Instance.destroy()Instance.deny_owner_change_permissions()Instance.set_nt_acls_on_exam_folders()Instance.set_datadir_immutable_flag()Instance.upload()Instance.internetrules()Instance.lesson_end()Instance.progress()Instance.get()Instance.add()Instance.delete()Instance.put()Instance.start_exam()Instance.collect_exam()Instance.validate_room()Instance.finish_exam()Instance.query()Instance.groups2students()
- Submodules
- univention.management.console.modules.schoolexam.util module
- univention.management.console.modules.schoolgroups package
- univention.management.console.modules.schoolimport package
- univention.management.console.modules.schoolinstaller package
HostSanitizerSchoolInstallerErrorget_master_dns_lookup()umc()create_ou_local()create_ou_remote()system_join()ProgressInstanceInstance.init()Instance.error_handling()Instance.get_samba_version()Instance.get_school_environment()Instance.get_school_version()Instance.query()Instance.progress()Instance.get_metainfo()Instance.get_schoolinfo()Instance.get_schoolinfo_master()Instance.get_metainfo_master()Instance.install()Instance.retrieve_root_certificate()Instance.restore_original_certificate()
- univention.management.console.modules.schoollists package
- univention.management.console.modules.schoolrooms package
- univention.management.console.modules.schoolusers package
- univention.management.console.modules.schoolwizards package
get_exception_msg()OperationTypecheck_workaround_constraints()iter_objects_in_request()response()sanitize_object()InstanceInstance.admin_workaround_activeInstance.check_password_policiesInstance.own_schools()Instance.is_domain_admin()Instance.init()Instance.is_singlemaster()Instance.move_dc()Instance.computer_types()Instance.share_servers()Instance.get_users()Instance.get_user()Instance.modify_user()Instance.create_user()Instance.delete_user()Instance.get_computers()Instance.get_computer()Instance.modify_computer()Instance.create_computer()Instance.delete_computer()Instance.get_classes()Instance.get_class()Instance.modify_class()Instance.create_class()Instance.delete_class()Instance.get_schools()Instance.get_school()Instance.modify_school()Instance.create_school()Instance.delete_school()
- Submodules
- univention.management.console.modules.schoolwizards.SchoolImport module
- univention.management.console.modules.serveroverview package
- univention.management.console.modules.services package
- univention.management.console.modules.setup package
RequestTimeoutInstanceInstance.init()Instance.ping()Instance.close_browser()Instance.load()Instance.save_keymap()Instance.save()Instance.join()Instance.check_finished()Instance.validate()Instance.lang_locales()Instance.lang_timezones()Instance.lang_keyboard_model()Instance.lang_keyboard_layout()Instance.lang_keyboard_variante()Instance.lang_countrycodes()Instance.net_apply()Instance.net_apply_check_finished()Instance.net_interfaces()Instance.net_dhclient()Instance.reset_locale()Instance.find_city()Instance.apps_query()Instance.check_domain()Instance.check_domain_join_information()Instance.check_school_information()Instance.check_repository_accessibility()Instance.check_uid()
- Subpackages
- Submodules
- univention.management.console.modules.setup.network module
DeviceErrorIP4SetIP6SetInterfacesDeviceDevice.primary_ip4Device.clear()Device.subdevice_namesDevice.subdevicesDevice.prepare_consistency()Device.validate()Device.validate_name()Device.validate_ip4()Device.validate_ip6()Device.limit_ip4_address()Device.check_unique_interface_usage()Device.disable_ips()Device.get_options()Device.parse_ucr()Device.to_ucr()Device.dictDevice.from_dict()
EthernetVLANBondBridge
- univention.management.console.modules.setup.setup_script module
setup_i18n()ProfileTransactionalUcrSetupScriptSetupScript.nameSetupScript.parse_profile()SetupScript.inform_progress_parser()SetupScript.header()SetupScript.message()SetupScript.error()SetupScript.join_error()SetupScript.steps()SetupScript.step()SetupScript.log()SetupScript.run()SetupScript.inner_run()SetupScript.up()SetupScript.down()
AptScriptAptScript.brutal_apt_optionsAptScript.up()AptScript.set_always_install()AptScript.noninteractive()AptScript.update()AptScript.get_package()AptScript.finish_task()AptScript.reopen_cache()AptScript.mark_auto()AptScript.commit()AptScript.install()AptScript.uninstall()AptScript.get_package_for_role()AptScript.autoremove()AptScript.down()
main()
- univention.management.console.modules.setup.util module
timestamp()is_system_joined()load_values()auto_complete_values_for_join()pre_save()write_profile()run_networkscrips()written_profile()ProgressStateProgressParsersorted_files_in_subdirs()run_scripts()run_joinscript()cleanup()run_scripts_in_path()create_status_file()detect_interfaces()dhclient()get_apps()is_proxy()is_ipaddr()is_ipv4addr()is_ipv4netmask()is_ipv6addr()is_ipv6netmask()is_hostname()is_domainname()is_windowsdomainname()domain2windowdomain()is_domaincontroller()is_ldap_base()is_ascii()is_ucs_domain()get_ucs_domaincontroller_master_query()resolve_domaincontroller_master_srv_record()is_ssh_reachable()get_ucs_domain()get_domain()get_fqdn()get_available_locales()get_city_data()get_country_data()get_random_nameserver()check_credentials_ad()
- univention.management.console.modules.sysinfo package
- univention.management.console.modules.top package
- univention.management.console.modules.ucr package
- univention.management.console.modules.ucstest package
- univention.management.console.modules.udm package
sanitize_func()module_from_request()bundled()ObjectPropertySanitizerPropertySearchSanitizerUDMModuleMetaInstanceInstance.prepare()Instance.set_locale()Instance.error_handling()Instance.require_license()Instance.get_ldap_connection()Instance.get_module()Instance.get_obj_module()Instance.license()Instance.license_info()Instance.license_import()Instance.restore()Instance.move()Instance.add()Instance.put()Instance.remove()Instance.meta_info()Instance.get()Instance.copy()Instance.query()Instance.reports_query()Instance.sanitize_reports_create()Instance.reports_create()Instance.reports_get()Instance.values()Instance.network()Instance.containers()Instance.templates()Instance.types()Instance.layout()Instance.properties()Instance.options()Instance.policies()Instance.validate()Instance.syntax_choices_key()Instance.syntax_choices_info()Instance.syntax_choices()Instance.move_container_query()Instance.nav_container_query()Instance.nav_object_query()Instance.object_policies()Instance.object_options()Instance.request_new_license()
- Submodules
- univention.management.console.modules.udm.syntax module
- univention.management.console.modules.udm.tools module
- univention.management.console.modules.udm.udm_ldap module
calculate_bind_hash()set_bind_hash()get_bind_hash()set_bind_function()get_bind_function()LDAP_Connection()UMCErrorAppAttributesUserWithoutDNLDAP_AuthenticationFailedObjectDoesNotExistSuperordinateDoesNotExistNoIpLeftSearchTimeoutErrorSearchLimitReachedUDM_ErrorUDM_ModuleCacheUDM_ModuleUDM_Module.get_ldap_connection()UDM_Module.load()UDM_Module.allows_simple_lookup()UDM_Module.lookup_filter()UDM_Module.get_default_values()UDM_Module.create()UDM_Module.move()UDM_Module.restore()UDM_Module.remove()UDM_Module.modify()UDM_Module.search()UDM_Module.get()UDM_Module.get_property()UDM_Module.help_linkUDM_Module.help_textUDM_Module.nameUDM_Module.columnsUDM_Module.subtitleUDM_Module.titleUDM_Module.ldap_baseUDM_Module.descriptionUDM_Module.object_nameUDM_Module.object_name_pluralUDM_Module.identifiesUDM_Module.virtualUDM_Module.supports_paginationUDM_Module.childsUDM_Module.child_modulesUDM_Module.has_treeUDM_Module.default_search_attrsUDM_Module.obj_description()UDM_Module.property_description()UDM_Module.is_policy_module()UDM_Module.get_layout()UDM_Module.password_propertiesUDM_Module.get_properties()UDM_Module.properties()UDM_Module.get_options()UDM_Module.optionsUDM_Module.operationsUDM_Module.templateUDM_Module.get_default_container()UDM_Module.get_default_containers()UDM_Module.superordinate_namesUDM_Module.is_policy_multivalueUDM_Module.policiesUDM_Module.get_policy_references()UDM_Module.get_references()UDM_Module.flavorUDM_Module.mapping
container_modules()split_module_name()ldap_dn2path()get_module()get_obj_module()list_objects()search_syntax_choices_by_key()info_syntax_choices()read_syntax_choices()
- univention.management.console.modules.updater package
- univention.management.console.modules.welcome package
- Submodules
- univention.management.console.modules.decorators module
- univention.management.console.modules.mixins module
- univention.management.console.modules.sanitizers module
- Sanitize classes for the sanitize decorator
BooleanSanitizerChoicesSanitizerDNSanitizerDictSanitizerEmailSanitizerIntegerSanitizerLDAPSearchSanitizerListSanitizerMappingSanitizerMultiValidationErrorPatternSanitizerSanitizerSearchSanitizerStringSanitizerUnformattedValidationErrorValidationError
- Subpackages
Submodules#
univention.management.console.acl module#
UMC ACL implementation#
This module implements the UMC ACLs used to define the access rights for users and groups to the UMC service.
UMC ACLs are defined by creating UMC operation set objects that are added to UMC policies. These policies can be connected with users or groups.
An UMC operation set consists of a list of UMC command patterns like
udm/* objectType=nagios/*
This specifies that all commands hat match the pattern udm/* can be called if the option objectType is given and the value matches the pattern nagios/*.
Patterns for commands and options may just use the asterik and know no other wildcards. For options there is one additional format allowed to specify that the option may not exist. Therefore the following format is used
udm/* !objectType
- class univention.management.console.acl.Rule[source]#
Bases:
dictA simple class representing one ACL rule in a form that can be simply serialized.
- property fromUser#
Returns True if the rule was connected with a user, otherwise False
- property host#
Returns a hostname pattern. If the pattern matches the hostname the command is allowed on the host
- property command#
Returns the command pattern this rule describes
- property options#
Returns the option pattern for the rule
- property flavor#
Returns the flavor if given otherwise None
- class univention.management.console.acl.ACLs(ldap_base=None, acls=None)[source]#
Bases:
objectProvides methods to determine the access rights of users to specific UMC commands. It defines a cache for ACLs, a parser for command definitions of ACLs and functions for comparison.
- MATCH_NONE = 0#
- MATCH_PART = 1#
- MATCH_FULL = 2#
- CACHE_DIR = '/var/cache/univention-management-console/acls'#
defines the directory for the cache files
- class univention.management.console.acl.LDAP_ACLs(username, userdn, ldap_base)[source]#
Bases:
ACLsReads ACLs from LDAP directory for the given username. By inheriting the class
ACLsthe ACL definitions can be cached on the local system. If the LDAP server can not be reached the cache is used if available.- FROM_USER = True#
- FROM_GROUP = False#
univention.management.console.auth module#
univention.management.console.base module#
Python API for UMC modules#
The Python API for UMC modules primary consists of one base class that must be implemented. As an addition the Python API provides some helper functions and classes:
exception classes
translation support
logging functions
UCR access
The XML file defining the UMC module specifies functions for the
commands provided by the module. These functions must be implemented as
methods of a class named Instance that inherits Base.
The following Python code example matches the definition in the previous section:
from univention.management.console import Translation
from univention.management.console.config import ucr
from univention.management.console.modules import Base
from univention.management.console.modules.decorators import sanitize
from univention.management.console.modules.sanitizers import IntegerSanitizer
from univention.management.console.log import MODULE
_ = Translation('univention-management-console-modules-udm').translate
class Instance(Base):
@sanitize(end=IntegerSanitizer(minimum=0),)
def query(self, request):
end = request.options['end']
result = list(range(end))
self.finished(request.id, result)
Each command methods has one parameter that contains the HTTP request of
type
Request. Such
an object has the following properties:
- id
is the unique identifier of the request
- options
contains the arguments for the command. For most commands it is a dictionary.
- flavor
is the name of the flavor that was used to invoke the command. This might be None
username: The username of the owner of this session
password: The password of the user
auth_type: The authentication method which was used to authenticate this user
The query method in the example above shows how to retrieve the command parameters and what to do to send the result back to the client. Important is that returning a value in a command function does not send anything back to the client. Therefore the function finished must be invoked. The first parameter is the identifier of the request that will be answered and the second parameter the data structure containing the result. As the result is converted to JSON it must just contain data types that can be converted.
The base class for modules provides some methods that could be useful when writing UMC modules:
Methods * init: Is invoked after the module process has been initialised. At that moment, the settings, like locale and username and password are available.
- class univention.management.console.base.Base(*args, **kwargs)[source]#
Bases:
TranslationThe base class for UMC modules
- property username#
Deprecated since version 5.0-4: use request.username instead!
- property user_dn#
Deprecated since version 5.0-4: use request.user_dn instead!
- property password#
Deprecated since version 5.0-4: use request.password instead!
- property auth_type#
Deprecated since version 5.0-4: use request.auth_type instead!
- property tornado_routes#
- error_handling(etype, exc, etraceback)[source]#
Translate generic UDM exceptions back to LDAP exceptions.
- Parameters:
etype – The exception class.
exc – The exception instance.
etraceback – The exception traceback instance; may be None.
- get_user_ldap_connection(no_cache=False, **kwargs)[source]#
Deprecated since version 5.0-4: use request.get_user_ldap_connection() instead!
- bind_user_connection(lo)[source]#
Deprecated since version 5.0-4: use request.bind_user_connection() instead!
univention.management.console.category module#
Category definitions#
The UMC server provides the possibility to define categories used to sort the available UMC modules into groups. Each module can be in as many groups as desired.
The category definitions are stored in XML files that structured as in the following example
<?xml version="1.0" encoding="UTF-8"?>
<umc version="2.0">
<categories>
<category id="id1">
<name>Category 1</name>
</category>
<category id="id2">
<name>Category 2 on {hostname}.{domainname}</name>
</category>
</categories>
</umc>
Each file can define several categories. For each of these categories an unique identifier and the english description must be specified. The translations are stored in extra po files that are generated by the UMC build tools.
Within the description of a category UCR variable names can be used that will be substituted by the value. Therefore the name of the variables must be given in curly braces {VARIABLE}.
- class univention.management.console.category.XML_Definition(root=None, filename=None, domain=None)[source]#
Bases:
ElementTreeRepresents a category definition.
- property name#
Returns the descriptive name of the category
- property id#
Returns the unique identifier of the category
- property icon#
- property color#
univention.management.console.config module#
Configuration#
Global configuration variables and objects for the UMC server.
This module provides a global ConfigRegistry instance ucr
some constants that are used internally.
univention.management.console.error module#
- exception univention.management.console.error.UMC_Error(message=None, status=None, result=None, headers=None, traceback=None, reason=None)[source]#
Bases:
HTTPError- include_traceback = False#
- msg = None#
- status = 400#
- exception univention.management.console.error.BadRequest(message=None, status=None, result=None, headers=None, traceback=None, reason=None)[source]#
Bases:
UMC_Error- msg = 'Bad request'#
- status = 400#
- exception univention.management.console.error.Unauthorized(message=None, status=None, result=None, headers=None, traceback=None, reason=None)[source]#
Bases:
UMC_Error- msg = 'Unauthorized'#
- status = 401#
- exception univention.management.console.error.Forbidden(message=None, status=None, result=None, headers=None, traceback=None, reason=None)[source]#
Bases:
UMC_Error- msg = 'Forbidden'#
- status = 403#
- exception univention.management.console.error.NotFound(message=None, status=None, result=None, headers=None, traceback=None, reason=None)[source]#
Bases:
UMC_Error- msg = 'Not found'#
- status = 404#
- exception univention.management.console.error.MethodNotAllowed(message=None, status=None, result=None, headers=None, traceback=None, reason=None)[source]#
Bases:
UMC_Error- msg = 'Method not allowed'#
- status = 405#
- exception univention.management.console.error.NotAcceptable(message=None, status=None, result=None, headers=None, traceback=None, reason=None)[source]#
Bases:
UMC_Error- status = 406#
- exception univention.management.console.error.UnprocessableEntity(message=None, status=None, result=None, headers=None, traceback=None, reason=None)[source]#
Bases:
UMC_Error- status = 422#
- exception univention.management.console.error.ServerError(message=None, status=None, result=None, headers=None, traceback=None, reason=None)[source]#
Bases:
UMC_Error- msg = 'Internal error'#
- status = 500#
- exception univention.management.console.error.BadGateway(message=None, status=None, result=None, headers=None, traceback=None, reason=None)[source]#
Bases:
UMC_Error- status = 502#
Bases:
UMC_Error
- exception univention.management.console.error.PasswordRequired[source]#
Bases:
Unauthorized
- exception univention.management.console.error.LDAP_ConnectionFailed(exc)[source]#
Bases:
LDAP_ServerDown
Bases:
ServiceUnavailable
univention.management.console.ldap module#
Decorators for common ldap functionality. Example usage:
@machine_connection(write=True)
def foobar(self, ldap_connection=None, ldap_position=None):
return ldap_connection.search('uid=Administrator')
def foobar():
def bind(lo):
lo.bind('Administrator', 'univention')
lo, po = get_user_connection(bind=bind, write=True)
return lo.search('uid=Administrator')
- univention.management.console.ldap.admin_connection(func=None, loarg='ldap_connection', poarg='ldap_position', no_cache=False, **kwargs)#
- univention.management.console.ldap.connection(func=None, bind=None, host=None, port=None, base=None, loarg='ldap_connection', poarg='ldap_position', no_cache=False, **kwargs)#
- univention.management.console.ldap.get_admin_connection(*args, **kwargs)#
- univention.management.console.ldap.get_connection(*args, **kwargs)#
- univention.management.console.ldap.get_machine_connection(*args, **kwargs)#
- univention.management.console.ldap.get_user_connection(*args, **kwargs)#
- univention.management.console.ldap.machine_connection(func=None, write=True, loarg='ldap_connection', poarg='ldap_position', no_cache=False, **kwargs)#
- univention.management.console.ldap.user_connection(func=None, bind=None, write=True, loarg='ldap_connection', poarg='ldap_position', no_cache=False, **kwargs)#
univention.management.console.locales module#
Locales#
The translations provided by the UMC server are technically based on gettext library. As the server needs to provide translations for several different components that deliver their own translation files this module provides a simple way for the UMC server to get the required translations. Components that provide their own translation files:
the UMC core — Python code directly imported by the UMC server
categories
module definitions
- class univention.management.console.locales.I18N(locale=None, domain=None)[source]#
Bases:
objectProvides a translation function for a given language and translation domain.
- LOCALE_DIR = '/usr/share/univention-management-console/i18n/'#
- class univention.management.console.locales.I18N_Manager[source]#
Bases:
dictThis class handles the
I18Ninstances within an UMC session.As the UMC server handles all sessions opened on a system that may all use a different language it uses one
I18N_Managerper session.- set_locale(locale)[source]#
Sets the locale to use within the
I18N_Manager.- Parameters:
locale (str) – locale to use
univention.management.console.log module#
Logging#
This module provides a wrapper for univention.debug
- class univention.management.console.log.RequestFilter(umcmodule)[source]#
Bases:
FilterInitialize a filter.
Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no name is specified, allow every event.
- request_context = <ContextVar name='request'>#
- univention.management.console.log.log_init(filename, log_level=2, log_pid=None, **kwargs)[source]#
Initializes Univention debug.
- univention.management.console.log.log_set_level(level=0)[source]#
Sets the log level for all components.
- Parameters:
level (int) – log level to set
univention.management.console.message module#
A backwards compatible layer to wrap HTTP request and response messages.
The API of the Python objects representing the messages are based on the class Message.
- class univention.management.console.message.Request(command: str, arguments: Any = None, options: Any = None, mime_type: str = 'application/json')[source]#
Bases:
MessageWraps a HTTP request message in a backwards compatible Python API format
univention.management.console.modserver module#
This module provides a class for an UMC module server
- class univention.management.console.modserver.UploadManager[source]#
Bases:
dictStore file uploads in temporary files so that module processes can access them
- class univention.management.console.modserver.ModuleServer(socket: str, module: str, logfile: str, timeout: int = 300)[source]#
Bases:
objectImplements an UMC module server
- Parameters:
- class univention.management.console.modserver.Handler(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
RequestHandler- set_default_headers()[source]#
Override this to set HTTP headers at the beginning of the request.
For example, this is the place to set a custom
Serverheader. Note that setting such headers in the normal flow of request processing may not do what you want, since headers may be reset during error handling.
- on_connection_close()[source]#
Called in async handlers if the client closed the connection.
Override this to clean up resources associated with long-lived connections. Note that this method is called only if the connection was closed during asynchronous processing; if you need to do cleanup after every request override on_finish instead.
Proxies may keep a connection open for a time (perhaps indefinitely) after the client has gone away, so this method may not be called promptly after the end user closes their connection.
- on_finish()[source]#
Called after the end of a request.
Override this method to perform cleanup, logging, etc. This method is a counterpart to prepare.
on_finishmay not produce any output, as it is called after the response has been sent to the client.
- async post(path)#
- async put(path)#
- async delete(path)#
- async patch(path)#
- async options(path)#
- write_error(status_code, exc_info=(None, None, None), **kwargs)[source]#
Override to implement custom error pages.
write_errormay call write, render, set_header, etc to produce output as usual.If this error was caused by an uncaught exception (including HTTPError), an
exc_infotriple will be available askwargs["exc_info"]. Note that this exception may not be the “current” exception for purposes of methods likesys.exc_info()ortraceback.format_exc.
univention.management.console.module module#
Module definitions#
The UMC server does not load the Python modules to get the details about the modules name, description and functionality. Therefore each UMC module must provide an XML file containing this kind of information.
The following example defines a module with the id udm:
<?xml version="1.0" encoding="UTF-8"?>
<umc version="2.0">
<module id="udm" icon="udm-module" version="1.0">
<name>Univention Directory Manager</name>
<description>Manages all UDM modules</description>
<flavor icon="udm-users" id="users/user">
<name>Users</name>
<description>Managing users</description>
</flavor>
<categories>
<category name="domain" />
</categories>
<requiredCommands>
<requiredCommand name="udm/query" />
</requiredCommands>
<command name="udm/query" function="query" />
<command name="udm/containers" function="containers" />
</module>
</umc>
The module tag defines the basic details of a UMC module
- id
This identifier must be unique among the modules of an UMC server. Other files may extend the definition of a module by adding more flavors or categories.
- icon
The value of this attribute defines an identifier for the icon that should be used for the module. Details for installing icons can be found in the section Packaging
The child elements name and description define the English human readable name and description of the module. For other translations the build tools will create translation files. Details can be found in the section Packaging.
This example defines a so called flavor. A flavor defines a new name, description and icon for the same UMC module. This can be used to show several”virtual” modules in the overview of the web frontend. Additionally the flavor is passed to the UMC server with each request i.e. the UMC module has the possibility to act differently for a specific flavor.
As the next element categories is defined in the example. The child elements category set the categories wthin the overview where the module should be shown. Each module can be more than one category. The attribute name is to identify the category internally. The UMC server brings a set of pre-defined categories:
- favorites
This category is intended to be filled by the user herself.
- system
Tools manipulating the system itself (e.g. software installation) should go in here.
At the end of the definition file a list of commands is specified. The UMC server only passes commands to a UMC module that are defined. A command definition has two attributes:
- name
is the name of the command that is passed to the UMC module. Within the request this is the path segement of the URL after /univention/command/.
- function
defines the method to be invoked within the Python module when the command is called.
- keywords
defined keywords for the module to ensure searchability
The translations are stored in extra po files that are generated by the UMC build tools.
- class univention.management.console.module.Command(name='', method=None, allow_anonymous=False)[source]#
Bases:
JSON_ObjectRepresents a request URL path handled by a module
- SEPARATOR = '/'#
- class univention.management.console.module.Flavor(id='', icon='', name='', description='', overwrites=None, deactivated=False, priority=-1, translationId=None, keywords=None, categories=None, required_commands=None, version=None, hidden=False)[source]#
Bases:
JSON_ObjectDefines a flavor of a module. This provides another name and icon in the overview and may influence the behavior of the module.
- class univention.management.console.module.Module(id='', name='', url='', description='', icon='', categories=None, flavors=None, commands=None, priority=-1, keywords=None, translationId=None, required_commands=None, version=None, singleton=False, proxy=None)[source]#
Bases:
JSON_ObjectRepresents a command attribute
- class univention.management.console.module.Link(id='', name='', url='', description='', icon='', categories=None, flavors=None, commands=None, priority=-1, keywords=None, translationId=None, required_commands=None, version=None, singleton=False, proxy=None)[source]#
Bases:
Module
- class univention.management.console.module.XML_Definition(root=None, filename=None)[source]#
Bases:
ElementTreecontainer for the interface description of a module
- property name#
- property version#
- property url#
- property description#
- property keywords#
- property id#
- property priority#
- property translationId#
- property singleton#
- property icon#
- property deactivated#
- property flavors#
Retrieve list of flavor objects
- property categories#
- class univention.management.console.module.Manager[source]#
Bases:
dictManager of all available modules
- DIRECTORY = '/usr/share/univention-management-console/modules'#
- load()[source]#
Loads the list of available modules. As the list is cleared before, the method can also be used for reloading
univention.management.console.oidc module#
- class univention.management.console.oidc.OIDCUser(id_token, access_token, refresh_token, claims)[source]#
Bases:
objectOIDC tokens of the authenticated user.
- id_token#
- access_token#
- refresh_token#
- claims#
- roles#
- uuid#
- username#
- session_refresh_future#
- federated_account#
- property session_end_time#
- property token_end_time#
- class univention.management.console.oidc.OIDCResource(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
OAuth2Mixin,ResourceBase class for all OIDC resources.
- requires_authentication = False#
- async prepare()[source]#
Called at the beginning of a request before get/post/etc.
Override this method to perform common initialization regardless of the request method.
Asynchronous support: Use
async defor decorate this method with .gen.coroutine to make it asynchronous. If this method returns anAwaitableexecution will not proceed until theAwaitableis done.Added in version 3.1: Asynchronous support.
- class univention.management.console.oidc.OIDCLogin(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
OIDCResourceUser initiated login at the OP using Authentication Code Flow.
- class univention.management.console.oidc.OIDCLogout(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
_OIDCLogoutBaseUser initiated logout at the OP
- class univention.management.console.oidc.OIDCLogoutFinished(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
_OIDCLogoutBase
- class univention.management.console.oidc.OIDCFrontchannelLogout(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
_OIDCLogoutBaseOP initiated frontchannel logout at this RP.
- class univention.management.console.oidc.OIDCBackchannelLogout(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
OIDCResourceOP initiated backchannel logout at this RP.
univention.management.console.pam module#
- exception univention.management.console.pam.AuthenticationFailed[source]#
Bases:
AuthenticationError
- exception univention.management.console.pam.AuthenticationInformationMissing(message: str, missing_prompts: Any)[source]#
Bases:
AuthenticationError
- exception univention.management.console.pam.AccountExpired[source]#
Bases:
AuthenticationError
- exception univention.management.console.pam.PasswordExpired[source]#
Bases:
AuthenticationError
- exception univention.management.console.pam.PasswordChangeFailed[source]#
Bases:
AuthenticationError
- class univention.management.console.pam.PamAuth(locale: str | None = None)[source]#
Bases:
object- known_errors: dict[str | Pattern[str], str] = {"Password doesn't meet complexity requirement.": 'The password is too simple.', "The passwort didn't pass quality check": 'The password is too simple.', ': Es basiert auf einem Wörterbucheintrag': 'The password is based on a dictionary word.', ': Es enthält nicht genug unterschiedliche Zeichen': 'The password does not contain enough different characters.', ': Es ist VIEL zu kurz': 'The password is too short.', ': Es ist zu einfach/systematisch': 'The password is too simple.', ': Es ist zu kurz': 'The password is too short.', ': Password already used': 'The password was already used.', ': Password does not meet complexity requirements': 'The password is too simple.', ': Password is too short': 'The password is too short.', ': is a palindrome': 'The password is a palindrome.', ': it does not contain enough DIFFERENT characters': 'The password does not contain enough different characters.', ': it is WAY too short': 'The password is too short.', ': it is based on a dictionary word': 'The password is based on a dictionary word.', ': it is too simplistic/systematic': 'The password is too simple.', 'BAD PASSWORD: is too simple': 'The password is too simple.', 'BAD PASSWORD: it is WAY too short': 'The password is too short.', 'Bad: new and old password are too similar': 'The password is too similar to the old one.', 'Bad: new and old password must differ by more than just case': 'The password is too similar to the old one.', 'Bad: new password cannot be a palindrome': 'The password is a palindrome.', 'Bad: new password is just a wrapped version of the old one': 'The password is too similar to the old one.', 'Bad: new password is too simple': 'The password is too simple.', 'Bad: new password must be different than the old one': 'The password was already used.', 'Error: Password does not meet complexity requirements': 'The password is too simple.', 'Insufficient Password Quality': 'The password is too simple.', 'Password Insufficient': 'The password is too simple.', 'Password Too Young': 'The minimum password age is not reached yet.', 'Password already used': 'The password was already used.', 'Password change rejected, password changes may not be permitted on this account, or the minimum password age may not have elapsed.': 'The minimum password age is not reached yet.', 'Password contains parts of the full user name.': 'The password contains parts of the full user name.', 'Password contains user account name.': 'The password contains user account name.', 'Password does not meet complexity requirements': 'The password is too simple.', 'Password does not meet the password complexity requirements.': 'The password does not meet the password complexity requirements.', 'Password has been already used. Choose another.': 'The password was already used.', 'Password has been already used.': 'The password was already used.', 'Password is too short': 'The password is too short.', 'Passwort nicht geändert': 'The password was already used.', 'Schlechtes Passwort: Es basiert auf einem (umgekehrten) W?rterbucheintrag': 'The password is based on a dictionary word.', 'Schlechtes Passwort: Es basiert auf einem (umgekehrten) Wörterbucheintrag': 'The password is based on a dictionary word.', 'Schlechtes Passwort: Es basiert auf einem W?rterbucheintrag': 'The password is based on a dictionary word.', 'Schlechtes Passwort: Es basiert auf einem Wörterbucheintrag': 'The password is based on a dictionary word.', 'Schlechtes Passwort: Es ist VIEL zu kurz': 'The password is too short.', 'Schlechtes Passwort: Es ist zu kurz': 'The password is too short.', 'Schlechtes Passwort: ist dem alten zu ?hnlich': 'The password is too similar to the old one.', 'Schlechtes Passwort: ist dem alten zu ähnlich': 'The password is too similar to the old one.', 'Schlechtes Passwort: ist ein Palindrome': 'The password is a palindrome.', 'Schlechtes Passwort: ist zu einfach': 'The password is too simple.', 'Schlechtes Passwort: wurde gedreht': 'The password is a palindrome.', 'Sie müssen ein kürzeres Passwort wählen.': 'The password is too long.', 'Unable to reach any changepw server in realm %s': 'Make sure the kerberos service is functioning or inform an Administrator.', 'You must choose a longer passwordPassword Too Short': 'The password is too short.', 'You must choose a shorter password.': 'The password is too long.', 'You must wait longer to change your password': 'The minimum password age is not reached yet.', 'case changes only': 'The password is too similar to the old one.', 'contains too long of a monotonic character sequence': 'The password does not contain enough different characters.', 'contains too many same characters consecutively': 'The password does not contain enough different characters.', 'is a palindrome': 'The password is a palindrome.', 'is rotated': 'The password was already used.', 'is the same as the old one': 'The password was already used.', 'is too similar to the old one': 'The password is too similar to the old one.', 'is too simple': 'The password is too simple.', 'not enough character classes': 'The password does not contain enough different characters.', 'password unchanged': 'The password was already used.', re.compile('Password is already in password history. New password must not match any of your (?P<history>\\d+) previous passwords.', re.IGNORECASE): 'The password was already used.', re.compile('Password too short, password must be at least (?P<minlen>\\d+) characters long.', re.IGNORECASE): 'The password is too short.', re.compile('^Password is already in password history$'): 'The password was already used.', re.compile('^Password too short$'): 'The password is too short.'}#
univention.management.console.resource module#
- class univention.management.console.resource.Resource(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
RequestHandlerBase class for every UMC resource
- requires_authentication = True#
- ignore_session_timeout_reset = False#
- set_default_headers()[source]#
Override this to set HTTP headers at the beginning of the request.
For example, this is the place to set a custom
Serverheader. Note that setting such headers in the normal flow of request processing may not do what you want, since headers may be reset during error handling.
- async prepare()[source]#
Called at the beginning of a request before get/post/etc.
Override this method to perform common initialization regardless of the request method.
Asynchronous support: Use
async defor decorate this method with .gen.coroutine to make it asynchronous. If this method returns anAwaitableexecution will not proceed until theAwaitableis done.Added in version 3.1: Asynchronous support.
- get_current_user()[source]#
Override to determine the current user from, e.g., a cookie.
This method may not be a coroutine.
- get_user_locale()[source]#
Override to determine the locale from the authenticated user.
If None is returned, we fall back to get_browser_locale().
This method should return a tornado.locale.Locale object, most likely obtained via a call like
tornado.locale.get("en")
- get_cookie(name, default=None)[source]#
Returns the value of the request cookie with the given name.
If the named cookie is not present, returns
default.This method only returns cookies that were present in the request. It does not see the outgoing cookies set by set_cookie in this handler.
- get_ip_address()[source]#
get the IP address of client by last entry (from apache) in X-FORWARDED-FOR header
- property lo#
- write_error(status_code, **kwargs)[source]#
Override to implement custom error pages.
write_errormay call write, render, set_header, etc to produce output as usual.If this error was caused by an uncaught exception (including HTTPError), an
exc_infotriple will be available askwargs["exc_info"]. Note that this exception may not be the “current” exception for purposes of methods likesys.exc_info()ortraceback.format_exc.
univention.management.console.resources module#
Implements several helper classes to handle the state of a session and the communication with the module processes
- class univention.management.console.resources.ModuleProcess(module, debug='0', locale=None, no_daemonize_module_processes=False)[source]#
Bases:
_ModuleConnectionhandles the communication with a UMC module process
- Parameters:
- class univention.management.console.resources.ModuleProxy(proxy_address, unix_socket=None)[source]#
Bases:
_ModuleConnection
- class univention.management.console.resources.Index(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceRedirect to correct path when bypassing gateway
- post()#
- class univention.management.console.resources.Logout(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceLogout a user
- requires_authentication = False#
- ignore_session_timeout_reset = True#
- post(**kwargs)#
- class univention.management.console.resources.Nothing(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
Resource- requires_authentication = False#
- async prepare(*args, **kwargs)[source]#
Called at the beginning of a request before get/post/etc.
Override this method to perform common initialization regardless of the request method.
Asynchronous support: Use
async defor decorate this method with .gen.coroutine to make it asynchronous. If this method returns anAwaitableexecution will not proceed until theAwaitableis done.Added in version 3.1: Asynchronous support.
- class univention.management.console.resources.SessionInfo(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceGet information about the current session
- requires_authentication = False#
- ignore_session_timeout_reset = True#
- post()#
- class univention.management.console.resources.GetIPAddress(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceGet the most likely IP address of the client
- requires_authentication = False#
- property addresses#
- post()#
- class univention.management.console.resources.NewSession(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceDrop all information from the current session - like a relogin
- post()#
- class univention.management.console.resources.Auth(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceAuthenticate the user via PAM - either via plain password or via SAML message
- requires_authentication = False#
- get(*args, **kwargs)#
- class univention.management.console.resources.Modules(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceGet a list of available modules
- requires_authentication = False#
- async prepare()[source]#
Called at the beginning of a request before get/post/etc.
Override this method to perform common initialization regardless of the request method.
Asynchronous support: Use
async defor decorate this method with .gen.coroutine to make it asynchronous. If this method returns anAwaitableexecution will not proceed until theAwaitableis done.Added in version 3.1: Asynchronous support.
- post()#
- class univention.management.console.resources.Categories(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceGet a list of available categories
- requires_authentication = False#
- async prepare()[source]#
Called at the beginning of a request before get/post/etc.
Override this method to perform common initialization regardless of the request method.
Asynchronous support: Use
async defor decorate this method with .gen.coroutine to make it asynchronous. If this method returns anAwaitableexecution will not proceed until theAwaitableis done.Added in version 3.1: Asynchronous support.
- post()#
- class univention.management.console.resources.Upload(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceHandle generic file upload which is not targeted for any module
- class univention.management.console.resources.Command(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceGateway for command/upload requests to UMC module processes
- requires_authentication = False#
- async prepare(*args, **kwargs)[source]#
Called at the beginning of a request before get/post/etc.
Override this method to perform common initialization regardless of the request method.
Asynchronous support: Use
async defor decorate this method with .gen.coroutine to make it asynchronous. If this method returns anAwaitableexecution will not proceed until theAwaitableis done.Added in version 3.1: Asynchronous support.
- on_connection_close()[source]#
Called in async handlers if the client closed the connection.
Override this to clean up resources associated with long-lived connections. Note that this method is called only if the connection was closed during asynchronous processing; if you need to do cleanup after every request override on_finish instead.
Proxies may keep a connection open for a time (perhaps indefinitely) after the client has gone away, so this method may not be called promptly after the end user closes their connection.
- on_finish()[source]#
Called after the end of a request.
Override this method to perform cleanup, logging, etc. This method is a counterpart to prepare.
on_finishmay not produce any output, as it is called after the response has been sent to the client.
- async get(umcp_command, command)[source]#
Handles a COMMAND request. The request must contain a valid and known command that can be accessed by the current user. If access to the command is prohibited the request is answered as a forbidden command.
If there is no running module process for the given command a new one is started and the request is added to a queue of requests that will be passed on when the process is ready.
If a module process is already running the request is passed on and the inactivity timer is reset.
- async post(umcp_command, command)#
Handles a COMMAND request. The request must contain a valid and known command that can be accessed by the current user. If access to the command is prohibited the request is answered as a forbidden command.
If there is no running module process for the given command a new one is started and the request is added to a queue of requests that will be passed on when the process is ready.
If a module process is already running the request is passed on and the inactivity timer is reset.
- async put(umcp_command, command)#
Handles a COMMAND request. The request must contain a valid and known command that can be accessed by the current user. If access to the command is prohibited the request is answered as a forbidden command.
If there is no running module process for the given command a new one is started and the request is added to a queue of requests that will be passed on when the process is ready.
If a module process is already running the request is passed on and the inactivity timer is reset.
- async delete(umcp_command, command)#
Handles a COMMAND request. The request must contain a valid and known command that can be accessed by the current user. If access to the command is prohibited the request is answered as a forbidden command.
If there is no running module process for the given command a new one is started and the request is added to a queue of requests that will be passed on when the process is ready.
If a module process is already running the request is passed on and the inactivity timer is reset.
- async patch(umcp_command, command)#
Handles a COMMAND request. The request must contain a valid and known command that can be accessed by the current user. If access to the command is prohibited the request is answered as a forbidden command.
If there is no running module process for the given command a new one is started and the request is added to a queue of requests that will be passed on when the process is ready.
If a module process is already running the request is passed on and the inactivity timer is reset.
- async options(umcp_command, command)#
Handles a COMMAND request. The request must contain a valid and known command that can be accessed by the current user. If access to the command is prohibited the request is answered as a forbidden command.
If there is no running module process for the given command a new one is started and the request is added to a queue of requests that will be passed on when the process is ready.
If a module process is already running the request is passed on and the inactivity timer is reset.
- class univention.management.console.resources.UCR(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceGet UCR Variables matching a pattern
- post(*args, **kwargs)#
- class univention.management.console.resources.Meta(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceGet Metainformation about the environment
- requires_authentication = False#
- META_JSON_PATH = '/var/www/univention/meta.json'#
- META_UCR_VARS = ['domainname', 'hostname', 'ldap/master', 'license/base', 'server/role', 'ssl/validity/host', 'ssl/validity/root', 'ssl/validity/warning', 'umc/web/favorites/default', 'umc/web/piwik', 'update/available', 'update/reboot/required', 'uuid/license', 'uuid/system', 'version/erratalevel', 'version/patchlevel', 'version/releasename', 'version/version']#
- post()#
- class univention.management.console.resources.Info(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceGet UCS and UMC version number and SSL validity
- CHANGELOG_VERSION = re.compile('^[^(]*\\(([^)]*)\\).*')#
- post()#
- class univention.management.console.resources.Hosts(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceList all directory nodes in the domain
- post()#
- class univention.management.console.resources.Set(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceGeneric set of locale, user preferences (favorites) or password
- ..deprecated:: 5.0
use specific pathes (“set/{password,locale,user/preferences}”) instead
- class univention.management.console.resources.SetLocale(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceSet the locale for the session.
Deprecated since version 5.0: set language via Accept-Language HTTP header
- requires_authentication = False#
- class univention.management.console.resources.SetPassword(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceChange the password of the currently authenticated user
- class univention.management.console.resources.UserPreferences(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
Resourceget user specific preferences like favorites
- class univention.management.console.resources.SetUserPreferences(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
UserPreferencesset user specific preferences like favorites
- class univention.management.console.resources.SSELogoutNotifer(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
Resource- requires_authentication = True#
- wait_task = None#
- cancelled = True#
- on_connection_close()[source]#
Called in async handlers if the client closed the connection.
Override this to clean up resources associated with long-lived connections. Note that this method is called only if the connection was closed during asynchronous processing; if you need to do cleanup after every request override on_finish instead.
Proxies may keep a connection open for a time (perhaps indefinitely) after the client has gone away, so this method may not be called promptly after the end user closes their connection.
univention.management.console.saml module#
- class univention.management.console.saml.SAMLUser(response, message)[source]#
Bases:
objectSAML specific user information
- name_id#
- message#
- username#
- session_end_time#
- exception univention.management.console.saml.SamlError(_=<bound method NullTranslation.translate of <univention.lib.i18n.NullTranslation object>>)[source]#
Bases:
HTTPErrorErrors caused during SAML authentication
- class univention.management.console.saml.SAMLResource(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
ResourceBase class for all SAML resources
- requires_authentication = False#
- SP = None#
- configfile = '/usr/share/univention-management-console/saml/sp.py'#
- idp_query_param = 'IdpQuery'#
- bindings = ['urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact']#
- outstanding_queries = {}#
- class univention.management.console.saml.SamlMetadata(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
SAMLResourceGet the SAML XML Metadata
- class univention.management.console.saml.SamlACS(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
SAMLResourceSAML attribute consuming service (or Single Sign On redirection)
- property sp#
- async post()#
- create_authn_request(**kwargs)[source]#
Creates the SAML <AuthnRequest> request and returns the SAML binding and HTTP response.
Returns (binding, http-arguments)
- select_identity_provider()[source]#
Select an identity provider based on the available identity providers. If multiple IDP’s are set up the client might have specified one in the query string. Otherwise an error is raised where the user can choose one.
Returns the EntityID of the IDP.
- get_identity_provider_destination(entity_id)[source]#
Get the destination (with SAML binding) of the specified entity_id.
Returns (binding, destination-URI)
- class univention.management.console.saml.SamlIframeACS(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#
Bases:
SamlACSPassive SAML authentication via hidden iframe
- post()#
univention.management.console.server module#
- class univention.management.console.server.Application(**settings)[source]#
Bases:
ApplicationThe tornado application with all UMC resources
univention.management.console.session module#
- class univention.management.console.session.User[source]#
Bases:
objectInformation about the authenticated user
- ip#
- authenticated#
- username#
- password#
- auth_type#
- user_dn#
- object_id#
- session_end_time#
- roles#
- federated_account#
- class univention.management.console.session.Session(session_id)[source]#
Bases:
objectA interface to session data
- sessions = <univention.management.console.session_dict.SessionDict object>#
- classmethod expire(session_id, reload=True)[source]#
Removes a session when the connection to the UMC server has died or the session is expired
- session_id#
- user#
- saml#
- oidc#
- acls#
- processes#
- set_credentials(username, password, auth_type, object_id=None, roles=None, federated_account=False)[source]#
- property session_end_time#
- class univention.management.console.session.IACLs(session)[source]#
Bases:
objectInterface for UMC-ACL information
- property acls#
univention.management.console.session_db module#
- exception univention.management.console.session_db.PostgresListenNotifyUnsupported[source]#
Bases:
Exception
- class univention.management.console.session_db.PostgresListener(engine: Engine)[source]#
Bases:
object
- univention.management.console.session_db.get_session(auto_commit=True) Generator[Session, None, None][source]#
- class univention.management.console.session_db.DBSession(**kwargs)[source]#
Bases:
BaseA simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- session_id#
- expire_time#
- oidc_sid#
- oidc_sub#
- oidc_iss#
- sessions = {}#
univention.management.console.session_dict module#
univention.management.console.sse module#
univention.management.console.tools module#
- class univention.management.console.tools.JSON_Object[source]#
Bases:
objectConverts Python object into JSON compatible data structures. Types like lists, tuples and dictionary are converted directly. If none of these types matches the method tries to convert the attributes of the object and generate a dict to represent it.
- class univention.management.console.tools.JSON_List(iterable=(), /)[source]#
Bases:
list,JSON_Object
- class univention.management.console.tools.JSON_Dict[source]#
Bases:
dict,JSON_Object