How encrypt GKE secrets using Customer supplied keys - security

I have created a gke cluster without any encryption flag to encrypt. How can i encrypt the secrets in gke using custom keys not using Cloud KMS. How can secure the kubernets secrets

Related

Terraform Azure Service Principal into AKV

I have an App in Azure with A client secret. The secret should be synced to an azure key vault. Since I don't want to have the spn secret as plain text i wondered if there was any better solution?

how to maintain encryption/decryption of Kubernetes Secrets in AKS

how to maintain encryption/decryption of Kubernetes Secrets in AKS. I referred this link https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/ but as per this link https://feedback.azure.com/d365community/idea/ec780bf4-f724-ec11-b6e6-000d3a4f0da0 I am not sure whether this feature is available in Azure Kubernetes Service (AKS).
consider managing the secrets in azure key vault. Integrate AKS cluster with azure key vault to source the secrets when the pod is started.
Following link would be helpful --> https://medium.com/swlh/integrate-azure-key-vault-with-azure-kubernetes-service-1a8740429bea

Windows VM system-assigned managed identity to access Azure Key Vault in Typescript?

How we can get the Access to Azure key vault secrets from Typescript app.
We have access to the VM on which the application is running.
What are the steps and code we need to place in Type script react application to get azure key vault access?
It is not possible and not recommended to use Azure key vault in Typescript app. It is a security risk, as anyone can see your KeyVault connection details from browser console and access your secrets.
You should not access secured resources directly from client code.
https://www.npmjs.com/package/#azure/keyvault-secrets
Angular - Azure Key Vault Managing Vault Access secrets
https://learn.microsoft.com/en-us/answers/questions/318983/is-it-possible-to-use-key-vault-in-static-web-appl.html

How to access Azure Key Vault (AKV) from Azure Kubernetes Service (AKS) using Managed Identities

We have some dotnet Core App Services running on Azure and using Azure key Vault with Managed Identities.
Planning to deploy these dotnet core services to azure kubernetes but I haven't found any relevant document/support to use AKV with Kubernetes Services. Any Guidance or references
There are a couple of options to access KV from AKS:
Use Azure Key Vault with FlexVol (deprecated. continue to use this for kubernetes version 1.15)
With Key Vault, you store and regularly rotate secrets such as credentials, storage account keys, or certificates. You can integrate Azure Key Vault with an AKS cluster using a FlexVolume. The FlexVolume driver lets the AKS cluster natively retrieve credentials from Key Vault and securely provide them only to the requesting pod. Work with your cluster operator to deploy the Key Vault FlexVol driver onto the AKS nodes. You can use a pod managed identity to request access to Key Vault and retrieve the credentials you need through the FlexVolume driver.
Azure Key Vault with FlexVol is intended for use with applications and services running on Linux pods and nodes.
Use Azure Key Vault Provider for Secrets Store CSI Driver (For kubernetes 1.16+)
The Azure Key Vault Provider for Secrets Store CSI Driver allows for the integration of Azure Key Vault as a secrets store with a Kubernetes cluster via a CSI volume.
Use Azure Active Directory pod-managed identities in Azure Kubernetes Service (Preview)
Azure Active Directory (Azure AD) pod-managed identities use Kubernetes primitives to associate managed identities for Azure resources and identities in Azure AD with pods. Administrators create identities and bindings as Kubernetes primitives that allow pods to access Azure resources that rely on Azure AD as an identity provider.
I found the pod identity approach easier as you don't need to change your code.

Is it best practice to cache Azure KeyVault ClientID & Thumbprint?

Is it industry best practice to cache your ClientID, SecretId and/or Thumbprint to retrieve KeyVault secrets?
If possible is there a sample code for me to do it in C#?
All you need to secure it the secret and the thumbprint. Essentially anything that can be used to access the resource. If you really want to, you can secure the client ID as well, but I haven't heard of anyone suggesting this or recommending this.
Per the Keyvault Overview:
Azure Key Vault helps solve the following problems:
Secrets Management - Azure Key Vault can be used to Securely store and tightly control access to tokens, passwords, certificates, API keys, and other secrets
Key Management - Azure Key Vault can also be used as a Key Management solution. Azure Key Vault makes it easy to create and control the encryption keys used to encrypt your data.
Certificate Management - Azure Key Vault is also a service that lets you easily provision, manage, and deploy public and private Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with Azure and your internal connected resources.
Store secrets backed by Hardware Security Modules - The secrets and keys can be protected either by software or FIPS 140-2 Level 2 validates HSMs
I suggest reading through the referenced overview for keyvault and looking through the docs as well : https://learn.microsoft.com/en-us/azure/key-vault/key-vault-overview

Resources