🔍 Code Extractor

Search Components

Full-Text: Fast keyword matching | Semantic: AI-powered understanding of intent (finds similar concepts)

Search Results for "security"

Found 50 matching component(s)

  • function create_audit_entry

    Creates an audit trail entry for document actions, logging user activity, document changes, and lifecycle events with fallback mechanisms.

    File: /tf/active/vicechatdev/document_controller_backup.py

    audit logging document-management compliance tracking
  • function evaluate_query

    Executes a Cypher query against a Neo4j database session and returns the first value from a single result record.

    File: /tf/active/vicechatdev/offline_docstore_multi_vice.py

    neo4j cypher database graph-database query-execution
  • function update_access_tokens

    Updates access control tokens for nodes in a Neo4j graph database by traversing relationships from token carrier nodes and storing accumulated access keys.

    File: /tf/active/vicechatdev/dbinit.py

    neo4j graph-database access-control security token-management
  • function test_mixed_previous_reports

    A test function that validates the DocumentExtractor's ability to extract text content from multiple file formats (TXT and Markdown) and combine them into a unified previous reports summary.

    File: /tf/active/vicechatdev/leexi/test_enhanced_reports.py

    testing document-extraction file-processing integration-test text-extraction
  • function allowed_file

    Validates whether a filename has an allowed file extension by checking if it contains a dot and if the extension (case-insensitive) exists in a predefined ALLOWED_EXTENSIONS collection.

    File: /tf/active/vicechatdev/leexi/app.py

    validation file-upload security flask file-extension
  • function validate_azure_client_secret

    Validates an Azure client secret by checking for placeholder values, minimum length requirements, and common invalid patterns.

    File: /tf/active/vicechatdev/SPFCsync/validate_config.py

    validation azure authentication configuration security
  • function login_required

    A Flask decorator that enforces authentication requirements on routes by checking for user session data and redirecting unauthenticated users to the login page.

    File: /tf/active/vicechatdev/docchat/app.py

    authentication decorator flask security session-management
  • function get_user_session_key

    Generates a user-specific session key by combining user ID and session ID when authentication is required, or returns just the session ID otherwise.

    File: /tf/active/vicechatdev/docchat/app.py

    session-management authentication user-session key-generation session-key
  • function get_current_user_id

    Retrieves the current logged-in user's ID from the Flask session, returning 'anonymous' if authentication is disabled or no user is logged in.

    File: /tf/active/vicechatdev/docchat/app.py

    authentication session-management user-identification flask access-control
  • function is_admin_user

    Checks if the currently authenticated user has administrator privileges by comparing their email against a hardcoded list of admin emails.

    File: /tf/active/vicechatdev/docchat/app.py

    authentication authorization rbac admin access-control
  • function login

    Flask route handler that renders the login page for user authentication, with support for Azure SSO integration and automatic redirection for authenticated users or when authentication is disabled.

    File: /tf/active/vicechatdev/docchat/app.py

    authentication login flask-route session-management azure-sso
  • function azure_callback

    OAuth 2.0 callback endpoint for Azure AD authentication that exchanges authorization codes for access tokens and establishes user sessions.

    File: /tf/active/vicechatdev/docchat/app.py

    oauth authentication azure-ad callback session-management
  • function logout

    Flask route handler that logs out the current user by clearing their session and redirecting them to either the login page or index page based on authentication requirements.

    File: /tf/active/vicechatdev/docchat/app.py

    authentication logout session-management flask-route user-management
  • function view_document

    Flask route handler that serves documents for in-browser viewing by accepting a file path as a query parameter, validating security constraints, and returning the file with appropriate MIME types and CORS headers.

    File: /tf/active/vicechatdev/docchat/app.py

    flask file-serving document-viewer security path-validation
  • function save_custom_instructions

    Flask API endpoint that saves custom instructions to a markdown file in a designated instructions directory with filename sanitization.

    File: /tf/active/vicechatdev/docchat/app.py

    flask api-endpoint file-operations rest-api file-saving
  • function load_custom_instructions

    Flask API endpoint that loads and returns the content of custom instruction files from a designated instructions directory with security validation.

    File: /tf/active/vicechatdev/docchat/app.py

    flask api-endpoint file-loading security path-traversal-prevention
  • function get_current_username

    Retrieves the current user's username from Flask-Login's current_user object or falls back to the Flask session, returning 'anonymous' if neither is available.

    File: /tf/active/vicechatdev/docchat/blueprint.py

    authentication flask user-management session flask-login
  • function upload_document

    Flask route handler that processes file uploads, saves them securely to disk, and indexes the document content for retrieval-augmented generation (RAG) search.

    File: /tf/active/vicechatdev/docchat/blueprint.py

    file-upload document-processing flask-route authentication RAG
  • function setup_azure_sso_v1

    Initializes and configures an Azure SSO (Single Sign-On) instance by loading credentials and settings from a configuration module.

    File: /tf/active/vicechatdev/docchat/auth/azure_auth.py

    azure sso authentication oauth azure-ad
  • function validate_azure_token_v1

    Validates an Azure AD token by parsing the JWT id_token and extracting user information such as user ID, email, name, and preferred username.

    File: /tf/active/vicechatdev/docchat/auth/azure_auth.py

    azure authentication jwt token-validation oauth
  • class DocumentProcessor

    A comprehensive document processing class that converts documents to PDF, adds audit trails, applies security features (watermarks, signatures, hashing), and optionally converts to PDF/A format with document protection.

    File: /tf/active/vicechatdev/document_auditor/src/document_processor.py

    document-processing pdf-generation audit-trail security watermarking
  • class HashGenerator

    A class that provides cryptographic hashing functionality for PDF documents, including hash generation, embedding, and verification for document integrity checking.

    File: /tf/active/vicechatdev/document_auditor/src/security/hash_generator.py

    cryptography hashing SHA-256 PDF document-integrity
  • class DocumentProtector

    A class that handles protecting PDF documents from editing by applying encryption and permission restrictions using pikepdf and PyMuPDF libraries.

    File: /tf/active/vicechatdev/document_auditor/src/security/document_protection.py

    pdf security encryption document-protection permissions
  • function is_authenticated

    Checks if a user is authenticated by verifying the presence of 'user' and 'access_token' keys in the Flask session object.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    authentication authorization session-management flask security
  • function require_auth_v1

    A Flask decorator that enforces authentication by checking if a user is authenticated before allowing access to a protected route, redirecting to login if not authenticated.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    authentication decorator flask authorization security
  • function get_user_email

    Retrieves the email address of the currently authenticated user from the Flask session object.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    flask session authentication user-management email
  • function auth_callback

    OAuth callback handler that processes Azure SSO authentication responses, exchanges authorization codes for access tokens, and establishes user sessions.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    oauth authentication azure-sso callback flask-route
  • function logout_v2

    Flask route handler that logs out the current user by clearing their session data and redirecting them to the login page.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    authentication logout session-management flask web-route
  • class ScriptExecutor

    A sandboxed Python script executor that safely runs user-provided Python code with timeout controls, security restrictions, and isolated execution environments for data analysis tasks.

    File: /tf/active/vicechatdev/vice_ai/script_executor.py

    sandbox script-execution security code-validation data-analysis
  • function auth_callback_v2

    Flask route handler that processes OAuth 2.0 callback from Azure AD, exchanges authorization code for access tokens, and establishes user session.

    File: /tf/active/vicechatdev/vice_ai/app.py

    oauth authentication azure-ad callback flask-route
  • function get_current_user

    Retrieves the current user's email from the Flask session if authenticated, otherwise returns 'anonymous'.

    File: /tf/active/vicechatdev/vice_ai/new_app.py

    authentication session-management user-identification flask web-application
  • function require_auth

    A decorator function that enforces authentication requirements on Flask route handlers by checking if a user is authenticated before allowing access to the decorated function.

    File: /tf/active/vicechatdev/vice_ai/new_app.py

    decorator authentication authorization flask security
  • function login_v1

    Flask route handler that manages user authentication by redirecting authenticated users to the index page, initiating Azure SSO login for production, or creating a development session for local testing.

    File: /tf/active/vicechatdev/vice_ai/new_app.py

    authentication login azure-sso flask-route session-management
  • function logout_v1

    Flask route handler that logs out the current user by clearing their session data and redirecting them to the login page.

    File: /tf/active/vicechatdev/vice_ai/new_app.py

    authentication logout session-management flask-route web-security
  • function auth_callback_v1

    OAuth2 callback handler for Azure SSO authentication that processes authorization codes, exchanges them for access tokens, and establishes user sessions.

    File: /tf/active/vicechatdev/vice_ai/new_app.py

    authentication oauth2 azure-sso callback session-management
  • function revert_document_to_version

    Flask API endpoint that reverts a document to a specific previous version after verifying user ownership and authentication.

    File: /tf/active/vicechatdev/vice_ai/new_app.py

    flask api-endpoint document-management version-control authentication
  • function api_upload_document_v1

    Flask API endpoint that handles document file uploads, validates file type and size, stores the file temporarily, and extracts basic text content for processing.

    File: /tf/active/vicechatdev/vice_ai/new_app.py

    file-upload document-processing api-endpoint flask validation
  • function smartstat_save_to_document

    Flask route handler that saves SmartStat statistical analysis results back to a data section document, generating a final report with queries, results, and plots.

    File: /tf/active/vicechatdev/vice_ai/new_app.py

    flask api-endpoint smartstat statistical-analysis document-management
  • class ProductionConfig

    ProductionConfig is a configuration class that inherits from Config and sets production-specific settings with debugging and testing disabled.

    File: /tf/active/vicechatdev/vice_ai/smartstat_config.py

    configuration production settings deployment environment
  • function process_auth_code

    Processes OAuth authorization codes from POST requests, exchanges them for access tokens via Azure SSO, and authenticates users into the application.

    File: /tf/active/vicechatdev/CDocs/main.py

    authentication oauth azure-sso authorization-code token-exchange
  • class SSOCallbackHandler

    A Tornado RequestHandler that processes OAuth 2.0 callbacks from Azure AD, exchanges authorization codes for access tokens, validates user identity, and sets authentication cookies for SSO integration.

    File: /tf/active/vicechatdev/CDocs/sso_plugin.py

    oauth azure-ad sso authentication tornado
  • class Permission

    A constants class that defines permission type strings for a document management and review system.

    File: /tf/active/vicechatdev/CDocs/config/permission_types.py

    permissions constants access-control authorization rbac
  • function user_has_permission

    Validates whether a user has one or more specified permissions based on their assigned roles and a role-permission mapping configuration.

    File: /tf/active/vicechatdev/CDocs/config/permissions.py

    authorization permissions RBAC role-based-access-control security
  • function get_user_permissions

    Retrieves all permissions for a user by aggregating permissions from their assigned roles, with fallback to default USER role permissions.

    File: /tf/active/vicechatdev/CDocs/config/permissions.py

    authorization permissions rbac role-based-access-control security
  • function check_document_permission

    Validates whether a user has specific permission(s) to access or modify a document based on their roles, ownership status, and configured role permissions.

    File: /tf/active/vicechatdev/CDocs/config/permissions.py

    authorization permissions RBAC access-control document-management
  • function user_has_permission_for_resource

    Checks if a user has a specific permission for a resource, considering both general permissions and resource-specific ownership/creator rights.

    File: /tf/active/vicechatdev/CDocs/config/permissions.py

    authorization permissions access-control security resource-ownership
  • class AzureSSO_v2

    A class that handles Azure Active Directory (Azure AD) Single Sign-On (SSO) authentication using OAuth 2.0 authorization code flow.

    File: /tf/active/vicechatdev/CDocs/auth/azure_auth.py

    authentication azure azure-ad sso oauth2
  • function setup_azure_sso

    Initializes and configures an Azure SSO (Single Sign-On) instance by retrieving credentials from environment variables or settings, with fallback to MS365 configuration values.

    File: /tf/active/vicechatdev/CDocs/auth/azure_auth.py

    authentication azure sso oauth2 active-directory
  • function validate_azure_token

    Validates an Azure AD token by decoding the JWT id_token and extracting user information such as email, name, and object ID.

    File: /tf/active/vicechatdev/CDocs/auth/azure_auth.py

    azure authentication jwt token-validation oauth2
  • class PermissionError

    Custom exception class that signals when a user attempts an action they lack permission to perform.

    File: /tf/active/vicechatdev/CDocs/controllers/admin_controller.py

    exception error-handling authorization permissions access-control

Search Examples