[!note]
Whenever you need to change access from operator admin to admin@example.com prefer to re-login by clearing the ~/.kube/cache/oidc-login cache instead of impersonation --as=admin@example.com.
[x] Set the environment variable NAMESPACE to an application developer namespace (this cannot be a subnamespace)
[x] Set the environment variable DOMAIN to the environment domain
Automated tests
[!note]
As platform administrator
[x] Successful ./bin/ck8s test sc|wc
[x] From tests/ successful make build-main
[ ] From tests/ successful make ctr-run-end-to-end
Kubernetes access
[!note]
As platform administrator
[x] Can login as platform administrator via Dex with IdP
[!note]
As application developer admin@example.com
[x] Can login as application developer admin@example.com via Dex with static user
[x] Can list access
kubectl -n "${NAMESPACE}" auth can-i --list
[x] Can delegate admin access
$ kubectl -n "${NAMESPACE}" edit rolebinding extra-workload-admins
# Add some subject
subjects:
# You can specify more than one "subject"
- kind: User
name: jane # "name" is case sensitive
apiGroup: rbac.authorization.k8s.io
[x] Can delegate view access
$ kubectl edit clusterrolebinding extra-user-view
# Add some subject
subjects:
# You can specify more than one "subject"
- kind: User
name: jane # "name" is case sensitive
apiGroup: rbac.authorization.k8s.io
[x] Ensure the default roles, rolebindings, and networkpolicies propagated
Commands
```bash
kubectl get role,rolebinding,netpol -n "${NAMESPACE}"
kubectl get role,rolebinding,netpol -n "${NAMESPACE}-qa-test"
```
Harbor
[!note]
As application developer admin@example.com
[x] Can login as application developer via Dex with static user
Steps
- Login to Harbor with `admin@example.com`
```bash
xdg-open "https://harbor.${DOMAIN}"
```
- Login to Harbor with the admin user and promote `admin@example.com` to admin
- Re-login with `admin@example.com`
[x] Can login to platform administrator Grafana via Dex with IdP
[x] Dashboards are available and viewable
[x] Metrics are available from all clusters
[!note]
As application developer admin@example.com
[x] Can login to application developer Grafana via Dex with static user
Steps
- Login to Grafana with `admin@example.com`
```bash
xdg-open "https://grafana.${DOMAIN}"
```
- Login to Grafana with the admin user and promote `admin@example.com` to admin
- Re-login with `admin@example.com`
[x] Welcome dashboard presented first
[x] Dashboards are available and viewable
[x] Metrics are available from all clusters
[x] Metrics are available from user demo application
[ ] From tests/ successful make ctr-run-end-to-end
Kubernetes access
[!note]
As platform administrator
[x] Can login as platform administrator via Dex with IdP
[!note]
As application developer admin@example.com
[x] Can login as application developer admin@example.com via Dex with static user
[x] Can list access
kubectl -n "${NAMESPACE}" auth can-i --list
[x] Can delegate admin access
$ kubectl -n "${NAMESPACE}" edit rolebinding extra-workload-admins
# Add some subject
subjects:
# You can specify more than one "subject"
- kind: User
name: jane # "name" is case sensitive
apiGroup: rbac.authorization.k8s.io
[x] Can delegate view access
$ kubectl edit clusterrolebinding extra-user-view
# Add some subject
subjects:
# You can specify more than one "subject"
- kind: User
name: jane # "name" is case sensitive
apiGroup: rbac.authorization.k8s.io
[x] Ensure the default roles, rolebindings, and networkpolicies propagated
Commands
```bash
kubectl get role,rolebinding,netpol -n "${NAMESPACE}"
kubectl get role,rolebinding,netpol -n "${NAMESPACE}-qa-test"
```
Harbor
[!note]
As application developer admin@example.com
[x] Can login as application developer via Dex with static user
Steps
- Login to Harbor with `admin@example.com`
```bash
xdg-open "https://harbor.${DOMAIN}"
```
- Login to Harbor with the admin user and promote `admin@example.com` to admin
- Re-login with `admin@example.com`
[x] Can login to platform administrator Grafana via Dex with IdP
[x] Dashboards are available and viewable
[x] Metrics are available from all clusters
[!note]
As application developer admin@example.com
[x] Can login to application developer Grafana via Dex with static user
Steps
- Login to Grafana with `admin@example.com`
```bash
xdg-open "https://grafana.${DOMAIN}"
```
- Login to Grafana with the admin user and promote `admin@example.com` to admin
- Re-login with `admin@example.com`
[x] Welcome dashboard presented first
[x] Dashboards are available and viewable
[x] Metrics are available from all clusters
[x] Metrics are available from user demo application
Overview
# Pre-QA steps
# Install QA steps
Infrastructure provider
Configuration
[x] Dex Static User - Enabled and
admin@example.com
added as an application developerCommands
```bash # configure yq4 -i '.grafana.user.oidc.allowedDomains += ["example.com"]' "${CK8S_CONFIG_PATH}/sc-config.yaml" yq4 -i 'with(.opensearch.extraRoleMappings[]; with(select(.mapping_name != "all_access"); .definition.users += ["admin@example.com"]))' "${CK8S_CONFIG_PATH}/sc-config.yaml" yq4 -i '.user.adminUsers += ["admin@example.com"]' "${CK8S_CONFIG_PATH}/wc-config.yaml" yq4 -i '.dex.enableStaticLogin = true' "${CK8S_CONFIG_PATH}/sc-config.yaml" pushd ~/path/to/apps/ # apply ./bin/ck8s apply sc ./bin/ck8s apply wc popd ```NAMESPACE
to an application developer namespace (this cannot be a subnamespace)DOMAIN
to the environment domainAutomated tests
./bin/ck8s test sc|wc
tests/
successfulmake build-main
tests/
successfulmake ctr-run-end-to-end
Kubernetes access
[x] Can login as application developer
admin@example.com
via Dex with static user[x] Can list access
[x] Can delegate admin access
[x] Can delegate view access
[x] Cannot run with root by default
Hierarchical Namespaces
[x] Can create a subnamespace by following the application developer docs
Commands
```bash kubectl apply -n "${NAMESPACE}" -f - <[x] Ensure the default roles, rolebindings, and networkpolicies propagated
Commands
```bash kubectl get role,rolebinding,netpol -n "${NAMESPACE}" kubectl get role,rolebinding,netpol -n "${NAMESPACE}-qa-test" ```Harbor
[x] Can login as application developer via Dex with static user
Steps
- Login to Harbor with `admin@example.com` ```bash xdg-open "https://harbor.${DOMAIN}" ``` - Login to Harbor with the admin user and promote `admin@example.com` to admin - Re-login with `admin@example.com`[x] Can create projects and push images by following the application developer docs
[x] Can configure image pull secret by following the application developer docs
[x] Can scan image for vulnerabilities
[x] Configure project to disallow vulnerabilities
[x] Configure project to allow vulnerabilities
Gatekeeper
[x] Can list OPA rules
[x] With invalid image repository, try to deploy, should warn due to constraint
[x] With invalid image tag, try to deploy, should fail due to constraint
[x] With unset networkpolicies, try to deploy, should warn due to constraint
[x] With unset resources, try to deploy, should fail due to constraint
[x] With valid values, try to deploy, should succeed
cert-manager and ingress-nginx
Metrics
[x] Can login to application developer Grafana via Dex with static user
Steps
- Login to Grafana with `admin@example.com` ```bash xdg-open "https://grafana.${DOMAIN}" ``` - Login to Grafana with the admin user and promote `admin@example.com` to admin - Re-login with `admin@example.com`[x] CISO dashboards available and working
List
- [Backup / Backup Status](https://elastisys.io/compliantkubernetes/ciso-guide/backup/) - [Cryptography / NGINX Ingress Controller](https://elastisys.io/compliantkubernetes/ciso-guide/cryptography/) - [Intrusion Detection / Falco](https://elastisys.io/compliantkubernetes/ciso-guide/intrusion-detection/) - [Policy-as-Code / Gatekeeper](https://elastisys.io/compliantkubernetes/ciso-guide/policy-as-code/) - [Network Security / NetworkPolicy](https://elastisys.io/compliantkubernetes/ciso-guide/network-security/) - [Capacity Management / Kubernetes Cluster Status](https://elastisys.io/compliantkubernetes/ciso-guide/capacity-management/) - [Vulnerability / Trivy Operator Dashboard](https://elastisys.io/compliantkubernetes/ciso-guide/vulnerability/)Alerts
Watchdog
,CPUThrottlingHigh
andFalcoAlert
Watchdog
firingLogs
Falco
[x] Deploy the falcosecurity/event-generator to generate events in wc
Commands
```bash # Install kubectl create namespace event-generator kubectl label namespace event-generator owner=operator helm repo add falcosecurity https://falcosecurity.github.io/charts helm repo update helm -n event-generator install event-generator falcosecurity/event-generator \ --set securityContext.runAsNonRoot=true \ --set securityContext.runAsGroup=65534 \ --set securityContext.runAsUser=65534 \ --set podSecurityContext.fsGroup=65534 \ --set config.actions="" # Uninstall helm -n event-generator uninstall event-generator kubectl delete namespace event-generator ```[x] Logs are available in OpenSearch Dashboards
[x] Logs are relevant
Network policies
Infrastructure tests
terraform plan
without changes# Upgrade QA steps
Infrastructure provider
Configuration
[x] Dex Static User - Enabled and
admin@example.com
added as an application developerCommands
```bash # configure yq4 -i '.grafana.user.oidc.allowedDomains += ["example.com"]' "${CK8S_CONFIG_PATH}/sc-config.yaml" yq4 -i 'with(.opensearch.extraRoleMappings[]; with(select(.mapping_name != "all_access"); .definition.users += ["admin@example.com"]))' "${CK8S_CONFIG_PATH}/sc-config.yaml" yq4 -i '.user.adminUsers += ["admin@example.com"]' "${CK8S_CONFIG_PATH}/wc-config.yaml" yq4 -i '.dex.enableStaticLogin = true' "${CK8S_CONFIG_PATH}/sc-config.yaml" pushd ~/path/to/apps/ # apply ./bin/ck8s apply sc ./bin/ck8s apply wc popd ```NAMESPACE
to an application developer namespace (this cannot be a subnamespace)DOMAIN
to the environment domainUpgrade
Automated tests
./bin/ck8s test sc|wc
tests/
successfulmake build-main
tests/
successfulmake ctr-run-end-to-end
Kubernetes access
[x] Can login as application developer
admin@example.com
via Dex with static user[x] Can list access
[x] Can delegate admin access
[x] Can delegate view access
[x] Cannot run with root by default
Hierarchical Namespaces
[x] Can create a subnamespace by following the application developer docs
Commands
```bash kubectl apply -n "${NAMESPACE}" -f - <[x] Ensure the default roles, rolebindings, and networkpolicies propagated
Commands
```bash kubectl get role,rolebinding,netpol -n "${NAMESPACE}" kubectl get role,rolebinding,netpol -n "${NAMESPACE}-qa-test" ```Harbor
[x] Can login as application developer via Dex with static user
Steps
- Login to Harbor with `admin@example.com` ```bash xdg-open "https://harbor.${DOMAIN}" ``` - Login to Harbor with the admin user and promote `admin@example.com` to admin - Re-login with `admin@example.com`[x] Can create projects and push images by following the application developer docs
[x] Can configure image pull secret by following the application developer docs
[x] Can scan image for vulnerabilities
[x] Configure project to disallow vulnerabilities
[x] Configure project to allow vulnerabilities
Gatekeeper
[x] Can list OPA rules
[x] With invalid image repository, try to deploy, should warn due to constraint
[x] With invalid image tag, try to deploy, should fail due to constraint
[x] With unset networkpolicies, try to deploy, should warn due to constraint
[x] With unset resources, try to deploy, should fail due to constraint
[x] With valid values, try to deploy, should succeed
cert-manager and ingress-nginx
Metrics
[x] Can login to application developer Grafana via Dex with static user
Steps
- Login to Grafana with `admin@example.com` ```bash xdg-open "https://grafana.${DOMAIN}" ``` - Login to Grafana with the admin user and promote `admin@example.com` to admin - Re-login with `admin@example.com`[x] CISO dashboards available and working
List
- [Backup / Backup Status](https://elastisys.io/compliantkubernetes/ciso-guide/backup/) - [Cryptography / NGINX Ingress Controller](https://elastisys.io/compliantkubernetes/ciso-guide/cryptography/) - [Intrusion Detection / Falco](https://elastisys.io/compliantkubernetes/ciso-guide/intrusion-detection/) - [Policy-as-Code / Gatekeeper](https://elastisys.io/compliantkubernetes/ciso-guide/policy-as-code/) - [Network Security / NetworkPolicy](https://elastisys.io/compliantkubernetes/ciso-guide/network-security/) - [Capacity Management / Kubernetes Cluster Status](https://elastisys.io/compliantkubernetes/ciso-guide/capacity-management/) - [Vulnerability / Trivy Operator Dashboard](https://elastisys.io/compliantkubernetes/ciso-guide/vulnerability/)Alerts
Watchdog
,CPUThrottlingHigh
andFalcoAlert
Watchdog
firingLogs
Falco
[x] Deploy the falcosecurity/event-generator to generate events in wc
Commands
```bash # Install kubectl create namespace event-generator kubectl label namespace event-generator owner=operator helm repo add falcosecurity https://falcosecurity.github.io/charts helm repo update helm -n event-generator install event-generator falcosecurity/event-generator \ --set securityContext.runAsNonRoot=true \ --set securityContext.runAsGroup=65534 \ --set securityContext.runAsUser=65534 \ --set podSecurityContext.fsGroup=65534 \ --set config.actions="" # Uninstall helm -n event-generator uninstall event-generator kubectl delete namespace event-generator ```[ ] Logs are available in OpenSearch Dashboards
[ ] Logs are relevant
Network policies
Infrastructure tests
terraform plan
without changes# Post-QA steps
# Release steps