在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → Kamus: Kubernetes应用的开源GitOps零信任加密解密方案

Kamus: Kubernetes应用的开源GitOps零信任加密解密方案

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:0.89M
  • 下载次数:0
  • 浏览次数:9
  • 发布时间:2024-03-19
  • 实例类别:一般编程问题
  • 发 布 人:chenxiaolan
  • 文件格式:.zip
  • 所需积分:2
 

实例介绍

【实例简介】
Kamus是一个为Kubernetes应用提供的开源GitOps零信任秘密加密与解密方案。它使用户能够轻松地加密秘密,这些秘密只能由运行在Kubernetes上的应用程序解密。加密采用强大的加密提供者完成(当前支持:Azure KeyVault、Google Cloud KMS和AES)。要了解更多关于Kamus的信息,请查看博客文章和幻灯片。

快速开始
使用Helm chart是运行Kamus的简单方式:
helm repo add soluto https://charts.soluto.io
helm upgrade --install kamus soluto/kamus
有关更多详细信息,请参考安装指南。安装Kamus后,您可以开始使用它来加密秘密。Kamus为特定应用程序加密秘密,该应用程序由Kubernetes服务帐户表示。为您的应用程序创建一个服务帐户,并将其挂载到运行您的应用程序的pod上。现在,当您知道服务帐户的名称和它存在的命名空间时,安装Kamus CLI:
npm install -g @soluto-asurion/kamus-cli
使用Kamus CLI加密秘密:
kamus-cli encrypt --secret super-secret --service-account kamus-example-sa --namespace default --kamus-url <Kamus URL>
如果您在本地运行Kamus,则Kamus URL将类似于http://localhost:<port>。因此,您需要添加--allow-insecure-url标志以启用http协议。将CLI返回的值传递给您的pod,并使用Kamus Decrypt API解密该值。实现这一点的最简单方法是使用init容器。另一种选择是直接在应用程序代码中使用Kamus解密API。为了使其更清晰,请查看一个工作示例应用。您可以将此应用部署到已安装Kamus的任何Kubernetes集群,以了解其工作原理。

架构
Kamus有3个组件:
  • 加密API
  • 解密API
  • 密钥管理系统(KMS)
加密和解密API处理加密和解密请求。KMS是各种加密解决方案的包装器。当前支持:
  • AES - 使用一个密钥加密所有秘密
  • AWS KMS、Azure KeyVault、Google Cloud KMS - 每个服务帐户创建一个密钥。
我们期待为其他云加密后端添加支持。请咨询安装指南,了解如何使用相关KMS部署Kamus的更多细节。

安全性
我们在Soluto非常重视安全性。要了解有关Kamus安全方面的更多信息,请参考包含我们讨论的所有各种威胁和缓解措施的Threat Modeling文档。在生产环境中安装Kamus之前,请参阅安装指南以学习部署Kamus的最佳实践。
【实例截图】
【核心代码】
文件清单
└── kamus-32596e1038eadd1392e91cf32ed8e238263c4119
    ├── ci
    │   ├── version_to_deploy_cli_docker.sh
    │   ├── version_to_deploy_init.sh
    │   └── version_to_deploy.sh
    ├── cli
    │   ├── Dockerfile
    │   ├── lib
    │   │   ├── actions
    │   │   │   └── encrypt.js
    │   │   ├── index.js
    │   │   └── is-docker.js
    │   ├── package.json
    │   ├── README.md
    │   ├── test
    │   │   └── encrypt.spec.js
    │   └── yarn.lock
    ├── Dockerfile
    ├── example
    │   ├── app
    │   │   ├── config.json
    │   │   ├── Dockerfile
    │   │   └── index.php
    │   ├── deployment-kamus
    │   │   ├── configmap.yaml
    │   │   ├── deployment.yaml
    │   │   └── service-account.yaml
    │   ├── deployment-secret
    │   │   ├── deployment.yaml
    │   │   └── secret.yaml
    │   └── README.md
    ├── glue
    │   └── glue.json
    ├── images
    │   └── logo.png
    ├── init-container
    │   ├── CONTRIBUTING.md
    │   ├── Dockerfile
    │   ├── encrypted
    │   │   └── key
    │   ├── index.js
    │   ├── package.json
    │   ├── README.md
    │   ├── templates
    │   │   ├── cfg.ejs
    │   │   ├── cfg-strict.ejs
    │   │   └── json.ejs
    │   ├── tests
    │   │   ├── docker-compose.yaml
    │   │   ├── encrypted
    │   │   │   ├── key1
    │   │   │   ├── key2
    │   │   │   ├── key.json
    │   │   │   └── key-newlines.json
    │   │   ├── expected.cfg
    │   │   ├── expected-custom.txt
    │   │   ├── expected.json
    │   │   ├── expected-strict.cfg
    │   │   ├── run_test.sh
    │   │   ├── templates
    │   │   │   └── template.ejs
    │   │   ├── token
    │   │   └── Wiremock
    │   │       ├── Dockerfile
    │   │       └── mappings
    │   │           ├── api_v1_decrypt-c5291391-7520-4d8d-a39a-9466ceb759e4.json
    │   │           ├── api_v2_decrypt-c5291391-7520-4d8d-a39a-9466ceb759e4.json
    │   │           ├── api_v3_decrypt-c5291391-7520-4d8d-a39a-9466ceb759e4.json
    │   │           └── api_v4_decrypt-c5291391-7520-4d8d-a39a-9466ceb759e4.json
    │   └── yarn.lock
    ├── kamus.sln
    ├── LICENSE
    ├── package.json
    ├── README.md
    ├── release_management.md
    ├── renovate.json
    ├── scripts
    │   ├── run_security_tests.sh
    │   ├── run_tests.sh
    │   └── teardown_tests.sh
    ├── security
    │   └── smime.p7m
    ├── security.md
    ├── site
    │   ├── assets
    │   │   ├── css
    │   │   │   └── inline.css
    │   │   └── js
    │   │       └── inline.js
    │   ├── config.toml
    │   ├── content
    │   │   ├── docs
    │   │   │   ├── contributing
    │   │   │   │   ├── getting-started.md
    │   │   │   │   └── roadmap.md
    │   │   │   ├── images
    │   │   │   │   └── diagram.png
    │   │   │   ├── _index.md
    │   │   │   ├── threatmodeling
    │   │   │   │   ├── architecture.md
    │   │   │   │   ├── controls
    │   │   │   │   │   ├── decryption
    │   │   │   │   │   │   ├── deny_default_sa.md
    │   │   │   │   │   │   ├── deny_secret_view.md
    │   │   │   │   │   │   ├── k8s_api_tls.md
    │   │   │   │   │   │   ├── kamus_in_cluster_tls.md
    │   │   │   │   │   │   └── opa_pods_secrets.md
    │   │   │   │   │   ├── encryption
    │   │   │   │   │   │   ├── block_internet_access.md
    │   │   │   │   │   │   ├── certificate_pinning.md
    │   │   │   │   │   │   ├── client_side_encryption.md
    │   │   │   │   │   │   ├── deny_default_sa.md
    │   │   │   │   │   │   └── ip_throttling.md
    │   │   │   │   │   └── KMS
    │   │   │   │   │       ├── firewall_protection.md
    │   │   │   │   │       ├── hardening_credentials.md
    │   │   │   │   │       ├── obfuscate_key_names.md
    │   │   │   │   │       └── use_hsm.md
    │   │   │   │   ├── images
    │   │   │   │   │   ├── diagram-crd.png
    │   │   │   │   │   ├── diagram-crd.pu
    │   │   │   │   │   ├── diagram.png
    │   │   │   │   │   ├── diagram.pu
    │   │   │   │   │   └── kamus-pod.png
    │   │   │   │   ├── security.md
    │   │   │   │   ├── threats
    │   │   │   │   │   ├── decryption
    │   │   │   │   │   │   ├── leveraging_crd.md
    │   │   │   │   │   │   ├── pod_impersonation.md
    │   │   │   │   │   │   └── sniffing_tampering.md
    │   │   │   │   │   ├── encryption
    │   │   │   │   │   │   ├── denial_of_service.md
    │   │   │   │   │   │   ├── namespace_enumeration.md
    │   │   │   │   │   │   └── sniffing_user_traffic.md
    │   │   │   │   │   └── kms
    │   │   │   │   │       ├── leaked_credentials.md
    │   │   │   │   │       └── quantom_computing.md
    │   │   │   │   └── threats_controls.md
    │   │   │   └── user
    │   │   │       ├── CHANGELOG.md
    │   │   │       ├── crd.md
    │   │   │       ├── install.md
    │   │   │       ├── known-issues.md
    │   │   │       └── quick-start.md
    │   │   └── _index.md
    │   ├── data
    │   │   └── apiVersions.yaml
    │   ├── layouts
    │   │   ├── docs
    │   │   │   ├── index.html
    │   │   │   ├── section.html
    │   │   │   └── single.html
    │   │   ├── index.html
    │   │   ├── index.redirects
    │   │   ├── partials
    │   │   │   ├── fancymarkdown.html
    │   │   │   ├── footer.html
    │   │   │   ├── header.html
    │   │   │   ├── inlinecss.html
    │   │   │   ├── inlinescript.html
    │   │   │   ├── navbar.html
    │   │   │   └── sidebar.html
    │   │   └── robots.txt
    │   ├── LICENSE
    │   ├── Makefile
    │   ├── package.json
    │   ├── README.md
    │   ├── static
    │   │   ├── apple-touch-icon.png
    │   │   ├── browserconfig.xml
    │   │   ├── CNAME
    │   │   ├── favicon-16x16.png
    │   │   ├── favicon-32x32.png
    │   │   ├── favicon.ico
    │   │   ├── logo
    │   │   │   ├── LICENSE
    │   │   │   └── logo.png
    │   │   ├── safari-pinned-tab.svg
    │   │   ├── site.webmanifest
    │   │   └── third_party
    │   │       └── GitHub-Mark-120px-plus.png
    │   └── yarn.lock
    ├── src
    │   ├── crd-controller
    │   │   ├── appsettings.Development.json
    │   │   ├── appsettings.json
    │   │   ├── Controllers
    │   │   │   └── MonitoringController.cs
    │   │   ├── crd-controller.csproj
    │   │   ├── HealthChecks
    │   │   │   └── KubernetesPermissionsHelthCheck.cs
    │   │   ├── HostedServices
    │   │   │   └── V1Alpha2Controller.cs
    │   │   ├── LoggingMiddleware.cs
    │   │   ├── metrics
    │   │   │   └── Counters.cs
    │   │   ├── Models
    │   │   │   └── V1Alpha2
    │   │   │       └── KamusSecret.cs
    │   │   ├── Program.cs
    │   │   ├── Properties
    │   │   │   └── launchSettings.json
    │   │   ├── Startup.cs
    │   │   └── utils
    │   │       ├── KeyManagementExtensions.cs
    │   │       ├── KubernetesExtensions.cs
    │   │       └── LoggingExtensions.cs
    │   ├── decrypt-api
    │   │   ├── appsettings.Development.json
    │   │   ├── appsettings.json
    │   │   ├── Controllers
    │   │   │   ├── DecryptController.cs
    │   │   │   └── MonitoringController.cs
    │   │   ├── decrypt-api.csproj
    │   │   ├── ErrorHandlingMiddleware.cs
    │   │   ├── Extensions
    │   │   │   └── LoggingExtensions.cs
    │   │   ├── KubernetesAuthentication
    │   │   │   ├── KubernetesAuthenticationHandler.cs
    │   │   │   └── KubernetesAuthenticationOptions.cs
    │   │   ├── Models
    │   │   │   └── DecryptRequest.cs
    │   │   ├── Program.cs
    │   │   ├── Properties
    │   │   │   └── launchSettings.json
    │   │   └── Startup.cs
    │   ├── encrypt-api
    │   │   ├── appsettings.Development.json
    │   │   ├── appsettings.json
    │   │   ├── Controllers
    │   │   │   ├── EncryptController.cs
    │   │   │   └── MonitoringController.cs
    │   │   ├── encrypt-api.csproj
    │   │   ├── ErrorHandlingMiddleware.cs
    │   │   ├── Extensions
    │   │   │   └── LoggingExtensions.cs
    │   │   ├── Models
    │   │   │   └── EncryptRequest.cs
    │   │   ├── Program.cs
    │   │   ├── Properties
    │   │   │   └── launchSettings.json
    │   │   └── Startup.cs
    │   └── key-managment
    │       ├── AwsKeyManagement.cs
    │       ├── AzureKeyVaultKeyManagement.cs
    │       ├── EnvelopeEncryptionDecorator.cs
    │       ├── EnvelopeEncryptionUtils.cs
    │       ├── GoogleCloudKeyManagement.cs
    │       ├── IKeyManagement.cs
    │       ├── KeyIdCreator.cs
    │       ├── key-managment.csproj
    │       ├── RijndaelUtils.cs
    │       ├── ServiceCollectionExtensions.cs
    │       └── SymmetricKeyManagement.cs
    └── tests
        ├── blackbox
        │   ├── appsettings.json
        │   ├── blackbox.csproj
        │   ├── compose
        │   │   ├── docker-compose.ci.yaml
        │   │   ├── docker-compose.local.yaml
        │   │   ├── docker-compose.yaml
        │   │   ├── glue
        │   │   │   └── glue.json
        │   │   └── reports
        │   │       └── glue.json
        │   ├── Dockerfile
        │   ├── EncryptControllerTests.cs
        │   ├── MonitoringControllerTests.cs
        │   ├── run_test.sh
        │   ├── Utils
        │   │   ├── baerer
        │   │   │   ├── JwtProvider.cs
        │   │   │   └── JwtSignInHandler.cs
        │   │   ├── ConfigurationProvider.cs
        │   │   └── HttpClientProvider.cs
        │   └── Wiremock
        │       ├── Dockerfile
        │       └── mappings
        │           ├── apis_authenticationk8sio_v1_tokenreviews-ff46d3b4-0aad-422d-8215-e99cff8f3188.json
        │           ├── apis_authorizationk8sio_v1_selfsubjectaccessreviews-b94a1942-1c74-40cd-9136-0df1d2217e77.json
        │           └── api_v1_namespaces_default_serviceaccounts_default-223d2c84-2e62-451a-a352-829107a55828.json
        ├── crd-controller
        │   ├── crd-controller.csproj
        │   ├── crd.yaml
        │   ├── deployment.yaml
        │   ├── FlowTest.cs
        │   ├── key.crt
        │   ├── kind-config.yaml
        │   ├── requirements.txt
        │   ├── run-tests.sh
        │   ├── service-account.yaml
        │   ├── tls-KamusSecretV1Alpha2-with-annotations.yaml
        │   ├── tls-KamusSecretV1Alpha2.yaml
        │   ├── tls-Secret.yaml
        │   └── updated-tls-KamusSecretV1Alpha2.yaml
        ├── integration
        │   ├── AwsKeyManagementTests.cs
        │   ├── AzureKeyVaultIntegrationTests.cs
        │   ├── EnvelopeDecoratorIntegrationTests.cs
        │   ├── GoogleCloudKeyManagementTests.cs
        │   ├── integration.csproj
        │   ├── settings.json
        │   └── Utils.cs
        └── unit
            ├── KeyManagment
            │   └── SymmetricKeyManagmentTests.cs
            └── unit.csproj

83 directories, 225 files

标签:

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警