nodeSolidServer / nodeSolidServer/node-solid-server
Cookie not set with SameSite attribute
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.8k
- Fork
- 308
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
As noted on solid-auth-client https://github.com/solid/solid-auth-client/issues/151, Chrome is requiring third party cookies to be set with SameSite=None and Secure. While this setting is not yet active on desktop, it is active on Android and therefore breaks all Solid apps using the nssidp.sid cookie from .solid.community.
This can still be bypassed by disabling chrome://flags/#same-site-by-default-cookies.
Presumably non-cookie based authentication doesn't have this issue but I'm not sure it's possible to turn off cookie-based authentication at the moment (https://github.com/solid/node-solid-server/issues/672)
I'm not an expert, but it appears the change required is in the definition of the express-session settings
https://github.com/solid/node-solid-server/blob/master/lib/create-app.js#L305
https://www.npmjs.com/package/express-session#cookiesamesite
It may be sufficient to simply use:
cookie: {
maxAge: 24 * 60 * 60 * 1000,
sameSite:'None'
}
It seems that http connections should also be completely dropped for authenticated sessions because the third party cookie won't be sent without cookie.secure=true anyway.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu trong lib/create-app.js, khoảng dòng 305, và xem xét các thiết lập cookie của express-session cùng với tài liệu của express-session. Tái hiện hành vi của nssidp.sid trên Android Chrome khi áp dụng cookie SameSite, sau đó xác minh rằng các ứng dụng Solid đã xác thực có thể thiết lập và sử dụng session mà không làm hỏng các chế độ kết nối được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- express, javascript
- Lĩnh vực
- authentication, backend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100