惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
GbyAI
GbyAI
爱范儿
爱范儿
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
M
MIT News - Artificial intelligence
量子位
宝玉的分享
宝玉的分享
MongoDB | Blog
MongoDB | Blog
V
Visual Studio Blog
罗磊的独立博客
F
Fortinet All Blogs
美团技术团队
博客园_首页
博客园 - 【当耐特】
L
LangChain Blog
月光博客
月光博客
腾讯CDC
The Cloudflare Blog
D
Docker
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

hwchiu learning note Blog

Kubernetes 怎麼計算 imageFS | hwchiu learning note Nginx Proxy_Pass 不會重新查詢 DNS | hwchiu learning note Multus 下如何透過 network policy 設定 | hwchiu learning note Linux Bridge MTU | hwchiu learning note Kubevirt 初體驗 | hwchiu learning note [MacOS ]隨手筆記 Sed 與 Rename 的使用 | hwchiu learning note Docusaurus 使用 blog mode 後連結一直反白的問題 | hwchiu learning note gcloud 切換帳號 | hwchiu learning note k8s 內安裝 redis-cluster | hwchiu learning note Helm Chart 中如何根據條件來動態安裝 Template 內的物件 | hwchiu learning note GCS 操作上注意事項 | hwchiu learning note istio 操作記錄 | hwchiu learning note terraform | hwchiu learning note Kubernetes GKE 維運上小筆記 | hwchiu learning note Git 修改 author/committer | hwchiu learning note GCP NAT 相關筆記 | hwchiu learning note gcloud ssh 到 GCP VM | hwchiu learning note CloudSQL 收費注意事項 | hwchiu learning note Loki 安裝上的參數調整以及 Ring 的問題除錯 | hwchiu learning note kustomize + helm | hwchiu learning note 觀測 K8s 內 OOM 事件 | hwchiu learning note GKE 上的 RBAC 筆記 | hwchiu learning note 本地產生 jwt token | hwchiu learning note ArgoCD 安裝筆記 | hwchiu learning note CircleCI Context 的使用 | hwchiu learning note 透過 GCP IAP Gateway 來保護 GKE 內的網站 | hwchiu learning note 閱讀筆記: 「SRE 的工作介绍」 | hwchiu learning note 閱讀筆記: 「DevOps is a failure」 | hwchiu learning note 閱讀筆記: 「面試人生 - 設計一個簡易的分散式 Job Scheduler」 | hwchiu learning note 閱讀筆記: 「Cloudflare 06/21 災後報告」 | hwchiu learning note
閱讀筆記: 「容器的除錯之路,遇到 Permission Denied 該怎麼...
HungWei ChiuBlogger · 2022-05-04 · via hwchiu learning note Blog

標題: 「容器的除錯之路,遇到 Permission Denied 該怎麼辦」 類別: container 連結: https://live-rhes.pantheonsite.io/sysadmin/container-permission-denied-errors

作者提到大部分遇到 Container 權限問題時,最無腦的一招就是 --privileged 直接硬上權限,但是其實大家都不知道自己到底缺少什麼權限,盲目地使用 --privileged 的確可以解決問題 但是實務上卻是犧牲 Security 換來的,因為不知道缺少什麼而直接硬開,其實就是硬生生的將幾乎所有保護功能都關閉。

本篇文章就來探討當遇到權限問題時有可能是什麼造成的,以及應該如何精準地去設定這些權限而不是用一招 --privileged 跳過。 此外由於作者本身就是 Podman 開發團隊,因此文章之後的介紹與範例都會基於 Podman 來完成,

  1. 錯誤定位

如果你的容器問題透過 --privileged 也不能解決,那至少你的問題跟本篇文章的關聯性不大,或是說你的問題其實根本不是安全性方面的設定問題,只有當妳確認你的問題 可以因為 --privileged 而解決時本篇文章的內容才會對你有幫助

  1. Is SELinux the issue?
  2. Is AppArmor the issue?
  3. Test capabilities
  4. Test SECCOMP
  5. Test masked kernel filesystem

除了上述五個安全性設定外,作者也針對 namespace 探討可能會出現的問題,包含

  1. Is user namespace the issue?
  2. Is network namespace the issue?
  3. Is pid namespace the issue?

最後就是不免俗的推薦大家使用看看 rootless container,畢竟大部分的應用程式其實都沒有要寫入系統的需求,理論上來說應該都要可以運行於 rootless 的模式

整篇文章整理的非常的好,每個類別都有指令操作來介紹概念,對於這些資安控管不熟的人來說可以說是一個溫習的好機會