Skip to content

Commit ed68c10

Browse files
authored
Merge pull request #671 from OWASP/upgrade-wrongsecrets-1.9.1
initial update of wrongsecrets to 1.9.2beta7
2 parents 5ec7761 + c8666fc commit ed68c10

19 files changed

+200
-158
lines changed

aws/.terraform.lock.hcl

Lines changed: 68 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aws/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ You can use the [Juiceshop CTF CLI](https://github.com/juice-shop/juice-shop-ctf
7272
Follow the following steps:
7373

7474
```shell
75-
npm install -g juice-shop-ctf-cli@9.1.2
75+
npm install -g juice-shop-ctf-cli@10.0.1
7676
juice-shop-ctf #choose ctfd and https://wrongsecrets-ctf.herokuapp.com as domain. No trailing slash! The key is 'test', by default feel free to enable hints. We do not support snippets or links/urls to code or hints.
7777
```
7878

@@ -150,18 +150,18 @@ The documentation below is auto-generated to give insight on what's created via
150150

151151
| Name | Version |
152152
|------|---------|
153-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.69.0 |
153+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.70.0 |
154154
| <a name="provider_http"></a> [http](#provider\_http) | 3.4.5 |
155155
| <a name="provider_random"></a> [random](#provider\_random) | 3.6.3 |
156156

157157
## Modules
158158

159159
| Name | Source | Version |
160160
|------|--------|---------|
161-
| <a name="module_cluster_autoscaler_irsa_role"></a> [cluster\_autoscaler\_irsa\_role](#module\_cluster\_autoscaler\_irsa\_role) | terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks | ~> 5.44.0 |
162-
| <a name="module_ebs_csi_irsa_role"></a> [ebs\_csi\_irsa\_role](#module\_ebs\_csi\_irsa\_role) | terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks | ~> 5.44.0 |
161+
| <a name="module_cluster_autoscaler_irsa_role"></a> [cluster\_autoscaler\_irsa\_role](#module\_cluster\_autoscaler\_irsa\_role) | terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks | ~> 5.46 |
162+
| <a name="module_ebs_csi_irsa_role"></a> [ebs\_csi\_irsa\_role](#module\_ebs\_csi\_irsa\_role) | terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks | ~> 5.46 |
163163
| <a name="module_eks"></a> [eks](#module\_eks) | terraform-aws-modules/eks/aws | 20.24.2 |
164-
| <a name="module_load_balancer_controller_irsa_role"></a> [load\_balancer\_controller\_irsa\_role](#module\_load\_balancer\_controller\_irsa\_role) | terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks | ~> 5.44.0 |
164+
| <a name="module_load_balancer_controller_irsa_role"></a> [load\_balancer\_controller\_irsa\_role](#module\_load\_balancer\_controller\_irsa\_role) | terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks | ~> 5.46 |
165165
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 5.13.0 |
166166

167167
## Resources

aws/build-and-deploy-aws.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ kubectl apply -f https://raw.githubusercontent.com/aws/secrets-store-csi-driver-
101101

102102
echo "preparing calico via Helm"
103103
helm repo add projectcalico https://docs.projectcalico.org/charts
104-
helm upgrade --install calico projectcalico/tigera-operator --version v3.21.4
104+
helm upgrade --install calico projectcalico/tigera-operator --version v3.28.2
105105

106106
echo "Generate secrets manager challenge secret 2"
107107
aws secretsmanager put-secret-value --secret-id wrongsecret-2 --secret-string "$(openssl rand -base64 24)" --region $AWS_REGION --output json --no-cli-pager
@@ -140,7 +140,7 @@ echo "App password is ${APP_PASSWORD}"
140140
echo "executing helm install of wrongsecrets"
141141
helm upgrade --install wrongsecrets ../helm/wrongsecrets-ctf-party \
142142
--set="balancer.env.K8S_ENV=aws" \
143-
--set="balancer.tag=1.9.0alpha5-cloud" \
143+
--set="balancer.tag=1.9.1beta5-cloud" \
144144
--set="balancer.env.IRSA_ROLE=${IRSA_ROLE_ARN}" \
145145
--set="balancer.env.REACT_APP_ACCESS_PASSWORD=${APP_PASSWORD}" \
146146
--set="balancer.env.REACT_APP_S3_BUCKET_URL=s3://${STATE_BUCKET}" \
@@ -150,11 +150,8 @@ helm upgrade --install wrongsecrets ../helm/wrongsecrets-ctf-party \
150150
# Install CTFd
151151
echo "Installing CTFd"
152152

153-
export HELM_EXPERIMENTAL_OCI=1
154-
kubectl create namespace ctfd
155-
156153
# Double base64 encoding to prevent weird character errors in ctfd
157-
helm upgrade --install ctfd -n ctfd oci://ghcr.io/bman46/ctfd/ctfd --version 0.6.3\
154+
helm upgrade --install ctfd -n ctfd oci://ghcr.io/bman46/ctfd/ctfd --create-namespace --version v0.9.3\
158155
--set="redis.auth.password=$(openssl rand -base64 24 | base64)" \
159156
--set="mariadb.auth.rootPassword=$(openssl rand -base64 24 | base64)" \
160157
--set="mariadb.auth.password=$(openssl rand -base64 24 | base64)" \

aws/k8s/ctfd-ingress.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
annotations:
77
alb.ingress.kubernetes.io/scheme: internet-facing
88
alb.ingress.kubernetes.io/target-type: instance
9+
alb.ingress.kubernetes.io/success-codes: 200-399
910
acme.cert-manager.io/http01-edit-in-place: "true"
1011
# cert-manager.io/issue-temporary-certificate: "true"
1112
#uncomment and configure below if you want to use tls, don't forget to override the cookie to a secure value!

aws/k8s/wrongsecrets-balancer-ingress.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
annotations:
77
alb.ingress.kubernetes.io/scheme: internet-facing
88
alb.ingress.kubernetes.io/target-type: instance
9+
alb.ingress.kubernetes.io/success-codes: 200-399
910
acme.cert-manager.io/http01-edit-in-place: "true"
1011
# cert-manager.io/issue-temporary-certificate: "true"
1112
#uncomment and configure below if you want to use tls, don't forget to override the cookie to a secure value!

aws/main.tf

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,18 @@ module "eks" {
7474
aws-ebs-csi-driver = {
7575
most_recent = true
7676
service_account_role_arn = module.ebs_csi_irsa_role.iam_role_arn
77+
configuration_values = jsonencode({
78+
defaultStorageClass = {
79+
enabled = true
80+
}
81+
})
7782
}
7883
}
7984

85+
cluster_upgrade_policy = {
86+
support_type = "STANDARD"
87+
}
88+
8089

8190
cluster_endpoint_private_access = true
8291
cluster_endpoint_public_access = true
@@ -89,32 +98,42 @@ module "eks" {
8998

9099
create_cloudwatch_log_group = true
91100
cluster_enabled_log_types = ["api", "audit", "authenticator"]
92-
cloudwatch_log_group_retention_in_days = 14 #it's a ctf , we don't need non-necessary costs!
101+
cloudwatch_log_group_retention_in_days = 14 #it's a ctf , we don't need unnecessary costs!
93102

94103
# apply when available: iam_role_permissions_boundary = "arn:aws:iam::${local.account_id}:policy/service-user-creation-permission-boundary"
95104
eks_managed_node_group_defaults = {
96-
disk_size = 256
97-
disk_type = "gp3"
98-
disk_throughput = 150
99-
disk_iops = 3000
100-
instance_types = ["t3a.medium"]
105+
instance_types = ["m5a.xlarge"]
106+
block_device_mappings = [
107+
{
108+
device_name = "/dev/xvda"
109+
ebs = {
110+
volume_size = 200
111+
volume_type = "gp3"
112+
iops = 3000
113+
throughput = 150
114+
delete_on_termination = true
115+
}
116+
}
117+
]
118+
metadata_options = {
119+
http_tokens = "required",
120+
}
101121

102122
iam_role_additional_policies = {
103123
AmazonEKSWorkerNodePolicy : "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy",
104124
AmazonEKS_CNI_Policy : "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy",
105125
AmazonEC2ContainerRegistryReadOnly : "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly",
106126
AmazonSSMManagedInstanceCore : "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore",
107-
AmazonEKSVPCResourceController : "arn:aws:iam::aws:policy/AmazonEKSVPCResourceController"
127+
AmazonEKSVPCResourceController : "arn:aws:iam::aws:policy/AmazonEKSVPCResourceController",
128+
AmazonEBSCSIDriverPolicy : "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy"
108129
}
109130
}
110131

111132
eks_managed_node_groups = {
112133
bottlerocket_default = {
113-
use_custom_launch_template = false
114-
min_size = 3
115-
max_size = 50
116-
desired_size = 3
117-
134+
min_size = 3
135+
max_size = 50
136+
desired_size = 3
118137
capacity_type = "ON_DEMAND"
119138

120139
ami_type = "BOTTLEROCKET_x86_64"
@@ -144,7 +163,7 @@ module "eks" {
144163
# Cluster Autoscaler IRSA
145164
module "cluster_autoscaler_irsa_role" {
146165
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks"
147-
version = "~> 5.44.0"
166+
version = "~> 5.46"
148167

149168

150169
role_name = "wrongsecrets-cluster-autoscaler"
@@ -161,7 +180,7 @@ module "cluster_autoscaler_irsa_role" {
161180

162181
module "ebs_csi_irsa_role" {
163182
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks"
164-
version = "~> 5.44.0"
183+
version = "~> 5.46"
165184

166185
role_name = "wrongsecrets-ebs-csi"
167186
attach_ebs_csi_policy = true
@@ -176,7 +195,7 @@ module "ebs_csi_irsa_role" {
176195

177196
module "load_balancer_controller_irsa_role" {
178197
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks"
179-
version = "~> 5.44.0"
198+
version = "~> 5.46"
180199

181200
role_name = "wrongsecrets-load-balancer-controller"
182201
attach_load_balancer_controller_policy = true

0 commit comments

Comments
 (0)