Skip to content

Commit 3cb98df

Browse files
authored
Merge branch 'master' into issue-2357-upgrade-k8s-1.35
2 parents 7e88f9f + 58c3c73 commit 3cb98df

32 files changed

+466
-106
lines changed

.github/scripts/.bash_history

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ rm -rf jdk-18_linux-x64_bin.deb
347347
git rebase -i main
348348
git rebase -i master
349349
git stash
350-
export tempPassword="OeyxzcLdUbln0KxnhlQaT2wQKfpJpV/A7/ach+erH4M="
350+
export tempPassword="mVskm4vj9tBf4BqqQEyPaFtTAFJ+K9csVbQkwF3Kj04="
351351
mvn run tempPassword
352352
k6
353353
npx k6

.github/scripts/docker-create.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ Heroku_publish_demo() {
6464
heroku container:login
6565
echo "heroku deployment to demo"
6666
cd ../..
67-
# heroku container:push --recursive --arg argBasedVersion=${tag}heroku --app arcane-scrubland-42646
68-
heroku container:push --arg argBasedVersion=${tag}heroku --app arcane-scrubland-42646
67+
heroku container:push web --arg argBasedVersion=${tag} --app arcane-scrubland-42646
6968
heroku container:release web --app arcane-scrubland-42646
7069
# heroku container:push --recursive --arg argBasedVersion=${tag}heroku,CTF_ENABLED=true,HINTS_ENABLED=false --app wrongsecrets-ctf
7170
# heroku container:release web --app wrongsecrets-ctf

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM bellsoft/liberica-openjre-debian:25-cds AS builder
22
WORKDIR /builder
33

4-
ARG argBasedVersion="1.13.1-alpha5"
4+
ARG argBasedVersion="1.13.1-alpha6"
55

66
COPY --chown=wrongsecrets target/wrongsecrets-${argBasedVersion}-SNAPSHOT.jar application.jar
77
RUN java -Djarmode=tools -jar application.jar extract --layers --destination extracted
@@ -59,7 +59,7 @@ RUN mkdir -p /var/run/secrets/kubernetes.io/serviceaccount && \
5959
chmod 600 /var/run/secrets/kubernetes.io/serviceaccount/token
6060

6161
# Create a dynamic archive
62-
RUN java --add-modules=jdk.unsupported -XX:ArchiveClassesAtExit=application.jsa -Dspring.context.exit=onRefresh -jar application.jar
62+
RUN java -XX:ArchiveClassesAtExit=application.jsa -Dspring.context.exit=onRefresh -jar application.jar
6363

6464
# Clean up the mocked token
6565
RUN rm -rf /var/run/secrets/kubernetes.io
@@ -71,5 +71,4 @@ RUN rm -rf /var/run/secrets/kubernetes.io
7171
RUN adduser -u 2000 -D wrongsecrets
7272
USER wrongsecrets
7373

74-
CMD java -Xms128m -Xmx128m -Xss512k -jar -Dserver.port=$PORT -XX:MaxRAMPercentage=75 -XX:MinRAMPercentage=25 -Dspring.profiles.active=without-vault -Dspringdoc.swagger-ui.enabled=${SPRINGDOC_UI} -Dspringdoc.api-docs.enabled=${SPRINGDOC_DOC} application.jar
75-
# CMD java -jar -XX:SharedArchiveFile=application.jsa -Dspring.profiles.active=$(echo ${SPRING_PROFILES_ACTIVE}) -Dspringdoc.swagger-ui.enabled=${SPRINGDOC_UI} -Dspringdoc.api-docs.enabled=${SPRINGDOC_DOC} -D application.jar
74+
CMD java -jar -XX:SharedArchiveFile=application.jsa -Dspring.profiles.active=$(echo ${SPRING_PROFILES_ACTIVE}) -Dspringdoc.swagger-ui.enabled=${SPRINGDOC_UI} -Dspringdoc.api-docs.enabled=${SPRINGDOC_DOC} -D application.jar

Dockerfile.web

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM jeroenwillemsen/wrongsecrets:1.13.1-alpha5-no-vault
2-
ARG argBasedVersion="1.13.1-alpha5-no-vault"
1+
FROM jeroenwillemsen/wrongsecrets:1.13.1-alpha6-no-vault
2+
ARG argBasedVersion="1.13.1-alpha6-no-vault"
33
ARG CANARY_URLS="http://canarytokens.com/terms/about/s7cfbdakys13246ewd8ivuvku/post.jsp,http://canarytokens.com/terms/about/y0all60b627gzp19ahqh7rl6j/post.jsp"
44
ARG CTF_ENABLED=false
55
ARG HINTS_ENABLED=true
@@ -21,6 +21,7 @@ ENV K8S_ENV=Heroku(Docker)
2121
ENV canarytokenURLs=$CANARY_URLS
2222
ENV ctf_enabled=$CTF_ENABLED
2323
ENV ctf_key=$CTF_KEY
24+
ENV SPRING_PROFILES_ACTIVE=without-vault
2425
ENV hints_enabled=$HINTS_ENABLED
2526
ENV challengedockermtpath="/var/helpers"
2627
ENV keepasspath="/var/helpers/alibabacreds.kdbx"
@@ -36,8 +37,9 @@ ENV default_aws_value_challenge_10=$CHALLENGE_10_VALUE
3637
ENV default_aws_value_challenge_11=$CHALLENGE_11_VALUE
3738
ENV BASTIONHOSTPATH="/home/wrongsecrets/.ssh"
3839
ENV PROJECTSPECPATH="/var/helpers/project-specification.mdc"
40+
ENV funnybunny="This is a funny bunny"
3941
COPY .github/scripts/ /var/helpers
4042
COPY src/test/resources/alibabacreds.kdbx /var/helpers
4143
COPY src/test/resources/RSAprivatekey.pem /var/helpers
4244
COPY .ssh/ /home/wrongsecrets/.ssh/
43-
CMD java -jar -XX:SharedArchiveFile=application.jsa -Dspring.profiles.active=$(echo ${SPRING_PROFILES_ACTIVE}) -Dspringdoc.swagger-ui.enabled=${SPRINGDOC_UI} -Dspringdoc.api-docs.enabled=${SPRINGDOC_DOC} -D application.jar
45+
CMD java -jar -XX:SharedArchiveFile=application.jsa -Dspring.profiles.active=without-vault -Dserver.port=${PORT} -Dspringdoc.swagger-ui.enabled=${SPRINGDOC_UI} -Dspringdoc.api-docs.enabled=${SPRINGDOC_DOC} application.jar

aws/k8s/secret-challenge-vault-deployment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ spec:
5858
volumeAttributes:
5959
secretProviderClass: "wrongsecrets-aws-secretsmanager"
6060
containers:
61-
- image: jeroenwillemsen/wrongsecrets:1.13.1-alpha5-k8s-vault
61+
- image: jeroenwillemsen/wrongsecrets:1.13.1-alpha6-k8s-vault
6262
imagePullPolicy: IfNotPresent
6363
name: secret-challenge
6464
command: ["/bin/sh"]

azure/k8s/secret-challenge-vault-deployment.yml.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ spec:
6161
volumeAttributes:
6262
secretProviderClass: "azure-wrongsecrets-vault"
6363
containers:
64-
- image: jeroenwillemsen/wrongsecrets:1.13.1-alpha5-k8s-vault
64+
- image: jeroenwillemsen/wrongsecrets:1.13.1-alpha6-k8s-vault
6565
imagePullPolicy: IfNotPresent
6666
name: secret-challenge
6767
command: ["/bin/sh"]

docs/SPRING_BOOT_4_ADOPTION_CHECKLIST.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,24 @@ This checklist is tailored to the current `wrongsecrets` codebase (Spring Boot `
2121

2222
### 1) Standardize HTTP error responses with `ProblemDetail`
2323

24-
- [ ] Add a global `@RestControllerAdvice` for API endpoints that returns `ProblemDetail`.
25-
- [ ] Keep MVC HTML error handling as-is for Thymeleaf pages; only modernize JSON API errors.
26-
- [ ] Add tests that assert RFC 9457-style payload fields (`type`, `title`, `status`, `detail`, `instance`).
24+
- [x] Add a global `@RestControllerAdvice` for API endpoints that returns `ProblemDetail`.
25+
- [x] Keep MVC HTML error handling as-is for Thymeleaf pages; only modernize JSON API errors.
26+
- [x] Add tests that assert RFC 9457-style payload fields (`type`, `title`, `status`, `detail`, `instance`).
2727

2828
**Why now:** Reduces custom exception payload drift and improves API consistency.
2929

3030
### 2) Replace new `RestTemplate` usage with `RestClient`
3131

32-
- [ ] Stop introducing any new `RestTemplate` usage.
33-
- [ ] Migrate existing bean in `WrongSecretsApplication` from `RestTemplate` to `RestClient.Builder`.
34-
- [ ] Migrate call sites incrementally (start with `SlackNotificationService`).
35-
- [ ] Add timeout and retry policy explicitly for outbound calls.
32+
- [x] Stop introducing any new `RestTemplate` usage.
33+
- [x] Migrate existing bean in `WrongSecretsApplication` from `RestTemplate` to `RestClient.Builder`.
34+
- [x] Migrate call sites incrementally (start with `SlackNotificationService`).
35+
- [x] Add timeout and retry policy explicitly for outbound calls.
3636

3737
**Current state:** `RestTemplate` bean and usage exist and can be migrated safely in phases.
3838

3939
### 3) Add/verify deprecation gate in CI
4040

41-
- [ ] Run compile with deprecation warnings enabled in CI (`-Xlint:deprecation`).
41+
- [x] Run compile with deprecation warnings enabled in CI (`-Xlint:deprecation`).
4242
- [ ] Fail build on newly introduced deprecations (can be soft-fail initially).
4343
- [ ] Track remaining suppressions/deprecations as explicit TODOs.
4444

@@ -139,8 +139,8 @@ This checklist is tailored to the current `wrongsecrets` codebase (Spring Boot `
139139

140140
## Definition of done for Boot 4 adoption
141141

142-
- [ ] No new `RestTemplate` code introduced.
143-
- [ ] API errors are standardized on `ProblemDetail`.
144-
- [ ] Deprecation warnings are tracked and controlled in CI.
142+
- [x] No new `RestTemplate` code introduced.
143+
- [x] API errors are standardized on `ProblemDetail`.
144+
- [x] Deprecation warnings are tracked and controlled in CI.
145145
- [ ] Observability baseline (metrics, traces, log correlation) is active in non-local profiles.
146146
- [ ] Migration choices and rollout decisions are documented in `docs/`.

docs/VERSION_MANAGEMENT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ The project maintains version consistency between:
1212
## Version Schema
1313

1414
```
15-
pom.xml version: 1.13.1-alpha5-SNAPSHOT
16-
Dockerfile version: 1.13.1-alpha5
17-
Dockerfile.web version: 1.13.1-alpha5-no-vault
15+
pom.xml version: 1.13.1-alpha6-SNAPSHOT
16+
Dockerfile version: 1.13.1-alpha6
17+
Dockerfile.web version: 1.13.1-alpha6-no-vault
1818
```
1919

2020
## Automated Solutions

fly.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ app = "wrongsecrets"
88
primary_region = "ams"
99

1010
[build]
11-
image = "docker.io/jeroenwillemsen/wrongsecrets:1.13.1-alpha5-no-vault"
11+
image = "docker.io/jeroenwillemsen/wrongsecrets:1.13.1-alpha6-no-vault"
1212

1313
[env]
1414
K8S_ENV = "Fly(Docker)"

gcp/k8s/secret-challenge-vault-deployment.yml.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ spec:
5858
volumeAttributes:
5959
secretProviderClass: "wrongsecrets-gcp-secretsmanager"
6060
containers:
61-
- image: jeroenwillemsen/wrongsecrets:1.13.1-alpha5-k8s-vault
61+
- image: jeroenwillemsen/wrongsecrets:1.13.1-alpha6-k8s-vault
6262
imagePullPolicy: IfNotPresent
6363
name: secret-challenge
6464
command: ["/bin/sh"]

0 commit comments

Comments
 (0)