Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion application/single_app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
EXECUTOR_TYPE = 'thread'
EXECUTOR_MAX_WORKERS = 30
SESSION_TYPE = 'filesystem'
VERSION = "0.250.066"
VERSION = "0.250.070"
IS_DEVELOPMENT = is_development_env_enabled()

SESSION_COOKIE_SAMESITE = os.getenv('SESSION_COOKIE_SAMESITE', 'Lax')
Expand Down
1,102 changes: 1,080 additions & 22 deletions application/single_app/functions_file_sync.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion application/single_app/functions_workspace_identities.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"general": "action",
}
WORKSPACE_IDENTITY_USAGE_SOURCE_TYPES = {
"file_sync": ["smb", "azure_files", "onedrive", "google_drive", "google_shared_drive"],
"file_sync": ["smb", "azure_files", "azure_blob", "onedrive", "google_drive", "google_shared_drive"],
"action": ["action"],
}
WORKSPACE_IDENTITY_USAGE_AUTH_TYPES = {
Expand Down
26 changes: 22 additions & 4 deletions application/single_app/route_backend_file_sync.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# route_backend_file_sync.py

import logging

from flask import jsonify, request

from functions_appinsights import log_event
from functions_authentication import admin_required, enabled_required, get_current_user_id, get_current_user_info, login_required, user_required
from functions_file_sync import (
FILE_SYNC_MANAGER_ROLES,
FILE_SYNC_SCOPE_GROUP,
FILE_SYNC_SCOPE_PERSONAL,
FILE_SYNC_SCOPE_PUBLIC,
FILE_SYNC_SOURCE_TYPE_SMB,
FileSyncPublicValidationError,
assert_public_workspace_role,
browse_file_sync_source_path,
create_file_sync_source,
Expand Down Expand Up @@ -116,13 +120,27 @@ def _serialize_public_workspace_target(workspace):
}

def _map_exception(error):
expected_error = isinstance(error, (PermissionError, LookupError, ValueError))
log_event(
"[FileSync] Request failed.",
level=logging.WARNING if expected_error else logging.ERROR,
extra={
"endpoint": request.endpoint or "",
"method": request.method,
"exception_type": type(error).__name__,
"error": str(error),
},
exceptionTraceback=not expected_error,
)
if isinstance(error, FileSyncPublicValidationError):
return _error(error.public_message, 400)
if isinstance(error, PermissionError):
return _error(str(error), 403)
return _error("You do not have permission to perform this File Sync operation.", 403)
if isinstance(error, LookupError):
return _error(str(error), 404)
return _error("The requested File Sync resource was not found.", 404)
if isinstance(error, ValueError):
return _error(str(error), 400)
return _error(str(error), 500)
return _error("The File Sync request could not be completed. Verify the source configuration and try again.", 400)
return _error("An unexpected error occurred while processing the File Sync request.", 500)

def _list_sources(scope_type, scope_id):
sources = [sanitize_file_sync_source(source) for source in list_file_sync_sources(scope_type, scope_id)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,7 @@ function getPublicDocumentSyncTypeConfig(doc) {
const sourceTypeMap = {
smb: { label: 'SMB', className: 'bg-primary text-white', title: 'Managed by File Sync from an SMB source.' },
azure_files: { label: 'Azure Files', className: 'bg-info text-dark', title: 'Managed by File Sync from Azure Files.' },
azure_blob: { label: 'Azure Blob', className: 'bg-info text-dark', title: 'Managed by File Sync from Azure Blob Storage.' },
m365sp: { label: 'M365SP', className: 'bg-info text-dark', title: 'Managed by File Sync from Microsoft 365 SharePoint.' },
m365_sp: { label: 'M365SP', className: 'bg-info text-dark', title: 'Managed by File Sync from Microsoft 365 SharePoint.' },
m365_sharepoint: { label: 'M365SP', className: 'bg-info text-dark', title: 'Managed by File Sync from Microsoft 365 SharePoint.' },
Expand Down
258 changes: 243 additions & 15 deletions application/single_app/static/js/workspace/workspace-file-sync.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ function initializeWorkspaceIdentityRoot(root) {
const capabilityConfigs = {
file_sync: {
label: 'File Sync',
help: 'Use this identity for File Sync sources, including SMB, Azure Files, and admin-approved cloud drive connectors.',
help: 'Use this identity for File Sync sources, including SMB, Azure Files, Azure Blob Storage, and admin-approved cloud drive connectors.',
provider: 'smb',
sourceTypes: ['smb', 'azure_files', 'onedrive', 'google_drive', 'google_shared_drive'],
sourceTypes: ['smb', 'azure_files', 'azure_blob', 'onedrive', 'google_drive', 'google_shared_drive'],
usageContexts: ['file_sync'],
authTypes: ['username_password', 'anonymous', 'managed_identity', 'client_secret', 'connection_string'],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function getDocumentSyncTypeConfig(doc) {
const sourceTypeMap = {
smb: { label: 'SMB', className: 'bg-primary text-white', title: 'Managed by File Sync from an SMB source.' },
azure_files: { label: 'Azure Files', className: 'bg-info text-dark', title: 'Managed by File Sync from Azure Files.' },
azure_blob: { label: 'Azure Blob', className: 'bg-info text-dark', title: 'Managed by File Sync from Azure Blob Storage.' },
m365sp: { label: 'M365SP', className: 'bg-info text-dark', title: 'Managed by File Sync from Microsoft 365 SharePoint.' },
m365_sp: { label: 'M365SP', className: 'bg-info text-dark', title: 'Managed by File Sync from Microsoft 365 SharePoint.' },
m365_sharepoint: { label: 'M365SP', className: 'bg-info text-dark', title: 'Managed by File Sync from Microsoft 365 SharePoint.' },
Expand Down
12 changes: 6 additions & 6 deletions application/single_app/support_menu_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,12 @@ def _latest_feature_card(feature_id, title, icon, summary, details, why, guidanc
),
_latest_feature_card(
'release_250_file_sync',
'File Sync for SMB and Azure Files',
'File Sync for Storage Sources',
'bi-arrow-repeat',
'File Sync can bring SMB share and Azure Files content into workspaces, with reusable identities and workflow triggers for automated refreshes.',
'File Sync can bring SMB, Azure Files, and Azure Blob Storage content into workspaces, with reusable identities and workflow triggers for automated refreshes.',
'Users can configure sync sources where enabled, use identities for credentials, review synced-document badges, and connect sync sources to workflows that run before or after file changes. Additional sync providers are planned for future releases.',
'This matters because workspace documents can stay closer to authoritative file shares instead of depending on repeated manual uploads.',
['Use Workspace > Sync to configure SMB or Azure Files sources when admins enable File Sync.', 'Use Workspace > Identities to reuse credentials for sync sources and actions.', 'Use workflows with File Sync triggers when analysis should run after synced content changes.'],
['Use Workspace > Sync to configure SMB, Azure Files, or Azure Blob Storage sources when admins enable File Sync.', 'Use Workspace > Identities to reuse credentials for sync sources and actions.', 'Use workflows with File Sync triggers when analysis should run after synced content changes.'],
actions=[{'label': 'Open Workspace Sync', 'description': 'Review sync sources and run history.', 'href': '/workspace?feature_action=file_sync', 'icon': 'bi-arrow-repeat', 'requires_settings': ['enable_user_workspace']}, {'label': 'Open Workspace Identities', 'description': 'Review reusable identities for sync and actions.', 'href': '/workspace#identities-tab', 'icon': 'bi-person-badge', 'requires_settings': ['enable_user_workspace']}],
image_label='File Sync',
),
Expand Down Expand Up @@ -525,10 +525,10 @@ def _latest_feature_card(feature_id, title, icon, summary, details, why, guidanc
'admin_release_250_file_sync',
'File Sync Administration',
'bi-arrow-repeat',
'Admins can enable File Sync, choose SMB and Azure Files source types, configure scope gates, limits, connector identities, and workflow integration.',
'File Sync administration controls which workspaces can sync files, which source types are available, whether app roles are required, and how identities are used for SMB and Azure Files credentials.',
'Admins can enable File Sync, choose SMB, Azure Files, and Azure Blob Storage source types, configure scope gates, limits, connector identities, and workflow integration.',
'File Sync administration controls which workspaces can sync files, which source types are available, whether app roles are required, and how identities are used for storage credentials.',
'This matters because synced ingestion needs tenant-level rollout controls before users connect shared file sources.',
['Screenshot idea: capture File Sync source-type availability and workspace scope controls.', 'Show SMB and Azure Files controls while noting more providers are planned.', 'Call out workflow triggers that can run when File Sync detects changes.'],
['Screenshot idea: capture File Sync source-type availability and workspace scope controls.', 'Show SMB, Azure Files, and Azure Blob Storage controls while noting more providers are planned.', 'Call out workflow triggers that can run when File Sync detects changes.'],
actions=[
{'label': 'Open File Sync', 'description': 'Review File Sync administration.', 'href': '#file-sync', 'admin_tab': '#file-sync', 'icon': 'bi-arrow-repeat'},
{'label': 'Open Global Identities', 'description': 'Review connector identities used by sync sources.', 'href': '#global-workspace-identities-root', 'admin_tab': '#workspace-identities', 'admin_section': 'global-workspace-identities-root', 'icon': 'bi-person-badge'},
Expand Down
7 changes: 7 additions & 0 deletions application/single_app/templates/admin_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -7312,6 +7312,13 @@ <h6 class="mb-2"><i class="bi bi-sliders me-2"></i>Visible Source Types</h6>
<div class="form-text">Available now.</div>
</div>
</div>
<div class="col-md-4">
<div class="form-check">
<input type="checkbox" class="form-check-input" id="file_sync_visible_source_type_azure_blob" name="file_sync_visible_source_types" value="azure_blob" {% if 'azure_blob' in file_sync_visible_source_types %}checked{% endif %}>
<label class="form-check-label" for="file_sync_visible_source_type_azure_blob">Azure Blob Storage</label>
<div class="form-text">Available now.</div>
</div>
</div>
<div class="col-md-4">
<div class="form-check">
<input type="checkbox" class="form-check-input" id="file_sync_visible_source_type_onedrive" value="onedrive" disabled>
Expand Down
1 change: 1 addition & 0 deletions application/single_app/templates/group_workspaces.html
Original file line number Diff line number Diff line change
Expand Up @@ -3798,6 +3798,7 @@ <h5 class="modal-title" id="workflowDeleteModalLabel">Delete Group Workflow</h5>
const sourceTypeMap = {
smb: { label: 'SMB', className: 'bg-primary text-white', title: 'Managed by File Sync from an SMB source.' },
azure_files: { label: 'Azure Files', className: 'bg-info text-dark', title: 'Managed by File Sync from Azure Files.' },
azure_blob: { label: 'Azure Blob', className: 'bg-info text-dark', title: 'Managed by File Sync from Azure Blob Storage.' },
m365sp: { label: 'M365SP', className: 'bg-info text-dark', title: 'Managed by File Sync from Microsoft 365 SharePoint.' },
m365_sp: { label: 'M365SP', className: 'bg-info text-dark', title: 'Managed by File Sync from Microsoft 365 SharePoint.' },
m365_sharepoint: { label: 'M365SP', className: 'bg-info text-dark', title: 'Managed by File Sync from Microsoft 365 SharePoint.' },
Expand Down
Loading
Loading