[英]readOnlyRootFilesystem prevents my code from writing logs
我在我的部署中添加了readOnlyRootFilesystem: true但運行我的代碼以以下錯誤結束: 但是/project/logs/dbt.log不是根路徑。 知道為什么會這樣嗎? 這是我正在使用的更詳細的清單: ...
[英]readOnlyRootFilesystem prevents my code from writing logs
我在我的部署中添加了readOnlyRootFilesystem: true但運行我的代碼以以下錯誤結束: 但是/project/logs/dbt.log不是根路徑。 知道為什么會這樣嗎? 這是我正在使用的更詳細的清單: ...
[英]podSecurityContext not working as expected on init container
我第一次嘗試設置 pod 安全上下文。 我在 pod 規范中添加了以下內容: 當 pod 試圖啟動時,init 容器卡在 state CreateContainerConfigError中,並顯示以下消息: 據我了解- 有一個名為flyway的用戶,但它沒有 uid。 應該怎么做才能使 pod 中的 ...
[英]NullPointer trying to get user info with Keycloak in Spring Boot
我在我的REST應用程序中使用Keycloak和spring-boot 。 它工作正常,我在Keycloak中定義了roles ,然后在我的 Config.class 中,我允許根據每個用戶的角色訪問我感興趣的端點。 嘗試在我的后台檢索用戶信息時遇到問題(姓名、委托人、權限...)。 我讀過像這樣的 ...
[英]Certificate signed procedure cannot access data on another database in same instance
該場景只是簡單地運行一個存儲過程,用證書對其進行簽名,然后以非特權用戶身份運行它以從另一個數據庫獲取數據。 另一個數據庫恰好與包含此存儲過程的數據庫位於同一實例中。 我已經嘗試了所有證書變體,從僅使用受密碼保護的證書開始,這些證書在其他數據庫上備份和恢復以供在那里使用。 我在下面提供的最新版本使用S ...
[英]SCC apply to all services and not only to specific service
當我在我的Openshift集群上應用我的custom-scc時,我的服務具有正確的serviceAccount: My-service-name將正確檢索它。 但是,如果另一個服務中的 pod 以default作為serviceAccount重新啟動,它也會得到我的custom-scc 。 我檢查 ...
[英]Why cant I configure POD-level securityContext settings to be applied to all underlying Containers?
在我的 POD 中,我想將所有容器限制為具有securityContext: readOnlyRootFilesystem: true的只讀文件系統示例(注意:為簡潔起見,減少了 yaml) 這將導致: 錯誤:驗證“server123.yaml”時出錯:驗證數據時出錯:ValidationErro ...
[英]Minimun privileges for CSI sidecar
我正在使用 CSI 標准構建自己的 CSI 驅動程序,我想知道要為 CSI sidecar 容器設置的安全上下文。 我要使用: 節點驅動程序注冊商 CSI供應商 CSI附件 CSI 活性探測。 其中一些需要以 root 身份運行,我想知道安全上下文中的配置如何為它們分配最少 Linux 功能,並確保 ...
[英]Kubernetes: run container as a root
我確實理解這樣做的缺點,但是我的圖像僅適用於在其中運行 cmd 的 root 用戶。 服務器 kubernetes 版本為: v1.19.14 。 在我的deployment.yaml中。yaml 我有: 但是當我describe rs時,我看到以下內容: 我做錯了什么? ...
[英]Hibernate Envers : How to inject SecurityContext (REST) in RevisionListener?
我有一個 REST API(將 wildfly 20 與 microprofile-jwt 一起使用)所以我想用 Hibernate Envers 審核更改。 不幸的是,我無法獲得我的委托人 object: javax.ws.rs.core.SecurityContext是 null。 所以我的問 ...
[英]How to create pod with default uid:gid and multiple groups access gids( 4 to 5 ) that's needed to access nfs shares.?
我正在嘗試將涉及 nfs 共享的工作流程容器化。 為了成功運行,它需要用戶擁有默認的 uid:gid 以及額外的 4 或 5 個 groupid 訪問權限。 組 id 是隨機的,理想情況下我想避免在 yaml 文件中給出 gid 的范圍。 有沒有一種有效的方法來完成這項工作? 任何人都可以在 ya ...
[英]How does Kubernetes implement Linux capabilities?
Linux 功能應用於可執行文件。 如果我向容器添加功能,這意味着什么? 這是我的容器安全上下文: 但我的任務無法創建原始套接字。 那么在打包 docker 映像時,我應該將功能應用於可執行文件嗎? ...
[英]kubernetes: using value of runAsUser in an environment variable using valueFrom?
我有一個 kubernetes 部署,它啟動一個 pod,在它的securityContext中包含一個runAsUser鍵。 我希望我可以使用valueFrom將此值粘貼到initContainer的環境中,如下所示: 這似乎不起作用: 部署“testdeployment”無效:spec ...
[英]Getting git to work in a kubernetes container when using runAsUser
我想運行git作為的一部分initContainer在Kubernetes吊艙。 我還希望容器以任意非 root 用戶身份運行。 有什么辦法可以做到這一點嗎? 問題是,如果我在 pod 描述中包含這樣的內容: 然后git會像這樣失敗: 錯誤來自ssh 。 顯而易見的解決方法是通過https ...
[英]Send ZIP file to a REST based API which is using SSL TLS (https) hosted on AWS from a flutter based mobile application
之前我創建了一個 REST API ,它采用 ZIP 文件和其他兩個參數作為來自 Z5ACEBC4CB70DDBB0AEZ4B0AC76 的輸入 它按預期工作。 We moved the API from HTTP to HTTPS using Nginx on the AWS server a ...
[英]K8S: Pass the runAsUser permission to files created inside container
假設我有以下 yaml: 我正在嘗試使用runAsUser和runAsGroup運行容器sftp 。 圖像的入口點腳本應該采用 SFTP_USER、SFTP_PASSWD 並使用此輸入創建某些密碼和組文件。 這些文件應該在 /var/data 文件夾中創建。 在此之后,應該以 1234 用戶身份使用 ...
[英]Can a sidecar container of a pod detect the user of the application container and use the same?
我在 helm 圖表的 common.tpl 文件中定義了一個 sidecar 容器。 這個 sidecar 容器包含在許多使用不同用戶的 pod 中。 我想知道是否有一種方法可以在邊車容器中將應用程序容器的用戶定義為用戶。 因此,在每個 pod 中,我的應用程序和 sidecar 容器都將使用相 ...
[英]ExecutorService with SecurityContextHolder
我正在使用 ExecutorService 將方法的單線程更改為多線程執行。 它在里面調用 SecurityContextHolder ,拋出異常: 原因:java.lang.Exception:在安全上下文中找不到身份驗證 object。 at com.LoggedInUser.getLogg ...
[英]Unable to run nginx container as non-root
我正在嘗試以非 root 用戶身份運行nginx容器我正在嘗試配置我的nginx.conf文件,然后我將其放入 k8s configmap 中,但是當容器啟動時,它不斷拋出錯誤,例如 /etc/nginx/conf.d/nginx-kibana.conf:4 中不允許使用“pid”指令以及隨后的每一 ...
[英]securityContext.privileged: Forbidden: disallowed by cluster policy
我無法啟動需要特權安全上下文的 pod。 Pod 安全策略: 集群角色: 集群角色綁定: 不確定是否需要,但我已將 PodSecurityContext 添加到 args/kube-apiserver --enable-admission-plugins 任何建議和見解表示贊賞。 ...
[英]Spring Boot register a filter after spring security filter is executed
我已經定義了2個應該在每個請求上運行的過濾器,但只有在SpringContextHolder的上下文由spring boot設置之后。 但是,我總是將SecurityContextHolder.getContext().getAuthentication()作為null。 這是我的過濾器 ...