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

bug: lambda Add permission accepts non-compliant statement IDs #7763

Closed
1 task done
wunderbarb opened this issue Feb 27, 2023 · 3 comments
Closed
1 task done

bug: lambda Add permission accepts non-compliant statement IDs #7763

wunderbarb opened this issue Feb 27, 2023 · 3 comments
Assignees
Labels
status: resolved/fixed Resolved via a fix or an implementation status: response required Waiting for a response from the reporter status: stale To be closed soon due to staleness type: bug Bug report

Comments

@wunderbarb
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Statement ID should be [0-9a-zA-z_/-]+ but localstack accepts for instance "example.com"

Expected Behavior

No response

How are you starting LocalStack?

With a docker run command

Steps To Reproduce

	c := lambda.NewFromConfig(cfg)
	api := &lambda.AddPermissionInput{
		Action:              aws.String("lambda:InvokeFunction"),
		FunctionName:        aws.String(arn),
		Principal:           aws.String("events.amazonaws.com"),
		StatementId:         aws.String("example.com),
		EventSourceToken:    nil,
		FunctionUrlAuthType: "",
		PrincipalOrgID:      nil,
		Qualifier:           nil,
		RevisionId:          nil,
		SourceAccount:       nil,
		SourceArn:           aws.String(rnARN),
	}
	_, err = c.AddPermission(context.Background(), api)

Environment

- OS: Ubuntu 20.04
- LocalStack: 1.4.0  pro

Anything else?

No response

@wunderbarb wunderbarb added status: triage needed Requires evaluation by maintainers type: bug Bug report labels Feb 27, 2023
@joe4dev joe4dev self-assigned this Feb 28, 2023
joe4dev added a commit that referenced this issue Feb 28, 2023
@joe4dev
Copy link
Member

joe4dev commented Feb 28, 2023

Hi @wunderbarb Thank you for sharing this missing validation.

We implemented a fix that will become available shortly (as part of PR #7762). We will let you know when it is available in the latest Docker image.

joe4dev added a commit that referenced this issue Feb 28, 2023
joe4dev added a commit that referenced this issue Mar 1, 2023
@joe4dev
Copy link
Member

joe4dev commented Mar 1, 2023

Hi @wunderbarb The fix should be available in the latest Docker image. Can you please docker pull localstack/localstack-pro and give it a try?

@joe4dev joe4dev added status: resolved/fixed Resolved via a fix or an implementation status: response required Waiting for a response from the reporter and removed status: triage needed Requires evaluation by maintainers labels Mar 1, 2023
@localstack-bot
Copy link
Collaborator

Hello 👋! It looks like this issue hasn’t been active in longer than two months. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

@localstack-bot localstack-bot added the status: stale To be closed soon due to staleness label Apr 30, 2023
@thrau thrau closed this as completed May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: resolved/fixed Resolved via a fix or an implementation status: response required Waiting for a response from the reporter status: stale To be closed soon due to staleness type: bug Bug report
Projects
None yet
Development

No branches or pull requests

4 participants