Skip to content

Commit bf497f6

Browse files
committed
Fix for ui, explanations, and new container
1 parent 4ae4d77 commit bf497f6

File tree

3 files changed

+50
-26
lines changed

3 files changed

+50
-26
lines changed

aws/build-an-deploy-aws.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ wait
111111
DEFAULT_PASSWORD=thankyou
112112
#TODO: REWRITE ABOVE, REWRITE THE HARDCODED DEPLOYMENT VALS INTO VALUES AND OVERRIDE THEM HERE!
113113
echo "default password is ${DEFAULT_PASSWORD}"
114-
helm upgrade --install mj ../helm/wrongsecrets-ctf-party --set="imagePullPolicy=Always" --set="balancer.env.K8S_ENV=aws" --set"balancer.env.IRSA_ROLE=arn:aws:iam::${ACCOUNT_ID}:role/wrongsecrets-secret-manager" --set="balancer.env.REACT_APP_ACCESS_PASSWORD=${DEFAULT_PASSWORD}" --set="balancer.cookie.cookieParserSecret=thisisanewrandomvaluesowecanworkatit" --set="balancer.repository=jeroenwillemsen/wrongsecrets-balancer" --set="balancer.tag=0.92aws" --set="balancer.replicas=4" --set="wrongsecretsCleanup.repository=jeroenwillemsen/wrongsecrets-ctf-cleaner" --set="wrongsecretsCleanup.tag=0.2"
114+
helm upgrade --install mj ../helm/wrongsecrets-ctf-party --set="imagePullPolicy=Always" --set="balancer.env.K8S_ENV=aws" --set"balancer.env.IRSA_ROLE=arn:aws:iam::${ACCOUNT_ID}:role/wrongsecrets-secret-manager" --set="balancer.env.REACT_APP_ACCESS_PASSWORD=${DEFAULT_PASSWORD}" --set="balancer.cookie.cookieParserSecret=thisisanewrandomvaluesowecanworkatit" --set="balancer.repository=jeroenwillemsen/wrongsecrets-balancer" --set="balancer.tag=0.93aws" --set="balancer.replicas=4" --set="wrongsecretsCleanup.repository=jeroenwillemsen/wrongsecrets-ctf-cleaner" --set="wrongsecretsCleanup.tag=0.2"

helm/wrongsecrets-ctf-party/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ balancer:
3535
# -- Set this to a fixed random alpa-numeric string (recommended length 24 chars). If not set this get randomly generated with every helm upgrade, each rotation invalidates all active cookies / sessions requirering users to login again.
3636
cookieParserSecret: null
3737
repository: jeroenwillemsen/wrongsecrets-balancer
38-
tag: 0.92aws
38+
tag: 0.93aws
3939
# -- Number of replicas of the wrongsecrets-balancer deployment
4040
replicas: 1
4141
service:

wrongsecrets-balancer/ui/src/pages/JoinPage.js

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const CenterLogo = styled.img`
2626
display: block;
2727
margin-left: auto;
2828
margin-right: auto;
29-
width: 50%;
29+
width: 75%;
3030
`;
3131

3232
export const JoinPage = injectIntl(({ intl }) => {
@@ -52,7 +52,7 @@ export const JoinPage = injectIntl(({ intl }) => {
5252

5353
async function sendJoinRequest() {
5454
try {
55-
if(!teamname || teamname.length === 0){
55+
if (!teamname || teamname.length === 0) {
5656
setFailed(true);
5757
return;
5858
}
@@ -142,26 +142,36 @@ export const JoinPage = injectIntl(({ intl }) => {
142142
<li>This domain: here is where you can do your exercises</li>
143143
<li>
144144
The domain where you provide your responses in exchange for a CTF key:{' '}
145-
<a href={dynamics.heroku_wrongsecret_ctf_url}>{dynamics.heroku_wrongsecret_ctf_url}</a>
145+
<a style={{ color: 'white' }} href={dynamics.heroku_wrongsecret_ctf_url}>
146+
{dynamics.heroku_wrongsecret_ctf_url}
147+
</a>
146148
</li>
147149
<li>
148150
The domain where you provide your CTF key:{' '}
149-
<a href={dynamics.ctfd_url}>{dynamics.ctfd_url}</a>
151+
<a style={{ color: 'white' }} href={dynamics.ctfd_url}>
152+
{dynamics.ctfd_url}
153+
</a>
150154
</li>
151155
<li>
152156
Optionally: the storage bucket with Terraform state for the cloud challneges:{' '}
153-
<a href={dynamics.s3_bucket_url}>{dynamics.s3_bucket_url}</a>
157+
<a style={{ color: 'white' }} href={dynamics.s3_bucket_url}>
158+
{dynamics.s3_bucket_url}
159+
</a>
160+
. For this you will need credentials that will be provided to you as part of the CTF
161+
instructions.
154162
</li>
155163
</ul>
156164
<FormattedMessage
157165
id="welcome_text_2"
158166
defaultMessage={`
159-
We need multiple domains, as you will be able to steal the CTF key after a few challenges.
167+
We need to usse multiple domains, as you will be able to steal the CTF key after a few challenges.
160168
`}
161169
values={{
162170
strong: (msg) => <strong>{msg}</strong>,
163171
}}
164172
/>
173+
<br />
174+
<br />
165175

166176
<H2>
167177
<FormattedMessage id="getting_started" defaultMessage="Getting Started" />
@@ -179,6 +189,20 @@ export const JoinPage = injectIntl(({ intl }) => {
179189
}}
180190
/>
181191

192+
{dynamics.enable_password ? (
193+
<p>
194+
<FormattedMessage
195+
id="getting_started_password"
196+
defaultMessage={`
197+
In the password field you have to enter the password you received as part of your CTF instructions.
198+
This can be different from the CTFD passswords.
199+
`}
200+
values={{
201+
strong: (msg) => <strong>{msg}</strong>,
202+
}}
203+
/>
204+
</p>
205+
) : null}
182206
{failed ? (
183207
<p>
184208
<strong>
@@ -206,24 +230,24 @@ export const JoinPage = injectIntl(({ intl }) => {
206230
onChange={({ target }) => setTeamname(target.value)}
207231
/>
208232
{dynamics.enable_password ? (
209-
<p>
210-
<Label htmlFor="password">
211-
<FormattedMessage id="password" defaultMessage="Password" />
212-
</Label>
213-
<Input
214-
type="password"
215-
id="password"
216-
data-test-id="password-input"
217-
name="password"
218-
disabled={!dynamics.enable_password}
219-
value={password}
220-
title={formatMessage(messages.passwordValidationConstraints)}
221-
pattern="^[a-zA-Z0-9]([-a-z-A-Z0-9])+[a-zA-Z0-9]$"
222-
maxLength="64"
223-
onChange={({ target }) => setPassword(target.value)}
224-
/>
225-
</p>
226-
) : null}
233+
<p>
234+
<Label htmlFor="password">
235+
<FormattedMessage id="password" defaultMessage="Password" />
236+
</Label>
237+
<Input
238+
type="password"
239+
id="password"
240+
data-test-id="password-input"
241+
name="password"
242+
disabled={!dynamics.enable_password}
243+
value={password}
244+
title={formatMessage(messages.passwordValidationConstraints)}
245+
pattern="^[a-zA-Z0-9]([-a-z-A-Z0-9])+[a-zA-Z0-9]$"
246+
maxLength="64"
247+
onChange={({ target }) => setPassword(target.value)}
248+
/>
249+
</p>
250+
) : null}
227251
<Button data-test-id="create-join-team-button" type="submit">
228252
<FormattedMessage id="create_or_join_team_label" defaultMessage="Create / Join Team" />
229253
</Button>

0 commit comments

Comments
 (0)