Skip to content

Commit

Permalink
Further improving responses if challenges used outside of context of …
Browse files Browse the repository at this point in the history
…where they should be used , see #32
  • Loading branch information
commjoen committed Oct 27, 2021
1 parent ed821fb commit 5822c62
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private String getAWSChallenge9and10Value(String fileName) {

private String getAWSChallenge11Value() {
log.info("Getting credentials");
if (!"not_using_aws".equals(awsRoleArn)) {
if (!"if_you_see_this_please_use_AWS_Setup".equals(awsRoleArn)) {

try { //based on https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javav2/example_code/sts/src/main/java/com/example/sts
String webIDentityToken = Files.readString(Paths.get(tokenFileLocation));
Expand Down
18 changes: 9 additions & 9 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
spring.devtools.restart.additional-paths=src/main/resources/explanations

password = DefaultLoginPasswordDoNotChange!
SPECIAL_K8S_SECRET = this_is_not_minikube
SPECIAL_SPECIAL_K8S_SECRET = you_are_not_using_k8s
ARG_BASED_PASSWORD= not_using_docker
DOCKER_ENV_PASSWORD= not_using_docker
vaultpassword = not_using_vault
default_aws_value = not_using_aws
AWS_ROLE_ARN= not_using_aws
AWS_WEB_IDENTITY_TOKEN_FILE= not_using_aws
SPECIAL_K8S_SECRET = if_you_see_this_please_use_k8s
SPECIAL_SPECIAL_K8S_SECRET = if_you_see_this_please_use_k8s
ARG_BASED_PASSWORD= if_you_see_this_please_use_docker_instead
DOCKER_ENV_PASSWORD= if_you_see_this_please_use_docker_instead
vaultpassword = if_you_see_this_please_use_K8S_and_Vault
default_aws_value = if_you_see_this_please_use_AWS_Setup
AWS_ROLE_ARN= if_you_see_this_please_use_AWS_Setup
AWS_WEB_IDENTITY_TOKEN_FILE= if_you_see_this_please_use_AWS_Setup
secretmountpath = /mnt/secrets-store
AWS_REGION=not_using_aws
AWS_REGION=if_you_see_this_please_use_AWS_Setup
logging.level.root=INFO
#---
spring.config.activate.on-profile=kubernetes-vault
Expand Down
18 changes: 9 additions & 9 deletions src/test/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
spring.cloud.vault.enabled=false
aws.paramstore.enabled=false
password = DefaultLoginPasswordDoNotChange!
SPECIAL_K8S_SECRET = this_is_not_minikube
SPECIAL_SPECIAL_K8S_SECRET = you_are_not_using_k8s
ARG_BASED_PASSWORD= not_using_docker
DOCKER_ENV_PASSWORD= not_using_docker
vaultpassword = not_using_vault
vaultpassword.password = not_using_vault
default_aws_value = not_using_aws
AWS_ROLE_ARN= not_using_aws
AWS_WEB_IDENTITY_TOKEN_FILE= not_using_aws
SPECIAL_K8S_SECRET = if_you_see_this_please_use_k8s
SPECIAL_SPECIAL_K8S_SECRET = if_you_see_this_please_use_k8s
ARG_BASED_PASSWORD= if_you_see_this_please_use_docker_instead
DOCKER_ENV_PASSWORD= if_you_see_this_please_use_docker_instead
vaultpassword = if_you_see_this_please_use_K8S_and_Vault
vaultpassword.password = if_you_see_this_please_use_K8S_and_Vault
default_aws_value = if_you_see_this_please_use_AWS_Setup
AWS_ROLE_ARN= if_you_see_this_please_use_AWS_Setup
AWS_WEB_IDENTITY_TOKEN_FILE= if_you_see_this_please_use_AWS_Setup
secretmountpath = ${java.io.tmpdir}
wrongsecretvalue = wrongsecret

0 comments on commit 5822c62

Please sign in to comment.