Describe the Bug
The Problem
Both iOS and Android verions of RC do not send client certificate for the following endpoints while contacting a RC server with nginx as a reverse proxy instance in front of it
nginx is configured to authenticate users with certificates (mutual TLS)
The endpoints are:
/admin/info
/api/v1/push.get
Steps to Reproduce
Admin Panel
While clicking on the Admin panel button in RC app, the 400 Bad Request error occurs
nginx log entry:
GET /admin/info?layout=embedded HTTP/2.0" 400
This results in no possibility to access the administration workspace on mobile devices
Push Notifications
While receiving a push notification message and trying to load more data from the server, the 400 Bad Request error occurs
As a result no additional information is received from the server
nginx log entry:
GET /api/v1/push.get?id={ID} HTTP/2.0" 400
Push Notifications: iOS
For the latter case it looks as if there is a lack of delegate: RocketChatURLSessionDelegate() in URLSession
|
// Create URLSessionConfiguration with proper timeouts for notification service extension |
but in the API class it is handled correctly
|
private let pinnedSession: URLSession = { |
Push Notifications: Android
Pushes on the Android app: it looks like the new OkHttpClient.Builder() is missing a user credentials context while sending a request to /api/v1/push.get
|
final OkHttpClient client = new OkHttpClient.Builder() |
Additional Information
Below are the previous related issue and PR, that could help to get the context of the problem:
Expected Behavior
No response
Actual Behavior
No response
Rocket.Chat Server Version
8.4.2
Rocket.Chat App Version
4.72.0
Device Name
iPhone, Samsung
OS Version
iOS 18, Android 16
Additional Context
p.s.
It's not directly related to this issue, but also there are two places doing the same thing in different manner
|
lazy var session = URLSession( |
|
final class URLSesionClientCertificateHandling: NSObject, URLSessionDelegate { |
|
final class RocketChatURLSessionDelegate: NSObject, URLSessionDelegate { |
Describe the Bug
The Problem
Both iOS and Android verions of RC do not send client certificate for the following endpoints while contacting a RC server with nginx as a reverse proxy instance in front of it
nginx is configured to authenticate users with certificates (mutual TLS)
The endpoints are:
/admin/info/api/v1/push.getSteps to Reproduce
Admin Panel
While clicking on the
Admin panelbutton in RC app, the400 Bad Requesterror occursnginx log entry:
This results in no possibility to access the administration workspace on mobile devices
Push Notifications
While receiving a push notification message and trying to load more data from the server, the
400 Bad Requesterror occursAs a result no additional information is received from the server
nginx log entry:
Push Notifications: iOS
For the latter case it looks as if there is a lack of
delegate: RocketChatURLSessionDelegate()inURLSessionRocket.Chat.ReactNative/ios/NotificationService/NotificationService.swift
Line 268 in e43a181
but in the API class it is handled correctly
Rocket.Chat.ReactNative/ios/Shared/RocketChat/API/API.swift
Line 25 in e43a181
Push Notifications: Android
Pushes on the Android app: it looks like the
new OkHttpClient.Builder()is missing a user credentials context while sending a request to/api/v1/push.getRocket.Chat.ReactNative/android/app/src/main/java/chat/rocket/reactnative/notification/LoadNotification.java
Line 111 in e43a181
Additional Information
Below are the previous related issue and PR, that could help to get the context of the problem:
Expected Behavior
No response
Actual Behavior
No response
Rocket.Chat Server Version
8.4.2
Rocket.Chat App Version
4.72.0
Device Name
iPhone, Samsung
OS Version
iOS 18, Android 16
Additional Context
p.s.
It's not directly related to this issue, but also there are two places doing the same thing in different manner
Rocket.Chat.ReactNative/ios/RocketChat Watch App/Client/RocketChatClient.swift
Line 25 in e43a181
Rocket.Chat.ReactNative/ios/RocketChat Watch App/Client/URLSessionCertificateHandling.swift
Line 5 in cd6f2a8
Rocket.Chat.ReactNative/ios/Shared/RocketChat/API/API.swift
Line 14 in cd6f2a8