[APPSEC]: fix Lambda not appearing on the Appsec API Security Endpoint Catalog by florentinl · Pull Request #654 · DataDog/datadog-lambda-python
What does this PR do?
This PR adds the span.kind tag with the value server for all events that represent an HTTP Request. The api security backend expects it to be present and omits endpoints that do not have this tag. (documentation for this attribute can be found here)
Additionally API Security should be enabled by default, there is no need to intentionally disable it for Appsec in lambda.
Motivation
The goal of this PR is to make Lambda services with Appsec API Security enabled show up on the API Security Catalog.
Testing Guidelines
Updated existing tests
Additional Notes
-
This issue also impacts API Security when it is enabled through the extension.
-
As of today, the API Security Endpoint Catalog uses the
resource_nameto display the endpoint and expects it to be in the formatGET /path/to/resourcebut lambda sets it to the function name instead. This should maybe be solved in the backend and will be done at a later time.
Types of Changes
- Bug fix
- New feature
- Breaking change
- Misc (docs, refactoring, dependency upgrade, etc.)
Check all that apply
- This PR's description is comprehensive
- This PR contains breaking changes that are documented in the description
- This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
- This PR impacts documentation, and it has been updated (or a ticket has been logged)
- This PR's changes are covered by the automated tests
- This PR collects user input/sensitive content into Datadog
- This PR passes the integration tests (ask a Datadog member to run the tests)