bug: a lack of mutual TLS (mTLS) support for several API endpoints

Abierto
#7,371 2 comentarios 2 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Gaurika-05 ya está trabajando en esto.

Desde el 25/8/2026.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java, react-native, swift

Línea de trabajo

Comienza comparando el manejo de certificados en ios/NotificationService/NotificationService.swift con ios/Shared/RocketChat/API/API.swift; después, inspecciona android/app/src/main/java/chat/rocket/reactnative/notification/LoadNotification.java. Verifica que las solicitudes afectadas a /admin/info y /api/v1/push.get utilicen el contexto de certificado de cliente requerido en ambas plataformas y se completen correctamente a través de un proxy nginx con mutual-TLS.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

🐛 bug type: bug
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:

  1. /admin/info
  2. /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

Image

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
https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/e43a18147c3ecc7527a67e86dd58b4ca6fb4ce26/ios/NotificationService/NotificationService.swift#L268

but in the API class it is handled correctly
https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/e43a18147c3ecc7527a67e86dd58b4ca6fb4ce26/ios/Shared/RocketChat/API/API.swift#L25

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
https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/e43a18147c3ecc7527a67e86dd58b4ca6fb4ce26/android/app/src/main/java/chat/rocket/reactnative/notification/LoadNotification.java#L111

Additional Information

Below are the previous related issue and PR, that could help to get the context of the problem:

  • #5204
  • #6130
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

https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/e43a18147c3ecc7527a67e86dd58b4ca6fb4ce26/ios/RocketChat%20Watch%20App/Client/RocketChatClient.swift#L25
https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/cd6f2a89f5e9652ce83b8ae47669c3a638e7ff15/ios/RocketChat%20Watch%20App/Client/URLSessionCertificateHandling.swift#L5

https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/cd6f2a89f5e9652ce83b8ae47669c3a638e7ff15/ios/Shared/RocketChat/API/API.swift#L14

Lenguaje dominante
TypeScript
Estrellas
2.4k
Forks
1.5k
Merge medio
1 d 15 h
PR fusionados (30 d)
29

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de RocketChat/Rocket.Chat.ReactNative

Todos los issues de RocketChat/Rocket.Chat.ReactNative

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.