Send CORs headers for browser applications
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- c, javascript
- Área
- backend-api-design, networking, security
Línea de trabajo
Comienza rastreando el manejo de respuestas HTTP de CUPS para los endpoints IPP y revisando los requisitos de CORS enlazados en el issue. Define cómo se configurarían y validarían los orígenes de confianza; se considera terminado cuando las aplicaciones de navegador puedan enviar solicitudes IPP con los headers requeridos sin exponer ampliamente las impresoras.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
It would really simplify things for users of applications served through the browser that need to print documents if some sort of CORs configuration could be enabled via CUPs.
If you aren't familiar with CORs - this is solved simply by adding a few HTTP headers. Ideally, headers are only allowed for a set of trusted domains which can be enabled in some fashion by the user (i.e. the user needs to allow prints from "fancyprintjobs.example.com"). This page does a better job describing it than I could do here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
If it is helpful, I can go into more detail about the specific header key/values required to facilitate communication between the application running inside the browser and CUPs. However, know it is simply adding a couple of http headers to the response based on the domain requests are made from.
The browser respects a CORs policy when allowing http requests from an application (i.e. javascript code) to endpoints served from a different domain than the application. When CORs is enabled, javascript applications are able to print directly to CUPs. Without CORs, browsers disallow the ability to submit IPP jobs to CUPs from an application running in the browser context.
Currently, users have two options - they can manually print each document by downloading it via the browser and using a local program to print. This is slow and requires the user to set the print settings for each type of job. Since the remote application already knows how it should be printed (and can set these settings automatically via IPP, it is frustrating for - and confusing to many - users to configure the printer correctly for different types of documents.
The better option is to allow the application to print directly via IPP. However, CORs restrictions make this difficult since they are not considered by CUPs.
Since CUPs does not allow CORs configuration, the user must do one of the following at present:
- (easiest approach from a user perspective) place the printer on the public internet. This allows the server component of the browser application to submit print jobs. Hopefully the user exposes their printer securely - however - considering most people cannot configure a router, it is unlikely that the average person working from home is sharing their printer over the internet securely. This seems worse than exposing CORs to the LAN. There is a little more to this as most users have dynamic ip addresses, but that is ignored for the sake of discussion.
- place a reverse proxy in front of CUPs and apply CORs headers there. This method allows the Javascript application running in the browser to print via their local network without exposing the printer over the public internet.
Of the two choices - CORs is safer and simpler for the end user. However there is a large barrier to entry here due to the configuration of a reverse proxy - this really isn't feasible for the average user who just expects printing to work.
Since there are ways to side step the issue - people are doing it. However, since the steps are complicated, it isn't being done well and users are unknowingly creating risk.
Please consider adding CORs support to CUPs in any fashion. It would be very useful to the end users.
- Lenguaje dominante
- C
- Estrellas
- 1.8k
- Forks
- 331
- Merge medio
- 15 h 28 min
- PR fusionados (30 d)
- 5
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de OpenPrinting/cups
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
OpenPrinting/cups#1721 ·
Los mantenedores suelen responder en 1 día
-
I18n for CUPS webapp pagesAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
OpenPrinting/cups#1724 ·
Los mantenedores suelen responder en 1 día
-
Buffer overflow in cupsSideChannelSNMPGet()Posiblemente ocupada @michaelrsweet la tomó hace 2 días. Abiertoinvestigating
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
OpenPrinting/cups#1719 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Integer overflow in httpGetDateTime()Posiblemente ocupada @michaelrsweet la tomó hace 2 días. Abiertobug priority-low
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
OpenPrinting/cups#1717 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Integer overflow in show_supplies()Posiblemente ocupada @michaelrsweet la tomó hace 2 días. Abiertoenhancement investigating
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
OpenPrinting/cups#1715 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de OpenPrinting/cups
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
ClickHouse/pg_clickhouse#383 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
johnsonjh/emu2-cpm86#68 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Zenmap CrashAbiertoZenmap
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
BasedHardware/omi#19306 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
fastfetch-cli/fastfetch#2619 ·
Los mantenedores suelen responder en 1 día