-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCM Services #39574
OCM Services #39574
Conversation
cdd9995
to
cf657da
Compare
272c067
to
457cce5
Compare
also looping in @glpatcern |
/backport to stable27 |
/backport to stable26 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also agree with @Altahrim that json_* calls should throw on error.
&& parse_url($this->url, PHP_URL_HOST) !== | ||
parse_url($this->getEndPoint(), PHP_URL_HOST)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it confirms the generated object fit the documentation, based on required values on some parameters.
919d10f
to
0903c5f
Compare
a9c93d4
to
88a5fc3
Compare
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
3d8d3b7
to
b5dcd04
Compare
Glad to see this was merged. What are your plans for a backport to Nextcloud 27 and 26? |
The backport to stable27 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable27
git pull origin stable27
# Create the new backport branch
git checkout -b fix/foo-stable27
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27 More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
The backport to stable26 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable26
git pull origin stable26
# Create the new backport branch
git checkout -b fix/foo-stable26
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26 More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
Adds new APIs to lib/public so we need documentation. |
Seems like Line 540 in f174e4a
Additionally this breaks servers with Also https://docs.nextcloud.com/server/stable/admin_manual/installation/nginx.html need adjusting (and therefore needs to be mentioned in https://docs.nextcloud.com/server/stable/admin_manual/release_notes/upgrade_to_27.html Since this was also backported to 26 (😕 ) also https://docs.nextcloud.com/server/stable/admin_manual/release_notes/upgrade_to_26.html needs to be adjusted. cc @sorbaugh |
@nickvergessen huge appreciation for leading the debugging effort 🙏 Will align with @ArtificialOwl to get this dealt with. |
If #40745 resolves the issue, as it add a line to the original
I were not able to reproduce this issue with patched instance.
I am not even a user of nginx, i require help on this task; but it might just be an adjustment on a comment section. |
Me neither, but basically you replicate the change from htaccess and the Setup class into the docs. All needed patterns should be there already. |
Yep, also reported via support. I fear this pull request unintentional added hard requirement for apache's mod_rewrite. |
Sorry, I mixed something up. The new ocm-provider should also work without mod_rewrite. |
So ignore your comment or something we need to take action on @kesselb |
I have the issue every time on my dev instance. federation is not working until I ran |
The following patch makes it work again: diff --git a/lib/private/Federation/CloudFederationProviderManager.php b/lib/private/Federation/CloudFederationProviderManager.php
index ea2f0dd7575..4e2a559ce8a 100644
--- a/lib/private/Federation/CloudFederationProviderManager.php
+++ b/lib/private/Federation/CloudFederationProviderManager.php
@@ -116,6 +116,7 @@ class CloudFederationProviderManager implements ICloudFederationProviderManager
try {
$ocmProvider = $this->discoveryService->discover($cloudID->getRemote());
} catch (OCMProviderException $e) {
+ $this->logger->debug($e->getMessage(), ['exception' => $e]);
return false;
}
diff --git a/lib/private/OCM/OCMDiscoveryService.php b/lib/private/OCM/OCMDiscoveryService.php
index ac9bf2a3965..10d460b34da 100644
--- a/lib/private/OCM/OCMDiscoveryService.php
+++ b/lib/private/OCM/OCMDiscoveryService.php
@@ -105,6 +107,9 @@ class OCMDiscoveryService implements IOCMDiscoveryService {
'exception' => $e,
'remote' => $remote
]);
+ if (!str_ends_with($remote, '/index.php')) {
+ return $this->discover($remote . '/index.php', $skipCache);
+ }
throw new OCMProviderException('error while requesting remote ocm provider');
}
|
I'm not sure what exactly |
Simply always requesting index.php also works (tested with our instance and locally), so I sent that as a patch in #41234 |
It tells apache2 to forward a 404 error to our index.php to handle it. I haven't heard back from the customer, but I assume that they have AllowOverride None and therefore the ErrorDocument in .htaccess has no effect. |
Resolves #39001
IOCMProvider
andIOCMResource
to manage the OCM discovery API,ocm-provider/index.php
with the integration ofOCMController
incore/routes.php
,cloud_federation_ali
's capabilities updated to useOCMProvider
,OCMDiscoveryService
to centralize OCM Discovery Services,OCMDiscoveryService
FederatedSharesDiscoverJob
1.0-proposal1
and1.0
[1]
./occ config:app:set core ocm_providers --value '\OCA\CloudFederationAPI\Capabilities'
(default)[2]
'sharing.federation.allowSelfSignedCertificates' => true,
inconfig/config.php