-
Notifications
You must be signed in to change notification settings - Fork 567
add k8gb security self-assessment #1446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
elohmrow
wants to merge
5
commits into
cncf:main
Choose a base branch
from
elohmrow:elohmrow-k8gb-ssa-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c50e65e
add k8gb security self-assessment
elohmrow 4285e96
Update community/assessments/projects/k8gb/self-assessment.md
elohmrow d7d74b0
Update self-assessment.md
elohmrow 1d493fc
Update self-assessment.md
elohmrow 579ac6c
Update community/assessments/projects/k8gb/self-assessment.md
elohmrow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
|
|
||
| Security reviewers: Yury Tsarev, Jirka Kremser | ||
|
|
||
| This document provides a self-assessment of the k8gb project following the guidelines outlined by the CNCF TAG Security group. The purpose is to evaluate k8gb’s current security posture and alignment with best practices, ensuring that it is suitable for adoption at a CNCF incubation level. | ||
| This document provides a self-assessment of the k8gb project following the guidelines outlined by the CNCF TAG Security and Compliance group. The purpose is to evaluate k8gb’s current security posture and alignment with best practices, ensuring that it is suitable for adoption at a CNCF incubation level. | ||
|
|
||
| ## Table of Contents | ||
|
|
||
|
|
@@ -45,30 +45,30 @@ This document provides a self-assessment of the k8gb project following the guide | |
|
|
||
| To increase the software supply chain security, we encourage our users to consume k8gb container images with Kyverno's admission webhook | ||
| ([/policy](https://kyverno.io/docs/writing-policies/verify-images/sigstore/#verifying-image-signatures)) that will ensure that | ||
| images are signed and nobody had tampered with them. Our public key that can be used to verify this is in the root or our repository. | ||
| images are signed and nobody had tempered with them. Our public key that can be used to verify this is in the root or our repository. | ||
elohmrow marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Overview | ||
|
|
||
| k8gb is implemented using the Kubernetes operator pattern with a single CRD to enable Global Load Balancing. k8gb provides independent GSLB capability to any Ingress or Service without a dedicated management cluster, instead relying on timeproof DNS. k8gb has no single point of failure, and uses Kubernetes native application health checks (such as liveness and readiness probes) to update DNS to aid in load balancing decisions. | ||
| k8gb is implemented using the Kubernetes operator pattern with a single CRD (Custom Resource Definition) to enable Global Load Balancing. k8gb provides independent GSLB (Global Server Load Balancing) capability to any Ingress or Service without a dedicated management cluster, instead relying on timeproof DNS (Domain Name System). k8gb has no single point of failure, and uses Kubernetes native application health checks (such as liveness and readiness probes) to update DNS records to aid in load balancing decisions. | ||
|
|
||
| ### Background | ||
|
|
||
| Global enterprises moving to the cloud need a global load balancer to make decisions based on Kubernetes services. Proprietary software and vendors exist, but these are expensive, complex, and not cloud native. Some require dedicated hardware and run outside Kubernetes. | ||
| Global enterprises moving to the cloud need a global load balancer to make intelligent routing decisions based on the health and availability of Kubernetes services across multiple clusters and geographic regions. Traditional proprietary software and vendor solutions exist, but these are often expensive, complex, and not cloud native. Many require dedicated hardware appliances and operate outside the Kubernetes ecosystem, creating operational overhead and vendor lock-in. | ||
|
|
||
| k8gb is a vendor-neutral, CNCF Sandbox project. It is the only cloud native Kubernetes Global Load Balancer. k8gb does not require any special software or hardware - it relies only on OSS / CNCF projects, and fits with existing Kubernetes workflows like: GitOps, Kustomize, and Helm. | ||
| k8gb addresses these challenges as a vendor-neutral, CNCF (Cloud Native Computing Foundation) Sandbox project. It is designed as a cloud-native Kubernetes Global Load Balancer that operates entirely within the Kubernetes ecosystem. Unlike traditional solutions, k8gb does not require any special software, dedicated hardware, or external management systems - it relies exclusively on open source software (OSS) and CNCF projects, integrating seamlessly with existing Kubernetes workflows such as GitOps, Kustomize, and Helm package management. | ||
|
|
||
| ### Actors | ||
|
|
||
| The individual parts of k8gb that interact to provide the desired functionality. | ||
|
|
||
| - CoreDNS | ||
| - Role: Embedded [custom CoreDNS](https://github.com/k8gb-io/coredns-crd-plugin) to serve DNS requests. | ||
| - Role: Embedded [custom CoreDNS](https://github.com/k8gb-io/coredns-crd-plugin) to serve DNS (Domain Name System) requests. | ||
| - Isolation: runs as its own Pod | ||
| - ExternalDNS | ||
| - Role: Integrated ExternalDNS to automate zone delegation configuration. | ||
| - Isolation: runs as its own Pod | ||
| - k8gb Controller | ||
| - Role: Coordinates logic according to the GSLB strategy. | ||
| - Role: Coordinates logic according to the GSLB (Global Server Load Balancing) strategy. | ||
| - Isolation: runs as its own Pod | ||
|
|
||
| ### Actions | ||
elohmrow marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
@@ -84,32 +84,50 @@ The steps that k8gb performs in order to provide the desired functionality. See | |
| - k8gb Controller | ||
| - Functionality: | ||
| - Watches all namespaces for `Gslb` custom resources. | ||
| - Creates DNSEndpoint CR populated with information from `Gslb` Ingress status (application FQDN and active IP addresses, which are used for dynamic A record composition). | ||
| - Creates DNSEndpoint to configure DNS zone delegation in an external DNS provider. | ||
| - Creates DNSEndpoint CR (Custom Resource) populated with information from `Gslb` Ingress status (application FQDN - Fully Qualified Domain Name and active IP addresses, which are used for dynamic A record composition). | ||
| - Creates DNSEndpoint to configure DNS (Domain Name System) zone delegation in an external DNS provider. | ||
|
|
||
| ### Goals | ||
|
|
||
| The intended goals of k8gb, including the security guarantees it provides. | ||
|
|
||
| #### Secure and Verified Builds | ||
|
|
||
| Ensure all K8GB releases are signed and verified to guarantee authenticity and integrity, protecting users from tampered or malicious builds. | ||
| Ensure all k8gb releases are signed and verified to guarantee authenticity and integrity, protecting users from tampered or malicious builds. | ||
|
|
||
| #### Minimal Attack Surface | ||
|
|
||
| Expose only the necessary ports for GSLB operations, such as DNS (53/tcp and 53/udp), to reduce the attack surface and enhance security. | ||
| k8gb is designed with a minimal attack surface by exposing only the necessary ports for GSLB (Global Server Load Balancing) operations. Specifically, only DNS ports (53/tcp and 53/udp) are exposed for DNS resolution services. This approach significantly reduces the attack surface compared to traditional load balancing solutions that typically require multiple ports for: | ||
| - Management interfaces (often HTTP/HTTPS on various ports) | ||
| - Health check endpoints | ||
| - Administrative APIs | ||
| - Monitoring and telemetry interfaces | ||
|
|
||
| By operating exclusively through DNS, k8gb eliminates these additional attack vectors while maintaining full functionality. | ||
|
|
||
| #### Secure Deployment Practices | ||
|
|
||
| Provide secure default configurations and documentation to help users deploy K8GB in a way that aligns with Kubernetes security best practices. | ||
| k8gb implements comprehensive secure deployment practices through multiple layers: | ||
|
|
||
| **Secure Defaults**: All k8gb components are configured with security-first defaults, including: | ||
| - Minimal required permissions through restrictive RBAC (Role-Based Access Control) policies | ||
| - Non-root container execution with read-only root filesystems where possible | ||
| - Resource limits and security contexts to prevent privilege escalation | ||
|
|
||
| **Documentation and Guidance**: Extensive documentation provides users with: | ||
| - Security hardening guidelines for production deployments | ||
| - Best practices for credential management and secret handling | ||
| - Network security recommendations for multi-cluster deployments | ||
| - Integration patterns with security tools like Pod Security Standards and network policies | ||
|
|
||
| **Kubernetes-Native Security**: k8gb leverages Kubernetes built-in security mechanisms rather than implementing custom security layers, ensuring compatibility with existing security policies and reducing complexity. | ||
|
|
||
| These goals aim to make K8GB a reliable and secure solution for global load balancing while minimizing risks and ensuring trust in the project's artifacts. | ||
| These goals aim to make k8gb a reliable and secure solution for global load balancing while minimizing risks and ensuring trust in the project's artifacts. | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would assume you actually want to route traffic to only the correct places, balance it according to the policies specified, etc. |
||
| See also [Intended use](#intended-use). | ||
|
|
||
| ### Non-goals | ||
|
|
||
| Non-goals that a reasonable reader of k8gb’s documentation could believe may be in scope. | ||
| The k8gb project is focused on providing global load balancing and failover capabilities for Kubernetes applications. However, there are certain security-related features and responsibilities that are intentionally out of scope. Below are the non-goals, along with explanations for why they are not within the project's scope: | ||
|
|
||
| #### Traffic Handling and TLS Termination: | ||
|
|
@@ -130,25 +148,43 @@ This self-assessment is created by the k8gb team to perform an internal analysis | |
|
|
||
| This document serves to provide k8gb users with an initial understanding of k8gb's security, where to find existing security documentation, k8gb plans for security, and general overview of k8gb security practices, both for development of k8gb as well as security of k8gb. | ||
|
|
||
| This document provides the CNCF TAG-Security with an initial understanding of k8gb to assist in a joint-assessment, necessary for projects under incubation. Taken together, this document and the joint-assessment serve as a cornerstone for if and when k8gb seeks graduation and is preparing for a security audit. | ||
| This document provides the CNCF TAG Security and Compliance with an initial understanding of k8gb to assist in a joint-assessment, necessary for projects under incubation. Taken together, this document and the joint-assessment serve as a cornerstone for if and when k8gb seeks graduation and is preparing for a security audit. | ||
|
|
||
| ## Security functions and features | ||
|
|
||
| | Component | Applicability | Description of Importance | | ||
| | --------- | ------------- | ------------------------- | | ||
| | DNS-Based Traffic Management| `Critical`| k8gb uses DNS for global load balancing and failover, ensuring that traffic is routed to healthy clusters without passing through k8gb itself. This design minimizes the attack surface and reduces the risk of traffic interception or manipulation. | | ||
| | Minimal Port Exposure | `Critical` | k8gb exposes only essential ports (53/tcp and 53/udp) for DNS operations, reducing the attack surface and limiting potential entry points for attackers. | | ||
| | DNS-Based Traffic Management| `Critical`| k8gb uses DNS for global load balancing and failover, ensuring that traffic is routed to healthy clusters without passing through k8gb itself. This design minimizes the attack surface compared to traditional proxy-based load balancers and reduces the risk of traffic interception or manipulation versus solutions that handle application traffic directly. | | ||
| | Minimal Port Exposure | `Critical` | k8gb exposes only essential ports (53/tcp and 53/udp) for DNS operations, significantly reducing the attack surface compared to traditional load balancers that require multiple ports for management interfaces, health checks, and traffic handling, thereby limiting potential entry points for attackers. | | ||
| | Integration with Kubernetes RBAC | `Critical` | k8gb relies on Kubernetes Role-Based Access Control (RBAC) to enforce authorization, ensuring that only authorized users can configure or modify k8gb resources. | | ||
| | Kubernetes Secrets for Sensitive Data | `Security Relevant` | k8gb uses Kubernetes secrets to store sensitive information, such as credentials and certificates, ensuring that this data is encrypted at rest and accessible only to authorized components. | | ||
| | Secure Default Configurations | `Security Relevant` | K8GB provides secure default configurations to help users deploy the project in a way that aligns with Kubernetes security best practices, reducing the risk of misconfiguration. | | ||
| | Secure Default Configurations | `Security Relevant` | k8gb provides secure default configurations to help users deploy the project in a way that aligns with Kubernetes security best practices, reducing the risk of misconfiguration compared to complex traditional load balancing solutions that often require extensive manual security hardening. | | ||
|
|
||
| ## Project compliance | ||
|
|
||
| List of what standards k8gb is compliant with, and how that compliance has been validated, or Future State | ||
|
|
||
| ### Future state | ||
|
|
||
| If k8gb is not compliant with any standards, note that here. Why is k8gb not compliant with any standards, and why that is the case. Will it need to be compliant in the future? | ||
| k8gb maintains strong compliance with several industry standards and frameworks: | ||
|
|
||
| **Supply Chain Levels for Software Artifacts (SLSA)**: | ||
| - k8gb currently implements SLSA Level 3 compliance using the official `slsa-framework/slsa-github-generator` | ||
| - All release artifacts include signed provenance attestations with cryptographic verification | ||
| - Build process isolation and non-falsifiable provenance are implemented | ||
| - Both container images and release binaries have complete SLSA provenance chains | ||
|
|
||
| **OpenSSF Scorecard Compliance**: | ||
| - k8gb maintains a strong OpenSSF Scorecard score with continuous monitoring via automated pipelines | ||
| - Implements security best practices including dependency management, vulnerability scanning, and security policy enforcement | ||
|
|
||
| **Container Security Standards**: | ||
| - All container images are signed with Cosign using keyless signing | ||
| - Software Bill of Materials (SBOM) generation for all releases | ||
| - Multi-architecture container builds with attestation | ||
|
|
||
| **Current Compliance Status**: | ||
| k8gb has achieved strong compliance across multiple security frameworks without pursuing formal certification, as this aligns with the open-source nature of the project while providing enterprise users with the security assurance they require for production deployments. | ||
|
|
||
| ## Secure development practices | ||
|
|
||
|
|
@@ -171,21 +207,20 @@ In order to secure the SDLC from development to deployment, the following measur | |
|
|
||
| - CI/CD Pipeline: | ||
| - Use GitHub Actions for continuous integration and deployment (CI/CD) | ||
| - Include linting, unit testing, and integration testing in the pipeline to catch issues early | ||
| - golangci-lint pipeline | ||
| - go report pipeline https://goreportcard.com/report/github.com/k8gb-io/k8gb | ||
| - KubeLinter pipeline | ||
| - Terratest end-to-end testing pipeline | ||
| - Chainsaw end-to-end testing pipeline | ||
| - Integration of security scanning tools (e.g., static analysis, vulnerability scanning) | ||
| - CodeQL static analysis pipeline | ||
| - OpenSSF Scorecard pipeline | ||
| - Include comprehensive testing and quality assurance to catch issues early: | ||
| - **Code Quality**: golangci-lint pipeline for code quality and potential security issues | ||
| - **Quality Monitoring**: Go Report Card integration (https://goreportcard.com/report/github.com/k8gb-io/k8gb) | ||
| - **Kubernetes Best Practices**: KubeLinter pipeline for Kubernetes configuration validation | ||
| - **Functional Testing**: Terratest and Chainsaw end-to-end testing pipelines for functionality validation | ||
| - **Security-Focused Scanning and Analysis**: | ||
| - **Static Security Analysis**: CodeQL pipeline for vulnerability detection and security issue identification | ||
| - **Security Posture Assessment**: OpenSSF Scorecard pipeline for continuous security best practices monitoring | ||
|
|
||
| - Release Process: | ||
| - Automate the release process to reduce human error and ensure consistency. | ||
| - Release pipeline | ||
| - Sign releases to guarantee their authenticity and integrity. | ||
| - Generation a Software Bill of Materials (SBOM) for each release to improve transparency. | ||
| - **Automated Release Pipeline**: Fully automated process to eliminate human error and ensure consistency | ||
| - **Cryptographic Signing**: All releases signed using Cosign with keyless signing for authenticity and integrity | ||
| - **SLSA Level 3 Compliance**: Generate provenance attestations using official SLSA framework for supply chain security | ||
| - **Software Bill of Materials (SBOM)**: Comprehensive SBOM generation for transparency and vulnerability tracking | ||
|
|
||
| - Software Composition Analysis | ||
| - Integration of dependency management tool (Mend Renovate) to monitor and secure third-party dependencies. | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.