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

Custom access logging of API gateways is disabled #4795

Closed
14 tasks
dsotirho-ucsc opened this issue Dec 6, 2022 · 5 comments
Closed
14 tasks

Custom access logging of API gateways is disabled #4795

dsotirho-ucsc opened this issue Dec 6, 2022 · 5 comments
Assignees
Labels
bug [type] A defect preventing use of the system as specified compliance [subject] Information and software security demo [process] To be demonstrated at the end of the sprint demoed [process] Successfully demonstrated to team infra [subject] Project infrastructure like CI/CD, build and deployment scripts orange [process] Done by the Azul team spike:1 [process] Spike estimate of one point ssp [process] Resolution is reflected in SSP

Comments

@dsotirho-ucsc
Copy link
Contributor

"Custom Access Logging" of API gateways has been disabled for anvildev and dev, but not prod. Looking at the Cloudwatch logs it appears this happened around 12/02/2022 06:14 GMT. This time roughly correlates with the merge & deploy of PR #4770 for issues #4752, #3652, and #2992 .

pr_4770_merged_dec_1st

Cloudwatch logs for /aws/apigateway/azul-indexer-anvildev:

cloudwatch_anvildev

anvildev API gateway settings:

apigateway_anvil

Cloudwatch logs for /aws/apigateway/azul-service-dev:

Note: There are logs on the graph for the other days before 12/02 however they are being overshadowed by the large spike of 73,192 matches.

cloudwatch_dev


  • Security design review completed; the Resolution of this issue does not
    • … affect authentication; for example:
      • OAuth 2.0 with the application (API or Swagger UI)
      • Authentication of developers with Google Cloud APIs
      • Authentication of developers with AWS APIs
      • Authentication with a GitLab instance in the system
      • Password and 2FA authentication with GitHub
      • API access token authentication with GitHub
      • Authentication with
    • … affect the permissions of internal users like access to
      • Cloud resources on AWS and GCP
      • GitLab repositories, projects and groups, administration
      • an EC2 instance via SSH
      • GitHub issues, pull requests, commits, commit statuses, wikis, repositories, organizations
    • … affect the permissions of external users like access to
      • TDR snapshots
    • … affect permissions of service or bot accounts
      • Cloud resources on AWS and GCP
    • … affect audit logging in the system, like
      • adding, removing or changing a log message that represents an auditable event
      • changing the routing of log messages through the system
    • … affect monitoring of the system
    • … introduce a new software dependency like
      • Python packages on PYPI
      • Command-line utilities
      • Docker images
      • Terraform providers
    • … add an interface that exposes sensitive or confidential data at the security boundary
    • … affect the encryption of data at rest
    • … require persistence of sensitive or confidential data that might require encryption at rest
    • … require unencrypted transmission of data within the security boundary
    • … affect the network security layer; for example by
      • modifying, adding or removing firewall rules
      • modifying, adding or removing security groups
      • changing or adding a port a service, proxy or load balancer listens on
  • Documentation on any unchecked boxes is provided in comments below
@dsotirho-ucsc dsotirho-ucsc added the orange [process] Done by the Azul team label Dec 6, 2022
@theathorn theathorn added the spike:1 [process] Spike estimate of one point label Dec 6, 2022
@theathorn
Copy link

Spike to diagnose.

@hannes-ucsc hannes-ucsc added code [subject] Production code compliance [subject] Information and software security infra [subject] Project infrastructure like CI/CD, build and deployment scripts bug [type] A defect preventing use of the system as specified and removed code [subject] Production code labels Dec 7, 2022
@hannes-ucsc
Copy link
Member

hannes-ucsc commented Dec 7, 2022

When PR #4770 introduced the explicit stage, the dependency of the API Gateway deployment on the custom provisioner script became problematic. Either the script wasn't invoked or it was invoked too early and its effect was undone by TF during the creation of the explicit stage. Now that we manage the stage with Terraform, we can apply the log settings directly through Terraform, which is actually what #3412 is about.

@hannes-ucsc
Copy link
Member

Freebie of #3412.

@hannes-ucsc
Copy link
Member

For demo, attempt to reproduce.

@hannes-ucsc
Copy link
Member

Because the regression and the fix were promoted to prod simultaneously, prod logging was never affected by this issue. I just checked /aws/apigateway/azul-indexer-prod and /aws/apigateway/azul-service-prod and they had a continuous series of log messages.

@hannes-ucsc hannes-ucsc added the ssp [process] Resolution is reflected in SSP label Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [type] A defect preventing use of the system as specified compliance [subject] Information and software security demo [process] To be demonstrated at the end of the sprint demoed [process] Successfully demonstrated to team infra [subject] Project infrastructure like CI/CD, build and deployment scripts orange [process] Done by the Azul team spike:1 [process] Spike estimate of one point ssp [process] Resolution is reflected in SSP
Projects
None yet
Development

No branches or pull requests

3 participants