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

Getting 403 from Lambda function but not using a regular SOAP UI/Postman request #16

Closed
francescotimperi opened this issue Feb 1, 2021 · 1 comment

Comments

@francescotimperi
Copy link

We are following the suggested approach, but we are getting an 403 error which we are not able to solve. This is the basic configuration logged by axios when the lambda function it is triggered from the webhook

config: {
    url: 'https://hostname/app/stash/rest/api/latest/projects/GRANTSPP/repos/sda-docref-poc/archive?at=refs/heads/GRANTSPP-6363-FT&format=zip',
    method: 'get',
    headers: {
      Accept: 'application/json, text/plain, */*',
      Authorization: 'Bearer XXXXXXX',
      'Accept-Encoding': 'gzip,deflate',
      'User-Agent': 'axios/0.20.0'
    }

If we send a similar request via SOAP UI, which resemble to someting like

GET https://hostname/app/stash/rest/api/latest/projects/GRANTSPP/repos/sda-docref-poc/archive?at=refs%2Fheads%2FGRANTSPP-6363-FT&format=zip HTTP/1.1
Accept-Encoding: gzip,deflate
Authorization: Bearer XXXXX
Host: webgate.ec.europa.eu
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Everything works as expected.

As the lambda function gets a 403 there's connectivity with our bitbucket serve. Any idea about possible reason about refusal of the axios request?

@francescotimperi
Copy link
Author

We've discovered that we need to whitelist some AWS addresses to allow the lambda functions to work properly. SOAP UI Testing is working becasue our AWS workspace machine are already whitelisted!

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

1 participant