OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Implements the multi-state validators for OneDrive (#18582)
Marcello Rocha2220c8e4ca3c
diff --git a/app/models/oauth_client_token.rb b/app/models/oauth_client_token.rbindex 7bbbedaf660..78965079dcd 100644--- a/app/models/oauth_client_token.rb+++ b/app/models/oauth_client_token.rb@@ -37,4 +37,6 @@ class OAuthClientToken < ApplicationRecordvalidates :access_token, presence: truevalidates :refresh_token, presence: true++ scope :for_user_and_client, ->(user, client) { where(user:, oauth_client: client) }enddiff --git a/config/i18n-tasks.yml b/config/i18n-tasks.ymlindex ec807b9032b..0f414c55a72 100644--- a/config/i18n-tasks.yml+++ b/config/i18n-tasks.yml@@ -154,6 +154,7 @@ ignore_unused:- '*.permission_header_explanation'- 'storages.upsale.*'- 'services.*'+ - 'storages.health.connection_validation.one_drive.*'## Exclude these keys from the `i18n-tasks eq-base' report:# ignore_eq_base:diff --git a/modules/storages/app/common/storages/peripherals/connection_validators/base_connection_validator.rb b/modules/storages/app/common/storages/peripherals/connection_validators/base_connection_validator.rbnew file mode 100644index 00000000000..7846ee10823--- /dev/null+++ b/modules/storages/app/common/storages/peripherals/connection_validators/base_connection_validator.rb@@ -0,0 +1,63 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Storages+ module Peripherals+ module ConnectionValidators+ class BaseConnectionValidator+ class << self+ def validation_groups+ @validation_groups ||= {}+ end++ def register_group(group_name, klass, precondition: ->(*) { true })+ validation_groups[group_name] = { klass:, precondition: }+ end+ end++ def initialize(storage)+ @storage = storage+ end++ def call+ validation_groups.each_with_object(ValidatorResult.new) do |(key, group_metadata), result|+ if group_metadata[:precondition].call(@storage, result)+ result.add_group_result(key, group_metadata[:klass].call(@storage))+ end+ end+ end++ private++ def validation_groups = self.class.validation_groups+ end+ end+ end+enddiff --git a/modules/storages/app/common/storages/peripherals/connection_validators/base_validator_group.rb b/modules/storages/app/common/storages/peripherals/connection_validators/base_validator_group.rbindex 36e5501170a..d6e6c904cfe 100644--- a/modules/storages/app/common/storages/peripherals/connection_validators/base_validator_group.rb+++ b/modules/storages/app/common/storages/peripherals/connection_validators/base_validator_group.rb@@ -34,6 +34,10 @@ module Storagesclass BaseValidatorGroupinclude TaggedLogging+ def self.call(storage)+ new(storage).call+ end+def initialize(storage)@storage = storage@results = ValidationGroupResult.newdiff --git a/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/authentication_validator.rb b/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/authentication_validator.rbindex 511c53dceb0..07185f8b8f0 100644--- a/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/authentication_validator.rb+++ b/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/authentication_validator.rb@@ -52,7 +52,7 @@ module Storagesenddef oauth_token- if OAuthClientToken.where(user: @user, oauth_client: @storage.oauth_client).any?+ if OAuthClientToken.for_user_and_client(@user, @storage.oauth_client).exists?pass_check(:existing_token)elsewarn_check(:existing_token, message(:oauth_token_missing), halt_validation: true)diff --git a/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud_validator.rb b/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud_validator.rbindex 7c75def5754..20ec6c4e7ae 100644--- a/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud_validator.rb+++ b/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud_validator.rb@@ -31,41 +31,15 @@module Storagesmodule Peripheralsmodule ConnectionValidators- class NextcloudValidator- # Class Level interface will be moved to a superclass/mixin once we do the OneDrive port- class << self- def validation_groups- @validation_groups ||= {}- end-- def register_group(group_name, klass, when: ->(*) { true })- validation_groups[group_name] = { klass:, when: }- end- end+ class NextcloudValidator < BaseConnectionValidatorregister_group :base_configuration, Nextcloud::StorageConfigurationValidatorregister_group :authentication, Nextcloud::AuthenticationValidator,- when: ->(_, result) { result.group(:base_configuration).non_failure? }+ precondition: ->(_, result) { result.group(:base_configuration).non_failure? }register_group :ampf_configuration, Nextcloud::AmpfConfigurationValidator,- when: ->(storage, result) {+ precondition: ->(storage, result) {result.group(:base_configuration).non_failure? && storage.automatic_management_enabled?}-- def initialize(storage:)- @storage = storage- end-- def validate- validation_groups.each_with_object(ValidatorResult.new) do |(key, group_metadata), result|- if group_metadata[:when].call(@storage, result)- result.add_group_result(key, group_metadata[:klass].new(@storage).call)- end- end- end-- private-- def validation_groups = self.class.validation_groupsendendenddiff --git a/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator.rb b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator.rbnew file mode 100644index 00000000000..d6448d73895--- /dev/null+++ b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator.rb@@ -0,0 +1,104 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Storages+ module Peripherals+ module ConnectionValidators+ module OneDrive+ class AmpfConfigurationValidator < BaseValidatorGroup+ TEST_FOLDER_NAME = "ConnectionValidatorFolder"++ private++ def validate+ register_checks :client_folder_creation, :client_folder_removal, :drive_contents++ client_permissions+ unexpected_content+ end++ def unexpected_content+ unexpected_files = files_query.on_failure { fail_check(:drive_content, message(:unknown_error)) }+ .result.files.reject { managed_project_folder_ids.include?(it.id) }++ if unexpected_files.empty?+ pass_check(:drive_contents)+ else+ log_extraneous_files(unexpected_files)+ warn_check(:drive_contents, message("one_drive.unexpected_content"))+ end+ end++ # Testing setting permissions and checking permission inheritance would be great+ # but there are some challenges to it. We need to figure out a good way to go about this+ # 2025-04-08 @mereghost+ def client_permissions+ folder = create_folder.result+ delete_folder(folder)+ end++ def delete_folder(folder)+ Registry["one_drive.commands.delete_folder"]+ .call(storage: @storage, auth_strategy:, location: folder.id)+ .on_failure { fail_check(:client_folder_removal, message("one_drive.client_cant_delete_folder")) }+ .on_success { pass_check(:client_folder_removal) }+ end++ def create_folder+ Registry["one_drive.commands.create_folder"]+ .call(storage: @storage, auth_strategy:, folder_name: TEST_FOLDER_NAME, parent_location: ParentFolder.root)+ .on_success { pass_check(:client_folder_creation) }+ .on_failure do+ reason = it.result == :already_exists ? :existing_test_folder : :client_write_permission_missing++ fail_check(:client_folder_creation, message("one_drive.#{reason}", folder_name: TEST_FOLDER_NAME))+ end+ end++ def log_extraneous_files(unexpected_files)+ file_representation = unexpected_files.map do |file|+ "Name: #{file.name}, ID: #{file.id}, Location: #{file.location}"+ end++ warn "Unexpected files/folder found in group folder:\n\t#{file_representation.join("\n\t")}"+ end++ def managed_project_folder_ids+ @managed_project_folder_ids ||= ProjectStorage.automatic.where(storage: @storage)+ .pluck(:project_folder_id).to_set+ end++ def files_query = Registry["one_drive.queries.files"].call(storage: @storage, auth_strategy:, folder: ParentFolder.root)+ def auth_strategy = Registry["one_drive.authentication.userless"].call+ end+ end+ end+ end+enddiff --git a/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/authentication_validator.rb b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/authentication_validator.rbnew file mode 100644index 00000000000..17256dacaad--- /dev/null+++ b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/authentication_validator.rb@@ -0,0 +1,71 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Storages+ module Peripherals+ module ConnectionValidators+ module OneDrive+ class AuthenticationValidator < BaseValidatorGroup+ def initialize(storage)+ super+ @user = User.current+ end++ private++ def validate+ register_checks(:existing_token, :user_bound_request)++ oauth_token+ user_bound_request+ end++ def oauth_token+ if OAuthClientToken.for_user_and_client(@user, @storage.oauth_client).exists?+ pass_check(:existing_token)+ else+ warn_check(:existing_token, message(:oauth_token_missing), halt_validation: true)+ end+ end++ def user_bound_request+ Registry["one_drive.queries.user"].call(storage: @storage, auth_strategy:).on_failure do+ fail_check(:user_bound_request, message("oauth_request_#{it.result}"))+ end++ pass_check(:user_bound_request)+ end++ def auth_strategy = Registry["one_drive.authentication.user_bound"].call(storage: @storage, user: @user)+ end+ end+ end+ end+enddiff --git a/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator.rb b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator.rbnew file mode 100644index 00000000000..474f63d5b8e--- /dev/null+++ b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator.rb@@ -0,0 +1,141 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Storages+ module Peripherals+ module ConnectionValidators+ module OneDrive+ class StorageConfigurationValidator < BaseValidatorGroup+ using ServiceResultRefinements++ private++ def validate+ register_checks :storage_configured, :diagnostic_request, :tenant_id, :client_secret, :client_id,+ :drive_id_format, :drive_id_not_found++ storage_configuration_status+ diagnostic_request+ check_tenant_id+ check_client_secret+ check_client_id+ malformed_drive_id+ drive_not_found+ end++ def malformed_drive_id+ return pass_check(:drive_id_format) if query_result.success?++ if error_payload.dig(:error, :code) == "invalidRequest"+ fail_check(:drive_id_format, message("one_drive.drive_id_wrong"))+ else+ pass_check(:drive_id_format)+ end+ end++ def drive_not_found+ if query_result.result == :not_found+ fail_check(:drive_id_not_found, message("one_drive.drive_id_not_found"))+ else+ pass_check(:drive_id_not_found)+ end+ end++ def check_tenant_id+ return pass_check(:tenant_id) if query_result.success?++ tenant_id_regex = /tenant (?:identifier )?'#{@storage.tenant_id}' (?:not found|is neither)/i++ if error_payload[:error] == "invalid_request" && error_payload[:error_description].match?(tenant_id_regex)+ fail_check(:tenant_id, message(:tenant_id_wrong))+ else+ pass_check(:tenant_id)+ end+ end++ def check_client_id+ return pass_check(:client_id) if query_result.success?++ if error_payload[:error] == "unauthorized_client"+ fail_check(:client_id, message(:client_id_wrong))+ else+ pass_check(:client_id)+ end+ end++ def check_client_secret+ return pass_check(:client_secret) if query_result.success?++ if error_payload[:error] == "invalid_client"+ fail_check(:client_secret, message(:client_secret_wrong))+ else+ pass_check(:client_secret)+ end+ end++ def diagnostic_request+ if query_result.result == :error+ error "Connection validation failed with unknown error:\n" \+ "\tstorage: ##{@storage.id} #{@storage.name}\n" \+ "\tstatus: #{query_result.result}\n" \+ "\tresponse: #{query_result.error_payload}"++ fail_check(:diagnostic_request, message(:unknown_error))+ else+ pass_check :diagnostic_request+ end+ end++ def storage_configuration_status+ if @storage.configured?+ pass_check(:storage_configured)+ else+ fail_check(:storage_configured, message(:not_configured))+ end+ end++ def query_result+ @query_result ||= Registry.resolve("#{@storage}.queries.files")+ .call(storage: @storage, auth_strategy:, folder: ParentFolder.root)+ end++ def auth_strategy = Registry.resolve("one_drive.authentication.userless").call++ def error_payload+ return {} if query_result.success?+ return query_result.error_payload if query_result.error_payload.is_a?(Hash)++ @error_payload ||= MultiJson.load(query_result.error_payload, symbolize_keys: true)+ end+ end+ end+ end+ end+enddiff --git a/modules/storages/app/common/storages/peripherals/connection_validators/one_drive_validator.rb b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive_validator.rbnew file mode 100644index 00000000000..c280bae9085--- /dev/null+++ b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive_validator.rb@@ -0,0 +1,45 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Storages+ module Peripherals+ module ConnectionValidators+ class OneDriveValidator < BaseConnectionValidator+ register_group :base_configuration, OneDrive::StorageConfigurationValidator+ register_group :authentication, OneDrive::AuthenticationValidator,+ precondition: ->(_, result) { result.group(:base_configuration).non_failure? }+ register_group :ampf_configuration, OneDrive::AmpfConfigurationValidator,+ precondition: ->(storage, result) {+ result.group(:base_configuration).non_failure? && storage.automatic_management_enabled?+ }+ end+ end+ end+enddiff --git a/modules/storages/app/common/storages/peripherals/nextcloud_registry.rb b/modules/storages/app/common/storages/peripherals/nextcloud_registry.rbindex b03004d6b96..4ed520a72cd 100644--- a/modules/storages/app/common/storages/peripherals/nextcloud_registry.rb+++ b/modules/storages/app/common/storages/peripherals/nextcloud_registry.rb@@ -59,32 +59,36 @@ module Storagesnamespace("components") donamespace("forms") do- register(:automatically_managed_folders, ::Storages::Admin::Forms::AutomaticallyManagedProjectFoldersFormComponent)- register(:general_information, ::Storages::Admin::Forms::GeneralInfoFormComponent)- register(:storage_audience, ::Storages::Admin::Forms::StorageAudienceFormComponent)- register(:oauth_application, ::Storages::Admin::OAuthApplicationInfoCopyComponent)- register(:oauth_client, ::Storages::Admin::Forms::OAuthClientFormComponent)+ register(:automatically_managed_folders, Admin::Forms::AutomaticallyManagedProjectFoldersFormComponent)+ register(:general_information, Admin::Forms::GeneralInfoFormComponent)+ register(:storage_audience, Admin::Forms::StorageAudienceFormComponent)+ register(:oauth_application, Admin::OAuthApplicationInfoCopyComponent)+ register(:oauth_client, Admin::Forms::OAuthClientFormComponent)endregister(:setup_wizard, NextcloudStorageWizard)- register(:automatically_managed_folders, ::Storages::Admin::AutomaticallyManagedProjectFoldersInfoComponent)- register(:general_information, ::Storages::Admin::GeneralInfoComponent)- register(:storage_audience, ::Storages::Admin::StorageAudienceInfoComponent)- register(:oauth_application, ::Storages::Admin::OAuthApplicationInfoComponent)- register(:oauth_client, ::Storages::Admin::OAuthClientInfoComponent)+ register(:automatically_managed_folders, Admin::AutomaticallyManagedProjectFoldersInfoComponent)+ register(:general_information, Admin::GeneralInfoComponent)+ register(:storage_audience, Admin::StorageAudienceInfoComponent)+ register(:oauth_application, Admin::OAuthApplicationInfoComponent)+ register(:oauth_client, Admin::OAuthClientInfoComponent)endnamespace("contracts") do- register(:storage, ::Storages::Storages::NextcloudContract)- register(:general_information, ::Storages::Storages::NextcloudGeneralInformationContract)- register(:storage_audience, ::Storages::Storages::NextcloudAudienceContract)+ register(:storage, Storages::NextcloudContract)+ register(:general_information, Storages::NextcloudGeneralInformationContract)+ register(:storage_audience, Storages::NextcloudAudienceContract)endnamespace("models") doregister(:managed_folder_identifier, ManagedFolderIdentifier::Nextcloud)end+ namespace("validators") do+ register(:connection, ConnectionValidators::NextcloudValidator)+ end+namespace("authentication") doregister(:userless, StorageInteraction::AuthenticationStrategies::NextcloudStrategies::UserLess, call: false)register(:user_bound, StorageInteraction::AuthenticationStrategies::NextcloudStrategies::UserBound)diff --git a/modules/storages/app/common/storages/peripherals/one_drive_registry.rb b/modules/storages/app/common/storages/peripherals/one_drive_registry.rbindex 3e561d31c45..c50074e3109 100644--- a/modules/storages/app/common/storages/peripherals/one_drive_registry.rb+++ b/modules/storages/app/common/storages/peripherals/one_drive_registry.rb@@ -53,29 +53,33 @@ module Storagesnamespace("components") donamespace("forms") do- register(:access_management, ::Storages::Admin::Forms::AccessManagementFormComponent)- register(:general_information, ::Storages::Admin::Forms::GeneralInfoFormComponent)- register(:oauth_client, ::Storages::Admin::Forms::OAuthClientFormComponent)- register(:redirect_uri, ::Storages::Admin::Forms::RedirectUriFormComponent)+ register(:access_management, Admin::Forms::AccessManagementFormComponent)+ register(:general_information, Admin::Forms::GeneralInfoFormComponent)+ register(:oauth_client, Admin::Forms::OAuthClientFormComponent)+ register(:redirect_uri, Admin::Forms::RedirectUriFormComponent)endregister(:setup_wizard, OneDriveStorageWizard)- register(:access_management, ::Storages::Admin::AccessManagementComponent)- register(:general_information, ::Storages::Admin::GeneralInfoComponent)- register(:oauth_client, ::Storages::Admin::OAuthClientInfoComponent)- register(:redirect_uri, ::Storages::Admin::RedirectUriComponent)+ register(:access_management, Admin::AccessManagementComponent)+ register(:general_information, Admin::GeneralInfoComponent)+ register(:oauth_client, Admin::OAuthClientInfoComponent)+ register(:redirect_uri, Admin::RedirectUriComponent)endnamespace("contracts") do- register(:storage, ::Storages::Storages::OneDriveContract)- register(:general_information, ::Storages::Storages::OneDriveContract)+ register(:storage, Storages::OneDriveContract)+ register(:general_information, Storages::OneDriveContract)endnamespace("models") doregister(:managed_folder_identifier, ManagedFolderIdentifier::OneDrive)end+ namespace("validations") do+ register(:connection, ConnectionValidators::OneDriveValidator)+ end+namespace("authentication") doregister(:userless, StorageInteraction::AuthenticationStrategies::OneDriveStrategies::UserLess, call: false)register(:user_bound, StorageInteraction::AuthenticationStrategies::OneDriveStrategies::UserBound)diff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/authentication_strategies/strategy.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/authentication_strategies/strategy.rbindex fe8098ad1bf..0e2680a4758 100644--- a/modules/storages/app/common/storages/peripherals/storage_interaction/authentication_strategies/strategy.rb+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/authentication_strategies/strategy.rb@@ -56,6 +56,14 @@ module Storages@token = tokenselfend++ def ==(other)+ @key == other.key && @use_cache == other.use_cache && @user == other.user && @token == other.token+ end++ def hash+ [@key, @use_cache, @user, @token].hash+ endendendenddiff --git a/modules/storages/app/common/storages/peripherals/storage_parent_folder_extractor.rb b/modules/storages/app/common/storages/peripherals/storage_parent_folder_extractor.rbindex a5fe0f728cf..c8b2d8581ba 100644--- a/modules/storages/app/common/storages/peripherals/storage_parent_folder_extractor.rb+++ b/modules/storages/app/common/storages/peripherals/storage_parent_folder_extractor.rb@@ -33,6 +33,8 @@ module StoragesParentFolder = Data.define(:path) dodelegate :split, :empty?, to: :path+ def self.root = new("/")+def root?path == "/"enddiff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.ymlindex b444f8424dc..f8cb2c7a370 100644--- a/modules/storages/config/locales/en.yml+++ b/modules/storages/config/locales/en.yml@@ -251,6 +251,13 @@ en:oidc_cant_refresh_token: There was an error while trying to check your access to the storage. Please check the server logs for further information.oidc_non_oidc_user: The current user, while provisioned, wasn't provisioned by an OpenID Connect (OIDC) Identity Provider. Please re-run the check with an OIDC provisioned user.oidc_non_provisioned_user: The current user isn't provided by an OpenID Connect Identity Provider. Please re-run the check with a provided user.+ one_drive:+ client_cant_delete_folder: The client is having trouble deleting folders. Please check the setup documentation for your storage.+ client_write_permission_missing: The client seems to have write permissions missing. Please check the setup documentation for your storage.+ drive_id_not_found: The configured drive id could not be found. Please check the configuration.+ drive_id_wrong: The configured drive id seems invalid. Please check the configuration.+ existing_test_folder: The folder %{folder_name} needed for testing already exists. Please delete it and try again.+ unexpected_content: Unexpected content found in the drive.placeholder: Check your connection against the server.subtitle: Connection validationtenant_id_wrong: The configured directory (tenant) id is invalid. Please check the configuration.diff --git a/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud_connection_validator_spec.rb b/modules/storages/spec/common/storages/peripherals/connection_validators/base_connection_validator_spec.rbsimilarity index 57%rename from modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud_connection_validator_spec.rbrename to modules/storages/spec/common/storages/peripherals/connection_validators/base_connection_validator_spec.rbindex ebae600a5cb..5aaaaade745 100644--- a/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud_connection_validator_spec.rb+++ b/modules/storages/spec/common/storages/peripherals/connection_validators/base_connection_validator_spec.rb@@ -34,28 +34,43 @@ require_module_spec_helpermodule Storagesmodule Peripheralsmodule ConnectionValidators- RSpec.describe NextcloudValidator, :webmock do- it "does not run the AMPF tests if the storage is not automatically managed",- vcr: "nextcloud/capabilities_success" do- results = described_class.new(storage: create(:nextcloud_storage_with_local_connection)).validate+ class TestValidator < BaseConnectionValidator+ def self.reset_groups!+ @validation_groups = nil+ end+ end++ RSpec.describe BaseConnectionValidator, :webmock do+ let(:storage) { create(:nextcloud_storage_configured) }++ subject(:validator) { TestValidator.new(storage) }++ after { TestValidator.reset_groups! }++ it "returns a ValidationResult" do+ expect(validator.call).to be_a(ValidatorResult)+ end++ it "only runs a verification if the precondition evaluates as truthy" do+ test_group = class_spy(Nextcloud::StorageConfigurationValidator)+ TestValidator.register_group :test_group, test_group, precondition: ->(_, _) { false }- expect { results.group(:ampf_configuration) }.to raise_error(KeyError)+ result = validator.call+ expect(result).to be_empty+ expect(test_group).not_to have_received(:call)endit "aggregates all the results from the tests", vcr: "nextcloud/capabilities_success" do- results = described_class.new(storage: create(:nextcloud_storage_with_local_connection)).validate+ TestValidator.register_group :base_configuration, Nextcloud::StorageConfigurationValidator+ TestValidator.register_group :authentication, Nextcloud::AuthenticationValidator,+ precondition: ->(_, result) { result.group(:base_configuration).non_failure? }++ results = TestValidator.new(create(:nextcloud_storage_with_local_connection)).callexpect(results).to be_warningexpect(results.group(:base_configuration)).to be_successexpect(results.group(:authentication)).to be_warningend-- it "does not run any further tests if base configuration failed", vcr: "nextcloud/capabilities_invalid_data" do- results = described_class.new(storage: create(:nextcloud_storage_with_local_connection)).validate-- expect { results.group(:authentication) }.to raise_error(KeyError)- expect { results.group(:ampf_configuration) }.to raise_error(KeyError)- endendendenddiff --git a/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator_spec.rb b/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator_spec.rbnew file mode 100644index 00000000000..67f994a943b--- /dev/null+++ b/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator_spec.rb@@ -0,0 +1,118 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++require "spec_helper"+require_module_spec_helper++module Storages+ module Peripherals+ module ConnectionValidators+ module OneDrive+ RSpec.describe AmpfConfigurationValidator, :webmock do+ let(:storage) { create(:sharepoint_dev_drive_storage, :as_automatically_managed) }+ let(:auth_strategy) { Registry["one_drive.authentication.userless"].call }+ let(:folder_name) { described_class::TEST_FOLDER_NAME }++ subject(:validator) { described_class.new(storage) }++ it "returns a GroupValidationResult", vcr: "one_drive/validator_ampf_clean_run" do+ results = validator.call++ expect(results).to be_a(ValidationGroupResult)+ expect(results).to be_success+ end++ describe "possible error scenarios" do+ it "fails when there's unexpected folder and files in the drive", vcr: "one_drive/validator_extraneous_files" do+ results = validator.call++ expect(results[:drive_contents]).to be_a_warning+ expect(results[:drive_contents].message).to eq(I18n.t(i18n_key("one_drive.unexpected_content")))+ end++ it "fails when folders can't be created" do+ create_cmd = class_double(StorageInteraction::OneDrive::CreateFolderCommand)+ allow(create_cmd).to receive(:call)+ .with(storage:, auth_strategy:, folder_name:, parent_location: ParentFolder.root)+ .and_return(ServiceResult.failure)++ Registry.stub("one_drive.commands.create_folder", create_cmd)++ results = validator.call++ expect(results[:client_folder_creation]).to be_a_failure+ expect(results[:client_folder_creation].message)+ .to eq(I18n.t(i18n_key("one_drive.client_write_permission_missing")))+ end++ it "fails when the test folder already exists on the remote", vcr: "one_drive/validator_test_folder_already_exists" do+ Registry["one_drive.commands.create_folder"]+ .call(storage:, auth_strategy:, folder_name:, parent_location: ParentFolder.root)++ result = validator.call+ expect(result[:client_folder_creation]).to be_a_failure+ expect(result[:client_folder_creation].message)+ .to eq(I18n.t(i18n_key("one_drive.existing_test_folder"), folder_name:))+ ensure+ StorageInteraction::OneDrive::DeleteFolderCommand.call(storage:, auth_strategy:, location: created_folder)+ end++ it "fails when folders can't be deleted", vcr: "one_drive/validator_create_folder" do+ delete_cmd = class_double(StorageInteraction::OneDrive::DeleteFolderCommand)+ allow(delete_cmd).to receive(:call).with(storage:, auth_strategy:, location: /.+/)+ .and_return(ServiceResult.failure)++ Registry.stub("one_drive.commands.delete_folder", delete_cmd)++ results = validator.call++ expect(results[:client_folder_removal]).to be_a_failure+ expect(results[:client_folder_removal].message).to eq(I18n.t(i18n_key("one_drive.client_cant_delete_folder")))+ ensure+ StorageInteraction::OneDrive::DeleteFolderCommand.call(storage:, auth_strategy:, location: created_folder)+ end+ end++ private++ def created_folder+ Registry["one_drive.queries.files"].call(storage:, auth_strategy:, folder: ParentFolder.root).on_success do+ folder = it.result.files.detect { |file| file.name.include?(folder_name) }++ return folder.id+ end+ end++ def i18n_key(key) = "storages.health.connection_validation.#{key}"+ end+ end+ end+ end+enddiff --git a/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/authentication_validator_spec.rb b/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/authentication_validator_spec.rbnew file mode 100644index 00000000000..eea23f6958d--- /dev/null+++ b/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/authentication_validator_spec.rb@@ -0,0 +1,76 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++require "spec_helper"+require_module_spec_helper++module Storages+ module Peripherals+ module ConnectionValidators+ module OneDrive+ RSpec.describe AuthenticationValidator, :webmock do+ subject(:validator) { described_class.new(storage) }++ context "when using OAuth2" do+ let(:user) { create(:user) }+ let(:storage) { create(:sharepoint_dev_drive_storage, oauth_client_token_user: user) }++ before { User.current = user }++ it "passes when the user has a token and the request works", vcr: "one_drive/user_query_success" do+ expect(validator.call).to be_success+ end++ it "returns a warning when there's no token for the current user" do+ User.current = create(:user)+ result = validator.call++ expect(result[:existing_token]).to be_a_warning+ expect(result[:existing_token].message).to eq(I18n.t(i18n_key(:oauth_token_missing)))+ expect(result[:user_bound_request]).to be_skipped+ end++ it "returns a failure if the remote call failed" do+ Registry.stub("one_drive.queries.user", ->(_) { ServiceResult.failure(result: :unauthorized) })++ result = validator.call+ expect(result[:user_bound_request]).to be_a_failure+ expect(result[:user_bound_request].message).to eq(I18n.t(i18n_key(:oauth_request_unauthorized)))+ end+ end++ private++ def i18n_key(key) = "storages.health.connection_validation.#{key}"+ end+ end+ end+ end+enddiff --git a/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator_spec.rb b/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator_spec.rbnew file mode 100644index 00000000000..11a18dcba43--- /dev/null+++ b/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator_spec.rb@@ -0,0 +1,153 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++require "spec_helper"+require_module_spec_helper++module Storages+ module Peripherals+ module ConnectionValidators+ module OneDrive+ RSpec.describe StorageConfigurationValidator, :webmock do+ let(:storage) { create(:sharepoint_dev_drive_storage, :as_automatically_managed) }+ let(:auth_strategy) { Registry["one_drive.authentication.userless"].call }++ subject(:validator) { described_class.new(storage) }++ it "returns a GroupValidationResult", vcr: "one_drive/files_query_userless" do+ results = validator.call++ expect(results).to be_a(ValidationGroupResult)+ expect(results).to be_success+ end++ describe "possible error scenarios" do+ let(:files_double) { class_double(StorageInteraction::OneDrive::FilesQuery) }+ let(:result) { ServiceResult.success }++ before do+ allow(files_double).to receive(:call).with(storage:, auth_strategy:, folder: ParentFolder.root).and_return(result)+ end++ context "when the storage isn't configured" do+ let(:storage) { create(:one_drive_storage) }++ it "the check fails" do+ results = validator.call+ expect(results[:storage_configured]).to be_a_failure+ expect(results[:storage_configured].message).to eq(I18n.t(i18n_key(:not_configured)))+ end+ end++ context "when diagnostic request fails with an unhandled error" do+ let(:result) { ServiceResult.failure(result: :error, errors: StorageError.new(code: :error)) }++ before { Registry.stub("one_drive.queries.files", files_double) }++ it "the check fails" do+ results = validator.call++ expect(results[:diagnostic_request]).to be_a_failure+ expect(results[:diagnostic_request].message).to eq(I18n.t(i18n_key(:unknown_error)))+ end++ it "logs an error" do+ allow(Rails.logger).to receive(:error)+ validator.call++ expect(Rails.logger).to have_received(:error).with(/Connection validation failed with unknown/)+ end+ end++ context "when the tenant id is wrong" do+ it "but looks like an actual valid value", vcr: "one_drive/validation_wrong_tenant_id" do+ storage.tenant_id = "itdoesnotexists9000.sharepoint.com"+ results = described_class.new(storage).call++ expect(results[:tenant_id]).to be_a_failure+ expect(results[:tenant_id].message).to eq(I18n.t(i18n_key(:tenant_id_wrong)))+ end++ it "but is blatantly wrong", vcr: "one_drive/validation_absurd_tenant_id" do+ storage.tenant_id = "wrong"+ results = described_class.new(storage).call++ expect(results[:tenant_id]).to be_a_failure+ expect(results[:tenant_id].message).to eq(I18n.t(i18n_key(:tenant_id_wrong)))+ end+ end++ context "when the client secret is wrong" do+ it "fails the check", vcr: "one_drive/validation_wrong_client_secret" do+ storage.oauth_client.client_secret = "wrong"+ results = described_class.new(storage).call++ expect(results[:client_secret]).to be_a_failure+ expect(results[:client_secret].message).to eq(I18n.t(i18n_key(:client_secret_wrong)))+ end+ end++ context "when the client id is wrong" do+ it "fails the check", vcr: "one_drive/validation_wrong_client_id" do+ storage.oauth_client.client_id = "wrong"+ results = described_class.new(storage).call++ expect(results[:client_id]).to be_a_failure+ expect(results[:client_id].message).to eq(I18n.t(i18n_key(:client_id_wrong)))+ end+ end++ context "when the drive id is wrong" do+ it "fails when looks malformed", vcr: "one_drive/validation_drive_id_malformed" do+ storage.drive_id = "not-a-drive-id"+ results = described_class.new(storage).call++ expect(results[:drive_id_format]).to be_a_failure+ expect(results[:drive_id_format].message).to eq(I18n.t(i18n_key("one_drive.drive_id_wrong")))+ end++ it "fails when is not found", vcr: "one_drive/validation_drive_id_not_found" do+ storage.drive_id = "#{storage.drive_id[0..-2]}0"+ results = described_class.new(storage).call++ expect(results[:drive_id_not_found]).to be_a_failure+ expect(results[:drive_id_not_found].message).to eq(I18n.t(i18n_key("one_drive.drive_id_not_found")))+ end+ end+ end++ private++ def i18n_key(key) = "storages.health.connection_validation.#{key}"+ end+ end+ end+ end+enddiff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/files_query_userless.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/files_query_userless.ymlnew file mode 100644index 00000000000..f3baf965b52--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/files_query_userless.yml@@ -0,0 +1,114 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/4d44bf36-9b56-45c0-8807-bbf386dd047f/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff&client_secret=nB58Q%7EwWf6.4zUIojn2nzkrpzDWlkQtDSWPcLa6R+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - b50c2aba-1a4b-4915-a71e-b29d53290900+ X-Ms-Ests-Server:+ - 2.1.20393.4 - SEC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-3sWFN2meJ8S-bmklrr6Kbg'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AqVrum5XuR9KsQqo956mtLBRVKK0AQAAAG24hd8OAAAA; expires=Wed, 07-May-2025+ 12:13:34 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Mon, 07 Apr 2025 12:13:33 GMT+ Content-Length:+ - '1696'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Mon, 07 Apr 2025 12:13:34 GMT+- request:+ method: get+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children?$select=id,name,size,webUrl,lastModifiedBy,createdBy,fileSystemInfo,file,folder,parentReference+ body:+ encoding: US-ASCII+ string: ''+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false;+ charset=utf-8+ Content-Encoding:+ - gzip+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 9625a92b-e916-425f-b889-e4f0f06ec4e1+ Client-Request-Id:+ - 9625a92b-e916-425f-b889-e4f0f06ec4e1+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"FR2PEPF000001EE"}}'+ Date:+ - Mon, 07 Apr 2025 12:13:33 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#Collection(driveItem)","value":[{"@odata.etag":"\"{8DA9DCAF-43E4-419C-B52E-F1303A0D3372},1\"","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"id":"01ANJ53W5P3SUY3ZCDTRA3KLXRGA5A2M3S","lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"name":"data","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello+ VCR","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/data","fileSystemInfo":{"createdDateTime":"2025-04-07T12:02:26Z","lastModifiedDateTime":"2025-04-07T12:02:26Z"},"folder":{"childCount":0},"size":0},{"@odata.etag":"\"{992C5835-AA54-4B71-B3AF-197B1F4578E8},1\"","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"id":"01ANJ53WZVLAWJSVFKOFF3HLYZPMPUK6HI","lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"name":"simply_oidc.jpg","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello+ VCR","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/simply_oidc.jpg","file":{"hashes":{"quickXorHash":"qzqT/ZJgJnvhu77aF+2RcdH62Sc="},"mimeType":"image/jpeg"},"fileSystemInfo":{"createdDateTime":"2025-04-07T12:02:42Z","lastModifiedDateTime":"2025-04-07T12:02:42Z"},"size":56483}]}'+ recorded_at: Mon, 07 Apr 2025 12:13:34 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_absurd_tenant_id.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_absurd_tenant_id.ymlnew file mode 100644index 00000000000..32e26326194--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_absurd_tenant_id.yml@@ -0,0 +1,71 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/wrong/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff&client_secret=nB58Q%7EwWf6.4zUIojn2nzkrpzDWlkQtDSWPcLa6R+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 400+ message: Bad Request+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - 6d866228-7a7d-4c37-aedc-c219ccd99200+ X-Ms-Ests-Server:+ - 2.1.20393.4 - FRC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-ZuX_mRovdaFEsnx7JOyHtQ'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AkEOv7Godm1MpiXqOWOQa-U; expires=Wed, 07-May-2025 12:54:01 GMT; path=/;+ secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd; path=/; secure;+ samesite=none; httponly, stsservicecookie=estsfd; path=/; secure; samesite=none;+ httponly+ Date:+ - Mon, 07 Apr 2025 12:54:01 GMT+ Content-Length:+ - '519'+ body:+ encoding: UTF-8+ string: '{"error":"invalid_request","error_description":"AADSTS900023: Specified+ tenant identifier ''wrong'' is neither a valid DNS name, nor a valid external+ domain. Trace ID: 6d866228-7a7d-4c37-aedc-c219ccd99200 Correlation ID: eaa0b807-04e6-483b-bfaf-e88ab94a8089+ Timestamp: 2025-04-07 12:54:01Z","error_codes":[900023],"timestamp":"2025-04-07+ 12:54:01Z","trace_id":"6d866228-7a7d-4c37-aedc-c219ccd99200","correlation_id":"eaa0b807-04e6-483b-bfaf-e88ab94a8089","error_uri":"https://login.microsoftonline.com/error?code=900023"}'+ recorded_at: Mon, 07 Apr 2025 12:54:01 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_drive_id_malformed.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_drive_id_malformed.ymlnew file mode 100644index 00000000000..a5bd6d4b617--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_drive_id_malformed.yml@@ -0,0 +1,111 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/4d44bf36-9b56-45c0-8807-bbf386dd047f/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff&client_secret=nB58Q%7EwWf6.4zUIojn2nzkrpzDWlkQtDSWPcLa6R+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - 4baa8563-b8be-4599-9f6b-d4169d949d00+ X-Ms-Ests-Server:+ - 2.1.20393.4 - FRC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-ePygL8dNIpLEv2G4rO9RvA'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AoMQayjayslJnblHnzkv3xRRVKK0AQAAAFfQhd8OAAAA; expires=Wed, 07-May-2025+ 13:55:35 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Mon, 07 Apr 2025 13:55:34 GMT+ Content-Length:+ - '1696'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Mon, 07 Apr 2025 13:55:35 GMT+- request:+ method: get+ uri: https://graph.microsoft.com/v1.0/drives/not-a-drive-id/root/children?$select=id,name,size,webUrl,lastModifiedBy,createdBy,fileSystemInfo,file,folder,parentReference+ body:+ encoding: US-ASCII+ string: ''+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 400+ message: Bad Request+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false;+ charset=utf-8+ Content-Encoding:+ - gzip+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 6f836231-a3f9-4005-85a1-f4246c7e0746+ Client-Request-Id:+ - 6f836231-a3f9-4005-85a1-f4246c7e0746+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"004","RoleInstance":"FR2PEPF000003FC"}}'+ Date:+ - Mon, 07 Apr 2025 13:55:35 GMT+ body:+ encoding: UTF-8+ string: '{"error":{"code":"invalidRequest","message":"The provided drive id+ appears to be malformed, or does not represent a valid drive."}}'+ recorded_at: Mon, 07 Apr 2025 13:55:35 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_drive_id_not_found.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_drive_id_not_found.ymlnew file mode 100644index 00000000000..f8fc1b89e7b--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_drive_id_not_found.yml@@ -0,0 +1,109 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/4d44bf36-9b56-45c0-8807-bbf386dd047f/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff&client_secret=nB58Q%7EwWf6.4zUIojn2nzkrpzDWlkQtDSWPcLa6R+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - 5c707cf2-ee49-40ea-9f3a-12135a310400+ X-Ms-Ests-Server:+ - 2.1.20465.4 - SEC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-IKAIoxsi5jE7daVt7_RV1g'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=Atm5OoxKOcJEm_fG2VtSgv5RVKK0AQAAAL_yhd8OAAAA; expires=Wed, 07-May-2025+ 16:22:23 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Mon, 07 Apr 2025 16:22:23 GMT+ Content-Length:+ - '1696'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Mon, 07 Apr 2025 16:22:23 GMT+- request:+ method: get+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPX0/root/children?$select=id,name,size,webUrl,lastModifiedBy,createdBy,fileSystemInfo,file,folder,parentReference+ body:+ encoding: US-ASCII+ string: ''+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 404+ message: Not Found+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json; charset=utf-8+ Content-Encoding:+ - gzip+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - '01824623-0f82-4e02-b56b-91e7db164c27'+ Client-Request-Id:+ - '01824623-0f82-4e02-b56b-91e7db164c27'+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"UK South","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"LN2PEPF000114D0"}}'+ Date:+ - Mon, 07 Apr 2025 16:22:23 GMT+ body:+ encoding: UTF-8+ string: '{"error":{"code":"itemNotFound","message":"Item not found"}}'+ recorded_at: Mon, 07 Apr 2025 16:22:24 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_wrong_client_id.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_wrong_client_id.ymlnew file mode 100644index 00000000000..5acf4d9239e--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_wrong_client_id.yml@@ -0,0 +1,73 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/4d44bf36-9b56-45c0-8807-bbf386dd047f/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=wrong&client_secret=nB58Q%7EwWf6.4zUIojn2nzkrpzDWlkQtDSWPcLa6R+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '168'+ response:+ status:+ code: 400+ message: Bad Request+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - 65abb2e7-9ea0-4b11-ba8a-2e2bfcec4200+ X-Ms-Ests-Server:+ - 2.1.20465.4 - WEULR1 ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-ewwu91fb4gwQqBkjUr57Yg'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AlOcQyq-LSdKqIifcwNWuRRkaFwcAQAAAEbJhd8OAAAA; expires=Wed, 07-May-2025+ 13:25:27 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Mon, 07 Apr 2025 13:25:27 GMT+ Content-Length:+ - '707'+ body:+ encoding: UTF-8+ string: '{"error":"unauthorized_client","error_description":"AADSTS700016: Application+ with identifier ''wrong'' was not found in the directory ''MSFT''. This can+ happen if the application has not been installed by the administrator of the+ tenant or consented to by any user in the tenant. You may have sent your authentication+ request to the wrong tenant. Trace ID: 65abb2e7-9ea0-4b11-ba8a-2e2bfcec4200+ Correlation ID: 194e4908-91a7-440c-947d-bf5faf49403f Timestamp: 2025-04-07+ 13:25:27Z","error_codes":[700016],"timestamp":"2025-04-07 13:25:27Z","trace_id":"65abb2e7-9ea0-4b11-ba8a-2e2bfcec4200","correlation_id":"194e4908-91a7-440c-947d-bf5faf49403f","error_uri":"https://login.microsoftonline.com/error?code=700016"}'+ recorded_at: Mon, 07 Apr 2025 13:25:27 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_wrong_client_secret.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_wrong_client_secret.ymlnew file mode 100644index 00000000000..4f7bdd9cb57--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_wrong_client_secret.yml@@ -0,0 +1,72 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/4d44bf36-9b56-45c0-8807-bbf386dd047f/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff&client_secret=wrong+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '162'+ response:+ status:+ code: 401+ message: Unauthorized+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - a6f0383f-bbcb-48f5-a08d-36a574b40d00+ X-Ms-Ests-Server:+ - 2.1.20465.4 - WEULR1 ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-qNTRKH43OU5V1dsSJzZDuQ'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AsH2DTOUkrFPnjpcckwANXxRVKK0AQAAAMnIhd8OAAAA; expires=Wed, 07-May-2025+ 13:23:21 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Mon, 07 Apr 2025 13:23:21 GMT+ Content-Length:+ - '623'+ body:+ encoding: UTF-8+ string: '{"error":"invalid_client","error_description":"AADSTS7000215: Invalid+ client secret provided. Ensure the secret being sent in the request is the+ client secret value, not the client secret ID, for a secret added to app ''b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff''.+ Trace ID: a6f0383f-bbcb-48f5-a08d-36a574b40d00 Correlation ID: 80ce0729-9980-4683-a4f8-39cfd3e9c96c+ Timestamp: 2025-04-07 13:23:21Z","error_codes":[7000215],"timestamp":"2025-04-07+ 13:23:21Z","trace_id":"a6f0383f-bbcb-48f5-a08d-36a574b40d00","correlation_id":"80ce0729-9980-4683-a4f8-39cfd3e9c96c","error_uri":"https://login.microsoftonline.com/error?code=7000215"}'+ recorded_at: Mon, 07 Apr 2025 13:23:21 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_wrong_tenant_id.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_wrong_tenant_id.ymlnew file mode 100644index 00000000000..7c908f6f820--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validation_wrong_tenant_id.yml@@ -0,0 +1,73 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/itdoesnotexists9000.sharepoint.com/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff&client_secret=nB58Q%7EwWf6.4zUIojn2nzkrpzDWlkQtDSWPcLa6R+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 400+ message: Bad Request+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - 2a8d5b96-aa99-443e-a69e-03f02c2e4c00+ X-Ms-Ests-Server:+ - 2.1.20465.4 - NEULR1 ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-9cTLDpFlQVtcJ6DtcOmi3g'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AscnkNupYDJFowKyY6L32lERw07PAQAAAI29hd8OAAAA; expires=Wed, 07-May-2025+ 12:35:26 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Mon, 07 Apr 2025 12:35:26 GMT+ Content-Length:+ - '680'+ body:+ encoding: UTF-8+ string: '{"error":"invalid_request","error_description":"AADSTS90002: Tenant+ ''itdoesnotexists9000.sharepoint.com'' not found. Check to make sure you have+ the correct tenant ID and are signing into the correct cloud. Check with your+ subscription administrator, this may happen if there are no active subscriptions+ for the tenant. Trace ID: 2a8d5b96-aa99-443e-a69e-03f02c2e4c00 Correlation+ ID: a1e47b18-9902-42ed-bb50-6478c5aa98cd Timestamp: 2025-04-07 12:35:26Z","error_codes":[90002],"timestamp":"2025-04-07+ 12:35:26Z","trace_id":"2a8d5b96-aa99-443e-a69e-03f02c2e4c00","correlation_id":"a1e47b18-9902-42ed-bb50-6478c5aa98cd","error_uri":"https://login.microsoftonline.com/error?code=90002"}'+ recorded_at: Mon, 07 Apr 2025 12:35:26 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_ampf_clean_run.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_ampf_clean_run.ymlnew file mode 100644index 00000000000..4fe63906717--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_ampf_clean_run.yml@@ -0,0 +1,240 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/4d44bf36-9b56-45c0-8807-bbf386dd047f/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff&client_secret=nB58Q%7EwWf6.4zUIojn2nzkrpzDWlkQtDSWPcLa6R+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - 75da94cc-f93b-4957-9472-7f69b50a0500+ X-Ms-Ests-Server:+ - 2.1.20465.4 - WEULR1 ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-EnkQImmzmdKVuOaBI_JV2w'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AufQETJp6LNOiwGffjFiBhtRVKK0AQAAAKMlh98OAAAA; expires=Thu, 08-May-2025+ 14:11:48 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Tue, 08 Apr 2025 14:11:48 GMT+ Content-Length:+ - '1695'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Tue, 08 Apr 2025 14:11:48 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children+ body:+ encoding: UTF-8+ string: '{"name":"ConnectionValidatorFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'+ headers:+ Content-Type:+ - application/json+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Length:+ - '91'+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 201+ message: Created+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8+ Content-Encoding:+ - gzip+ Etag:+ - '"{DB39CBFF-7643-4C26-801D-7C3E22B888BA},1"'+ Location:+ - https://ymt6d.sharepoint.com/_api/v2.0/drives('b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs')/items('root')/children('01ANJ53W77ZM45WQ3WEZGIAHL4HYRLRCF2')+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 7454b765-25ac-43f0-b1e2-9f4ae7122668+ Client-Request-Id:+ - 7454b765-25ac-43f0-b1e2-9f4ae7122668+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"FR1PEPF00001A2F"}}'+ Odata-Version:+ - '4.0'+ Date:+ - Tue, 08 Apr 2025 14:11:48 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8CfNaHr_0ERYs5kgmEWFrX'')/root/children/$entity","@odata.etag":"\"{DB39CBFF-7643-4C26-801D-7C3E22B888BA},1\"","createdDateTime":"2025-04-08T14:11:49Z","eTag":"\"{DB39CBFF-7643-4C26-801D-7C3E22B888BA},1\"","id":"01ANJ53W77ZM45WQ3WEZGIAHL4HYRLRCF2","lastModifiedDateTime":"2025-04-08T14:11:49Z","name":"ConnectionValidatorFolder","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20AMPF/ConnectionValidatorFolder","cTag":"\"c:{DB39CBFF-7643-4C26-801D-7C3E22B888BA},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP+ Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint+ App"}},"lastModifiedBy":{"application":{"displayName":"OP Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint+ App"}},"parentReference":{"driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","driveType":"documentLibrary","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","sharepointIds":{"listId":"87d67c02-fdaf-4504-8b39-920984585ad7","listItemUniqueId":"458e6945-3722-40b1-946f-4743a2d480f2","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff","siteUrl":"https://ymt6d.sharepoint.com/sites/OPTest","tenantId":"4d44bf36-9b56-45c0-8807-bbf386dd047f","webId":"6af246f0-e3be-45ef-b91a-8eca4dcc5d8f"}},"fileSystemInfo":{"createdDateTime":"2025-04-08T14:11:49Z","lastModifiedDateTime":"2025-04-08T14:11:49Z"},"folder":{"childCount":0,"view":{"sortBy":"name","sortOrder":"ascending","viewType":"thumbnails"}},"shared":{"scope":"unknown"}}'+ recorded_at: Tue, 08 Apr 2025 14:11:48 GMT+- request:+ method: delete+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/items/01ANJ53W77ZM45WQ3WEZGIAHL4HYRLRCF2+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 204+ message: No Content+ headers:+ Cache-Control:+ - no-store, no-cache+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 8458dc49-bea8-4d56-86ef-b519ef910600+ Client-Request-Id:+ - 8458dc49-bea8-4d56-86ef-b519ef910600+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"FR1PEPF000007A3"}}'+ Date:+ - Tue, 08 Apr 2025 14:11:49 GMT+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Tue, 08 Apr 2025 14:11:49 GMT+- request:+ method: get+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children?$select=id,name,size,webUrl,lastModifiedBy,createdBy,fileSystemInfo,file,folder,parentReference+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false;+ charset=utf-8+ Content-Encoding:+ - gzip+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 9f49a172-9d26-4a50-966d-fa5fe4911dff+ Client-Request-Id:+ - 9f49a172-9d26-4a50-966d-fa5fe4911dff+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"FR1PEPF0000149B"}}'+ Date:+ - Tue, 08 Apr 2025 14:11:48 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#Collection(driveItem)","value":[]}'+ recorded_at: Tue, 08 Apr 2025 14:11:49 GMT+- request:+ method: get+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root?$select=id,name,size,webUrl,lastModifiedBy,createdBy,fileSystemInfo,file,folder,parentReference+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false;+ charset=utf-8+ Content-Encoding:+ - gzip+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 2a8bae40-ed69-49f2-a9f9-1960a5cdf5b1+ Client-Request-Id:+ - 2a8bae40-ed69-49f2-a9f9-1960a5cdf5b1+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"FR1PEPF0000149B"}}'+ Date:+ - Tue, 08 Apr 2025 14:11:48 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#Collection(driveItem)/$entity","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"root","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20AMPF","fileSystemInfo":{"createdDateTime":"2025-04-07T12:03:17Z","lastModifiedDateTime":"2025-04-08T14:11:49Z"},"folder":{"childCount":0},"size":0}'+ recorded_at: Tue, 08 Apr 2025 14:11:49 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_create_folder.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_create_folder.ymlnew file mode 100644index 00000000000..e0549cc064c--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_create_folder.yml@@ -0,0 +1,208 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/4d44bf36-9b56-45c0-8807-bbf386dd047f/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff&client_secret=nB58Q%7EwWf6.4zUIojn2nzkrpzDWlkQtDSWPcLa6R+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - cc781a8e-8383-4c4e-8f6a-354c2bd91a00+ X-Ms-Ests-Server:+ - 2.1.20465.4 - SEC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-sfaLk_7kQLXPiWO9sEYnIw'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AsrHTiwxKD9KmuMnc_TQ-gtRVKK0AQAAAEwih98OAAAA; expires=Thu, 08-May-2025+ 13:57:33 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Tue, 08 Apr 2025 13:57:32 GMT+ Content-Length:+ - '1696'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Tue, 08 Apr 2025 13:57:33 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children+ body:+ encoding: UTF-8+ string: '{"name":"ConnectionValidatorFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'+ headers:+ Content-Type:+ - application/json+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Length:+ - '91'+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 201+ message: Created+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8+ Content-Encoding:+ - gzip+ Etag:+ - '"{33CB5CFC-6E8E-4B49-9503-9E79A62D07ED},1"'+ Location:+ - https://ymt6d.sharepoint.com/_api/v2.0/drives('b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs')/items('root')/children('01ANJ53W74LTFTHDTOJFFZKA46PGTC2B7N')+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 557973a9-0916-4420-b20c-cfe22c147f78+ Client-Request-Id:+ - 557973a9-0916-4420-b20c-cfe22c147f78+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"FR1PEPF00000C1C"}}'+ Odata-Version:+ - '4.0'+ Date:+ - Tue, 08 Apr 2025 13:57:33 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW'')/root/children/$entity","@odata.etag":"\"{33CB5CFC-6E8E-4B49-9503-9E79A62D07ED},1\"","createdDateTime":"2025-04-08T13:57:34Z","eTag":"\"{33CB5CFC-6E8E-4B49-9503-9E79A62D07ED},1\"","id":"01ANJ53W74LTFTHDTOJFFZKA46PGTC2B7N","lastModifiedDateTime":"2025-04-08T13:57:34Z","name":"ConnectionValidatorFolder","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/ConnectionValidatorFolder","cTag":"\"c:{33CB5CFC-6E8E-4B49-9503-9E79A62D07ED},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP+ Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint+ App"}},"lastModifiedBy":{"application":{"displayName":"OP Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint+ App"}},"parentReference":{"driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","driveType":"documentLibrary","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","sharepointIds":{"listId":"5ea9a363-3a24-4fab-b9ae-cef9a25a3156","listItemUniqueId":"6bc8b02c-f419-4bec-8531-be5b69948a7d","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff","siteUrl":"https://ymt6d.sharepoint.com/sites/OPTest","tenantId":"4d44bf36-9b56-45c0-8807-bbf386dd047f","webId":"6af246f0-e3be-45ef-b91a-8eca4dcc5d8f"}},"fileSystemInfo":{"createdDateTime":"2025-04-08T13:57:34Z","lastModifiedDateTime":"2025-04-08T13:57:34Z"},"folder":{"childCount":0,"view":{"sortBy":"name","sortOrder":"ascending","viewType":"thumbnails"}},"shared":{"scope":"unknown"}}'+ recorded_at: Tue, 08 Apr 2025 13:57:34 GMT+- request:+ method: get+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children?$select=id,name,size,webUrl,lastModifiedBy,createdBy,fileSystemInfo,file,folder,parentReference+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false;+ charset=utf-8+ Content-Encoding:+ - gzip+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - b9666e96-42f3-4c2f-abcc-03678ac30518+ Client-Request-Id:+ - b9666e96-42f3-4c2f-abcc-03678ac30518+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"FR1PEPF000007A8"}}'+ Date:+ - Tue, 08 Apr 2025 13:57:33 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#Collection(driveItem)","value":[{"@odata.etag":"\"{33CB5CFC-6E8E-4B49-9503-9E79A62D07ED},2\"","createdBy":{"application":{"id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff","displayName":"OP+ Auth"},"user":{"displayName":"SharePoint App"}},"id":"01ANJ53W74LTFTHDTOJFFZKA46PGTC2B7N","lastModifiedBy":{"application":{"id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff","displayName":"OP+ Auth"},"user":{"displayName":"SharePoint App"}},"name":"ConnectionValidatorFolder","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello+ VCR","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/ConnectionValidatorFolder","fileSystemInfo":{"createdDateTime":"2025-04-08T13:57:34Z","lastModifiedDateTime":"2025-04-08T13:57:34Z"},"folder":{"childCount":0},"size":0},{"@odata.etag":"\"{8DA9DCAF-43E4-419C-B52E-F1303A0D3372},1\"","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"id":"01ANJ53W5P3SUY3ZCDTRA3KLXRGA5A2M3S","lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"name":"data","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello+ VCR","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/data","fileSystemInfo":{"createdDateTime":"2025-04-07T12:02:26Z","lastModifiedDateTime":"2025-04-07T12:02:26Z"},"folder":{"childCount":0},"size":0},{"@odata.etag":"\"{992C5835-AA54-4B71-B3AF-197B1F4578E8},2\"","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"id":"01ANJ53WZVLAWJSVFKOFF3HLYZPMPUK6HI","lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"name":"simply_oidc.jpg","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello+ VCR","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/simply_oidc.jpg","file":{"hashes":{"quickXorHash":"qzqT/ZJgJnvhu77aF+2RcdH62Sc="},"mimeType":"image/jpeg"},"fileSystemInfo":{"createdDateTime":"2025-04-07T12:02:42Z","lastModifiedDateTime":"2025-04-07T12:02:42Z"},"size":56483}]}'+ recorded_at: Tue, 08 Apr 2025 13:57:34 GMT+- request:+ method: delete+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/items/01ANJ53W74LTFTHDTOJFFZKA46PGTC2B7N+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 204+ message: No Content+ headers:+ Cache-Control:+ - no-store, no-cache+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - b14d3091-56c0-4f21-9f7c-4ed0f4c7acc4+ Client-Request-Id:+ - b14d3091-56c0-4f21-9f7c-4ed0f4c7acc4+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"FR1PEPF0000107E"}}'+ Date:+ - Tue, 08 Apr 2025 13:57:33 GMT+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Tue, 08 Apr 2025 13:57:34 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_extraneous_files.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_extraneous_files.ymlnew file mode 100644index 00000000000..aec24c49724--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_extraneous_files.yml@@ -0,0 +1,205 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/4d44bf36-9b56-45c0-8807-bbf386dd047f/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff&client_secret=nB58Q%7EwWf6.4zUIojn2nzkrpzDWlkQtDSWPcLa6R+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - 176612aa-10fa-4904-9d12-085a28152100+ X-Ms-Ests-Server:+ - 2.1.20465.4 - NEULR1 ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-Zd8MbfrL29hkV1jA5397lg'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AkkUsDa-MSdNrojqp62cRydRVKK0AQAAAPIjh98OAAAA; expires=Thu, 08-May-2025+ 14:04:34 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Tue, 08 Apr 2025 14:04:34 GMT+ Content-Length:+ - '1701'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Tue, 08 Apr 2025 14:04:34 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children+ body:+ encoding: UTF-8+ string: '{"name":"ConnectionValidatorFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'+ headers:+ Content-Type:+ - application/json+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Length:+ - '91'+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 201+ message: Created+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8+ Content-Encoding:+ - gzip+ Etag:+ - '"{610A0BB0-1141-4B56-A0A3-15CB69398698},1"'+ Location:+ - https://ymt6d.sharepoint.com/_api/v2.0/drives('b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs')/items('root')/children('01ANJ53W5QBMFGCQIRKZF2BIYVZNUTTBUY')+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - c596ba9b-d722-46be-927e-123f12e0e946+ Client-Request-Id:+ - c596ba9b-d722-46be-927e-123f12e0e946+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"FR3PEPF00000AB6"}}'+ Odata-Version:+ - '4.0'+ Date:+ - Tue, 08 Apr 2025 14:04:34 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW'')/root/children/$entity","@odata.etag":"\"{610A0BB0-1141-4B56-A0A3-15CB69398698},1\"","createdDateTime":"2025-04-08T14:04:35Z","eTag":"\"{610A0BB0-1141-4B56-A0A3-15CB69398698},1\"","id":"01ANJ53W5QBMFGCQIRKZF2BIYVZNUTTBUY","lastModifiedDateTime":"2025-04-08T14:04:35Z","name":"ConnectionValidatorFolder","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/ConnectionValidatorFolder","cTag":"\"c:{610A0BB0-1141-4B56-A0A3-15CB69398698},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP+ Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint+ App"}},"lastModifiedBy":{"application":{"displayName":"OP Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint+ App"}},"parentReference":{"driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","driveType":"documentLibrary","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","sharepointIds":{"listId":"5ea9a363-3a24-4fab-b9ae-cef9a25a3156","listItemUniqueId":"6bc8b02c-f419-4bec-8531-be5b69948a7d","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff","siteUrl":"https://ymt6d.sharepoint.com/sites/OPTest","tenantId":"4d44bf36-9b56-45c0-8807-bbf386dd047f","webId":"6af246f0-e3be-45ef-b91a-8eca4dcc5d8f"}},"fileSystemInfo":{"createdDateTime":"2025-04-08T14:04:35Z","lastModifiedDateTime":"2025-04-08T14:04:35Z"},"folder":{"childCount":0,"view":{"sortBy":"name","sortOrder":"ascending","viewType":"thumbnails"}},"shared":{"scope":"unknown"}}'+ recorded_at: Tue, 08 Apr 2025 14:04:35 GMT+- request:+ method: delete+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/items/01ANJ53W5QBMFGCQIRKZF2BIYVZNUTTBUY+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 204+ message: No Content+ headers:+ Cache-Control:+ - no-store, no-cache+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - ae547ca3-7b02-4039-b9b4-3e2bc3f61816+ Client-Request-Id:+ - ae547ca3-7b02-4039-b9b4-3e2bc3f61816+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"FR3PEPF0000055B"}}'+ Date:+ - Tue, 08 Apr 2025 14:04:35 GMT+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Tue, 08 Apr 2025 14:04:35 GMT+- request:+ method: get+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children?$select=id,name,size,webUrl,lastModifiedBy,createdBy,fileSystemInfo,file,folder,parentReference+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false;+ charset=utf-8+ Content-Encoding:+ - gzip+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 67bed2c6-b993-4cbf-a597-5dc017c4285b+ Client-Request-Id:+ - 67bed2c6-b993-4cbf-a597-5dc017c4285b+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"FR3PEPF00000AB9"}}'+ Date:+ - Tue, 08 Apr 2025 14:04:35 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#Collection(driveItem)","value":[{"@odata.etag":"\"{8DA9DCAF-43E4-419C-B52E-F1303A0D3372},1\"","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"id":"01ANJ53W5P3SUY3ZCDTRA3KLXRGA5A2M3S","lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"name":"data","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello+ VCR","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/data","fileSystemInfo":{"createdDateTime":"2025-04-07T12:02:26Z","lastModifiedDateTime":"2025-04-07T12:02:26Z"},"folder":{"childCount":0},"size":0},{"@odata.etag":"\"{992C5835-AA54-4B71-B3AF-197B1F4578E8},2\"","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"id":"01ANJ53WZVLAWJSVFKOFF3HLYZPMPUK6HI","lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric+ Schubert"}},"name":"simply_oidc.jpg","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello+ VCR","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/simply_oidc.jpg","file":{"hashes":{"quickXorHash":"qzqT/ZJgJnvhu77aF+2RcdH62Sc="},"mimeType":"image/jpeg"},"fileSystemInfo":{"createdDateTime":"2025-04-07T12:02:42Z","lastModifiedDateTime":"2025-04-07T12:02:42Z"},"size":56483}]}'+ recorded_at: Tue, 08 Apr 2025 14:04:35 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_test_folder_already_exists.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_test_folder_already_exists.ymlnew file mode 100644index 00000000000..72b661cacff--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_test_folder_already_exists.yml@@ -0,0 +1,248 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/4d44bf36-9b56-45c0-8807-bbf386dd047f/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff&client_secret=nB58Q%7EwWf6.4zUIojn2nzkrpzDWlkQtDSWPcLa6R+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - 61d16d60-7b4e-4d46-a540-824540685000+ X-Ms-Ests-Server:+ - 2.1.20465.4 - FRC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-Qu0I7ShVrVt-zJPL9d9rnw'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AsYLEKhH9htOoOEoaz18W89RVKK0AQAAAPSQiN8OAAAA; expires=Fri, 09-May-2025+ 16:01:57 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Wed, 09 Apr 2025 16:01:56 GMT+ Content-Length:+ - '1696'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Wed, 09 Apr 2025 16:01:57 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children+ body:+ encoding: UTF-8+ string: '{"name":"ConnectionValidatorFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'+ headers:+ Content-Type:+ - application/json+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Length:+ - '91'+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 201+ message: Created+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8+ Content-Encoding:+ - gzip+ Etag:+ - '"{14A012EF-8F6E-4AA3-B137-F12EC82C13C2},1"'+ Location:+ - https://ymt6d.sharepoint.com/_api/v2.0/drives('b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs')/items('root')/children('01ANJ53W7PCKQBI3UPUNFLCN7RF3ECYE6C')+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 6715ccb0-ed22-4c02-ad8c-3c71d3597a83+ Client-Request-Id:+ - 6715ccb0-ed22-4c02-ad8c-3c71d3597a83+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"003","RoleInstance":"FR1PEPF00001088"}}'+ Odata-Version:+ - '4.0'+ Date:+ - Wed, 09 Apr 2025 16:01:57 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8CfNaHr_0ERYs5kgmEWFrX'')/root/children/$entity","@odata.etag":"\"{14A012EF-8F6E-4AA3-B137-F12EC82C13C2},1\"","createdDateTime":"2025-04-09T16:01:58Z","eTag":"\"{14A012EF-8F6E-4AA3-B137-F12EC82C13C2},1\"","id":"01ANJ53W7PCKQBI3UPUNFLCN7RF3ECYE6C","lastModifiedDateTime":"2025-04-09T16:01:58Z","name":"ConnectionValidatorFolder","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20AMPF/ConnectionValidatorFolder","cTag":"\"c:{14A012EF-8F6E-4AA3-B137-F12EC82C13C2},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP+ Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint+ App"}},"lastModifiedBy":{"application":{"displayName":"OP Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint+ App"}},"parentReference":{"driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","driveType":"documentLibrary","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","sharepointIds":{"listId":"87d67c02-fdaf-4504-8b39-920984585ad7","listItemUniqueId":"458e6945-3722-40b1-946f-4743a2d480f2","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff","siteUrl":"https://ymt6d.sharepoint.com/sites/OPTest","tenantId":"4d44bf36-9b56-45c0-8807-bbf386dd047f","webId":"6af246f0-e3be-45ef-b91a-8eca4dcc5d8f"}},"fileSystemInfo":{"createdDateTime":"2025-04-09T16:01:58Z","lastModifiedDateTime":"2025-04-09T16:01:58Z"},"folder":{"childCount":0,"view":{"sortBy":"name","sortOrder":"ascending","viewType":"thumbnails"}},"shared":{"scope":"unknown"}}'+ recorded_at: Wed, 09 Apr 2025 16:01:57 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children+ body:+ encoding: UTF-8+ string: '{"name":"ConnectionValidatorFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'+ headers:+ Content-Type:+ - application/json+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Length:+ - '91'+ response:+ status:+ code: 409+ message: Conflict+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json+ Content-Encoding:+ - gzip+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 8ae2e5a3-51d0-4212-a282-f42474ecd061+ Client-Request-Id:+ - 8ae2e5a3-51d0-4212-a282-f42474ecd061+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"003","RoleInstance":"FR1PEPF0000161B"}}'+ Date:+ - Wed, 09 Apr 2025 16:01:57 GMT+ body:+ encoding: UTF-8+ string: '{"error":{"code":"nameAlreadyExists","message":"Name already exists","innerError":{"date":"2025-04-09T16:01:58","request-id":"8ae2e5a3-51d0-4212-a282-f42474ecd061","client-request-id":"8ae2e5a3-51d0-4212-a282-f42474ecd061"}}}'+ recorded_at: Wed, 09 Apr 2025 16:01:58 GMT+- request:+ method: get+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children?$select=id,name,size,webUrl,lastModifiedBy,createdBy,fileSystemInfo,file,folder,parentReference+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false;+ charset=utf-8+ Content-Encoding:+ - gzip+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - c5e05cfa-d4d1-4fed-9af1-3d99d5182905+ Client-Request-Id:+ - c5e05cfa-d4d1-4fed-9af1-3d99d5182905+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"003","RoleInstance":"FR1PEPF00000AF1"}}'+ Date:+ - Wed, 09 Apr 2025 16:01:58 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#Collection(driveItem)","value":[{"@odata.etag":"\"{14A012EF-8F6E-4AA3-B137-F12EC82C13C2},2\"","createdBy":{"application":{"id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff","displayName":"OP+ Auth"},"user":{"displayName":"SharePoint App"}},"id":"01ANJ53W7PCKQBI3UPUNFLCN7RF3ECYE6C","lastModifiedBy":{"application":{"id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff","displayName":"OP+ Auth"},"user":{"displayName":"SharePoint App"}},"name":"ConnectionValidatorFolder","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello+ AMPF","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20AMPF/ConnectionValidatorFolder","fileSystemInfo":{"createdDateTime":"2025-04-09T16:01:58Z","lastModifiedDateTime":"2025-04-09T16:01:58Z"},"folder":{"childCount":0},"size":0}]}'+ recorded_at: Wed, 09 Apr 2025 16:01:58 GMT+- request:+ method: delete+ uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/items/01ANJ53W7PCKQBI3UPUNFLCN7RF3ECYE6C+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 204+ message: No Content+ headers:+ Cache-Control:+ - no-store, no-cache+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 60c4b5b1-ff85-4d07-abdf-9255511eec30+ Client-Request-Id:+ - 60c4b5b1-ff85-4d07-abdf-9255511eec30+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"003","RoleInstance":"FR1PEPF00001213"}}'+ Date:+ - Wed, 09 Apr 2025 16:01:58 GMT+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Wed, 09 Apr 2025 16:01:59 GMT+recorded_with: VCR 6.3.1