Skip to content
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

Challenge 2 correct? #32

Closed
nbaars opened this issue Oct 27, 2021 · 7 comments
Closed

Challenge 2 correct? #32

nbaars opened this issue Oct 27, 2021 · 7 comments
Assignees

Comments

@nbaars
Copy link
Collaborator

nbaars commented Oct 27, 2021

Challenge mentions:

now the password is no longer overloaded by Spring, but by means of a docker container build argument.

The Docker argument passed does not solve the challenge (only the one in application.properties) which is I guess reading the challenge text not the proposed way it should work. There is a mismatch between the two

@nbaars
Copy link
Collaborator Author

nbaars commented Oct 27, 2021

Same for challenge 3 btw

@nbaars
Copy link
Collaborator Author

nbaars commented Oct 27, 2021

Challenge 3 should probably check if you are running the application in a Docker container (which you can do by looking for .dockerenv in the root folder (something along those lines).

Otherwise the challenge can only be solved by putting in the wrong answer.

or

mention in the challenge that you need to start the Docker container.

@commjoen
Copy link
Collaborator

commjoen commented Oct 27, 2021

Given below it always seems to work from the docker container.
docker run -p 8000:8080 jeroenwillemsen/addo-example:0.1.0-no-vault
We never recommend to run the application locally (only for development), and otherwise in a docker container

HTTP/1.1 200 
Connection: keep-alive
Content-Language: en-US
Content-Type: text/html;charset=UTF-8
Date: Wed, 27 Oct 2021 19:29:21 GMT
Keep-Alive: timeout=60
Transfer-Encoding: chunked

<!DOCTYPE HTML>
<html>
<head>
    <title>Getting Started: Handling Form Submission</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>Spoiling secret</h1>
<p>this is on my commandline</p>

There are 10 challenges (/challenge/1-11), can you solve them all?
</body>
</html>

➜  wrongsecrets git:(master) http get http://localhost:8000/spoil-3
HTTP/1.1 200 
Connection: keep-alive
Content-Language: en-US
Content-Type: text/html;charset=UTF-8
Date: Wed, 27 Oct 2021 19:29:24 GMT
Keep-Alive: timeout=60
Transfer-Encoding: chunked

<!DOCTYPE HTML>
<html>
<head>
    <title>Getting Started: Handling Form Submission</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>Spoiling secret</h1>
<p>This is it</p>

There are 10 challenges (/challenge/1-11), can you solve them all?
</body>
</html>

commjoen added a commit that referenced this issue Oct 27, 2021
@commjoen commjoen self-assigned this Oct 27, 2021
@commjoen
Copy link
Collaborator

would #33 be enough? or should we have a default value in the application.properties saying "if_you_see_this_please_use_docker_instead" ?

Same for k8s based: "if_you_see_this_please_use_k8s"

Same for vault based: "if_you_see_this_please_use_K8S_and_Vault"

Same for AWS based: "if_you_see_this_please_use_AWS_Setup"

commjoen added a commit that referenced this issue Oct 27, 2021
commjoen added a commit that referenced this issue Oct 27, 2021
@commjoen
Copy link
Collaborator

commjoen commented Oct 27, 2021

with 0.1.0c when running it from Intellij Idea:

➜  wrongsecrets git:(test_new_containers) http get http://localhost:8080/spoil-2 
HTTP/1.1 200 
Connection: keep-alive
Content-Language: nl-NL
Content-Type: text/html;charset=UTF-8
Date: Wed, 27 Oct 2021 21:01:20 GMT
Keep-Alive: timeout=60
Transfer-Encoding: chunked

<!DOCTYPE HTML>
<html>
<head>
    <title>Getting Started: Handling Form Submission</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>Spoiling secret</h1>
<p>if_you_see_this_please_use_docker_instead</p>

There are 10 challenges (/challenge/1-11), can you solve them all?
</body>
</html>

@commjoen
Copy link
Collaborator

commjoen commented Oct 28, 2021

Added docker detection to #34, can you please have a look if all the controls together resolve this issue for you :)?

@commjoen
Copy link
Collaborator

Agreed with @nbaars that #34 fixes this sufficiently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants