mapbox / mapbox/mapbox-navigation-android-examples
[Android Auto] Investigate how we need to handle trusted hosts
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Kotlin
- Star
- 65
- Fork
- 56
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 2
Mô tả
@kmadsen commented on [Thu May 27 2021](https://github.com/mapbox/1tap-android/issues/988)
The car library has a [HostValidator](https://developer.android.com/reference/androidx/car/app/validation/HostValidator)
Which essentially makes the 1tap app a trusted host with the head unit. You can find where this is in the `MainCarAppService`. I don't fully understand either, so this ticket is to figure it out and share your findings.
``` kotlin
class MainCarAppService : CarAppService() {
override fun createHostValidator(): HostValidator {
return HostValidator.ALLOW_ALL_HOSTS_VALIDATOR
// TODO limit hosts for production
// https://github.com/mapbox/1tap-android/issues/988
// return HostValidator.Builder(this)
// .addAllowedHosts(R.array.android_auto_allow_list)
// .build()
}
override fun onCreateSession(): Session {
return MainCarSession()
}
}
```
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 với MainCarAppService và tài liệu AndroidX HostValidator được liên kết, tập trung vào cấu hình ALLOW_ALL_HOSTS_VALIDATOR hiện tại và phương án allow-list đang được comment. Ghi lại cách nên xử lý các host đáng tin cậy trong môi trường production, đồng thời chia sẻ các phát hiện và khuyến nghị trong issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- android, kotlin
- Lĩnh vực
- mobile, security
- Loại issue
- Tài liệu
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100