Skip to content
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

Enable OIDC bearer token authentication #249

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

avinash-0007
Copy link

@avinash-0007 avinash-0007 commented Oct 27, 2023

This Mr solves the issue mention in below ticket
#242

@akhil1508
Copy link

akhil1508 commented Jan 30, 2024

@pulsejet Any update on this?

@akhil1508
Copy link

akhil1508 commented Apr 15, 2024

  • For the non-OCS routes for e.g. notes API (/apps/notes/api/v0.2/notes) to work we also need a patch for lib/private/AppFramework/Middleware/Security/CORSMiddleware like
--- lib/private/AppFramework/Middleware/Security/CORSMiddleware.php	2024-04-08 08:53:20.410444998 +0530
+++ lib/private/AppFramework/Middleware/Security/CORSMiddleware-new.php	2024-04-09 19:05:21.133629632 +0530
@@ -97,6 +97,10 @@
 			// Allow to use the current session if a CSRF token is provided
 			if ($this->request->passesCSRFCheck()) {
 				return;
+			}			
+			// Skip CORS check for requests with oidc token auth.
+			if ($this->session->getSession() instanceof ISession && $this->session->getSession()->get('is_oidc_token_login') === 1) {
+				return;
 			}
 			// Skip CORS check for requests with AppAPI auth.
 			if ($this->session->getSession() instanceof ISession && $this->session->getSession()->get('app_api') === true) {

@akhil1508
Copy link

akhil1508 commented Apr 15, 2024

@pulsejet I await response from NC devs on nextcloud/user_oidc#836 so we can avoid patching

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants