Skip to content

Commit

Permalink
chore: Strengthen wording on "no Auth" during deploy (aws#5231)
Browse files Browse the repository at this point in the history
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
  • Loading branch information
3 people authored and lucashuy committed Jun 22, 2023
1 parent 9675518 commit 3b29696
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion samcli/commands/deploy/deploy_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def deploy(

for resource, authorization_required in auth_required_per_resource:
if not authorization_required:
click.secho(f"{resource} may not have authorization defined.", fg="yellow")
click.secho(f"{resource} has no authentication.", fg="yellow")

if use_changeset:
try:
Expand Down
2 changes: 1 addition & 1 deletion samcli/commands/deploy/guided_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def prompt_authorization(self, stacks: List[Stack]):
for resource, authorization_required in auth_required_per_resource:
if not authorization_required:
auth_confirm = confirm(
f"\t{self.start_bold}{resource} may not have authorization defined, Is this okay?{self.end_bold}",
f"\t{self.start_bold}{resource} has no authentication. Is this okay?{self.end_bold}",
default=False,
)
if not auth_confirm:
Expand Down
18 changes: 9 additions & 9 deletions tests/unit/commands/deploy/test_guided_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def test_guided_prompts_check_defaults_public_resources_zips(
call(f"\t{self.gc.start_bold}Allow SAM CLI IAM role creation{self.gc.end_bold}", default=True),
call(f"\t{self.gc.start_bold}Disable rollback{self.gc.end_bold}", default=False),
call(
f"\t{self.gc.start_bold}HelloWorldFunction may not have authorization defined, Is this okay?{self.gc.end_bold}",
f"\t{self.gc.start_bold}HelloWorldFunction has no authentication. Is this okay?{self.gc.end_bold}",
default=False,
),
call(f"\t{self.gc.start_bold}Save arguments to configuration file{self.gc.end_bold}", default=True),
Expand Down Expand Up @@ -203,7 +203,7 @@ def test_guided_prompts_check_defaults_public_resources_images(
call(f"\t{self.gc.start_bold}Allow SAM CLI IAM role creation{self.gc.end_bold}", default=True),
call(f"\t{self.gc.start_bold}Disable rollback{self.gc.end_bold}", default=False),
call(
f"\t{self.gc.start_bold}HelloWorldFunction may not have authorization defined, Is this okay?{self.gc.end_bold}",
f"\t{self.gc.start_bold}HelloWorldFunction has no authentication. Is this okay?{self.gc.end_bold}",
default=False,
),
call(f"\t{self.gc.start_bold}Save arguments to configuration file{self.gc.end_bold}", default=True),
Expand Down Expand Up @@ -282,7 +282,7 @@ def test_guided_prompts_check_defaults_public_resources_images_ecr_url(
call(f"\t{self.gc.start_bold}Allow SAM CLI IAM role creation{self.gc.end_bold}", default=True),
call(f"\t{self.gc.start_bold}Disable rollback{self.gc.end_bold}", default=False),
call(
f"\t{self.gc.start_bold}HelloWorldFunction may not have authorization defined, Is this okay?{self.gc.end_bold}",
f"\t{self.gc.start_bold}HelloWorldFunction has no authentication. Is this okay?{self.gc.end_bold}",
default=False,
),
call(f"\t{self.gc.start_bold}Save arguments to configuration file{self.gc.end_bold}", default=True),
Expand Down Expand Up @@ -406,7 +406,7 @@ def test_guided_prompts_images_missing_repo(
call(f"\t{self.gc.start_bold}Allow SAM CLI IAM role creation{self.gc.end_bold}", default=True),
call(f"\t{self.gc.start_bold}Disable rollback{self.gc.end_bold}", default=False),
call(
f"\t{self.gc.start_bold}HelloWorldFunction may not have authorization defined, Is this okay?{self.gc.end_bold}",
f"\t{self.gc.start_bold}HelloWorldFunction has no authentication. Is this okay?{self.gc.end_bold}",
default=False,
),
call(f"\t{self.gc.start_bold}Save arguments to configuration file{self.gc.end_bold}", default=True),
Expand Down Expand Up @@ -485,7 +485,7 @@ def test_guided_prompts_images_no_repo(
call(f"\t{self.gc.start_bold}Allow SAM CLI IAM role creation{self.gc.end_bold}", default=True),
call(f"\t{self.gc.start_bold}Disable rollback{self.gc.end_bold}", default=False),
call(
f"\t{self.gc.start_bold}HelloWorldFunction may not have authorization defined, Is this okay?{self.gc.end_bold}",
f"\t{self.gc.start_bold}HelloWorldFunction has no authentication. Is this okay?{self.gc.end_bold}",
default=False,
),
call(f"\t{self.gc.start_bold}Save arguments to configuration file{self.gc.end_bold}", default=True),
Expand Down Expand Up @@ -702,7 +702,7 @@ def test_guided_prompts_check_configuration_file_prompt_calls(
call(f"\t{self.gc.start_bold}Allow SAM CLI IAM role creation{self.gc.end_bold}", default=True),
call(f"\t{self.gc.start_bold}Disable rollback{self.gc.end_bold}", default=False),
call(
f"\t{self.gc.start_bold}HelloWorldFunction may not have authorization defined, Is this okay?{self.gc.end_bold}",
f"\t{self.gc.start_bold}HelloWorldFunction has no authentication. Is this okay?{self.gc.end_bold}",
default=False,
),
call(f"\t{self.gc.start_bold}Save arguments to configuration file{self.gc.end_bold}", default=True),
Expand Down Expand Up @@ -766,7 +766,7 @@ def test_guided_prompts_check_parameter_from_template(
call(f"\t{self.gc.start_bold}Allow SAM CLI IAM role creation{self.gc.end_bold}", default=True),
call(f"\t{self.gc.start_bold}Disable rollback{self.gc.end_bold}", default=False),
call(
f"\t{self.gc.start_bold}HelloWorldFunction may not have authorization defined, Is this okay?{self.gc.end_bold}",
f"\t{self.gc.start_bold}HelloWorldFunction has no authentication. Is this okay?{self.gc.end_bold}",
default=False,
),
call(f"\t{self.gc.start_bold}Save arguments to configuration file{self.gc.end_bold}", default=True),
Expand Down Expand Up @@ -825,7 +825,7 @@ def test_guided_prompts_check_parameter_from_cmd_or_config(
call(f"\t{self.gc.start_bold}Allow SAM CLI IAM role creation{self.gc.end_bold}", default=True),
call(f"\t{self.gc.start_bold}Disable rollback{self.gc.end_bold}", default=False),
call(
f"\t{self.gc.start_bold}HelloWorldFunction may not have authorization defined, Is this okay?{self.gc.end_bold}",
f"\t{self.gc.start_bold}HelloWorldFunction has no authentication. Is this okay?{self.gc.end_bold}",
default=False,
),
call(f"\t{self.gc.start_bold}Save arguments to configuration file{self.gc.end_bold}", default=True),
Expand Down Expand Up @@ -970,7 +970,7 @@ def test_guided_prompts_check_default_config_region(
call(f"\t{self.gc.start_bold}Allow SAM CLI IAM role creation{self.gc.end_bold}", default=True),
call(f"\t{self.gc.start_bold}Disable rollback{self.gc.end_bold}", default=False),
call(
f"\t{self.gc.start_bold}HelloWorldFunction may not have authorization defined, Is this okay?{self.gc.end_bold}",
f"\t{self.gc.start_bold}HelloWorldFunction has no authentication. Is this okay?{self.gc.end_bold}",
default=False,
),
call(f"\t{self.gc.start_bold}Save arguments to configuration file{self.gc.end_bold}", default=True),
Expand Down

0 comments on commit 3b29696

Please sign in to comment.