magpie.security =============== .. py:module:: magpie.security Attributes ---------- .. autoapisummary:: magpie.security.AUTHOMATIC_LOGGER magpie.security.LOGGER Functions --------- .. autoapisummary:: magpie.security.mask_credentials magpie.security.get_auth_config magpie.security.authomatic_setup magpie.security.authomatic_config magpie.security.get_providers Module Contents --------------- .. py:data:: AUTHOMATIC_LOGGER .. py:data:: LOGGER .. py:function:: mask_credentials(container: magpie.typedefs.JSON, redact: magpie.typedefs.Str = '[REDACTED]', flags: Optional[List[magpie.typedefs.Str]] = None, parent: Optional[magpie.typedefs.Str] = None) -> magpie.typedefs.JSON Masks away any credential matched against :paramref:`flags` recursively from JSON :paramref:`container`. Matched credential entries are replaced by :paramref:`redact`. List items are all replaced by the same :paramref:`redact` when their :paramref:`parent` field name is matched. :param container: JSON container to mask. If starting with a list on top-level, first level children will not be masked unless parent is provided. :param redact: string by which to replace flagged fields. :param flags: field names (partial matches) to flag for masking. :param parent: reference to contained elements if in a listing format rather than mapping. :return: masked credentials JSON container. .. py:function:: get_auth_config(container: magpie.typedefs.AnySettingsContainer) -> pyramid.config.Configurator Generates Magpie application configuration with all utilities required for security and access control. .. py:function:: authomatic_setup(request) .. py:function:: authomatic_config(request=None) .. py:function:: get_providers() -> magpie.typedefs.JSON