dataall icon indicating copy to clipboard operation
dataall copied to clipboard

Feat: Download Worksheet Results

Open anilsoni7 opened this issue 1 year ago • 3 comments

Feature or Bugfix

  • Feature

Detail

  • teamA in environmentA has a team IAM role roleA and a workgroup wgA created by data.all
  • in Worksheets data.all uses that team IAM role and workgroup to run the query
  • the results are stored in the workgroup S3 location = environment S3 bucket/ athenaQueries / teamAFolder/
  • Create the presigned url for the csv present under the s3 location with 2 hours of expiration
  • Storing presigned urls generated in database so that can be reused in future

Relates

  • https://github.com/data-dot-all/dataall/issues/293
  • https://github.com/data-dot-all/dataall/issues/360
  • https://github.com/data-dot-all/dataall/issues/1342

Testcase

  • [x] tests/modules/worksheets/test_worksheet.py/test_create_query_download_url

Security

Please answer the questions below briefly where applicable, or write N/A. Based on OWASP 10.

  • Does this PR introduce or modify any input fields or queries - this includes fetching data from storage outside the application (e.g. a database, an S3 bucket)? - Yes
    • Is the input sanitized?
    • What precautions are you taking before deserializing the data you consume?
    • Is injection prevented by parametrizing queries? - Yes
    • Have you ensured no eval or similar functions are used? - Yes
  • Does this PR introduce any functionality or component that requires authorization? - Yes
    • How have you ensured it respects the existing AuthN/AuthZ mechanisms? - Yes
    • Are you logging failed auth attempts?
  • Are you using or adding any cryptographic features? - N/A
    • Do you use a standard proven implementations? - Yes
    • Are the used keys controlled by the customer? Where are they stored? - N/A
  • Are you introducing any new policies/roles/users?
    • Have you used the least-privilege principle? How?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

anilsoni7 avatar Sep 13 '24 04:09 anilsoni7

Hi @dlpzx, I have pushed the latest changes resolving the comments which you mentioned. Can you review them

anilsoni7 avatar Oct 22 '24 13:10 anilsoni7

Fixed

  • Integration test
  • alembic test
  • ruff checks & format

need to have a discussion with you regarding npm audit failing. there is an package which is falling into critical severity

anilsoni7 avatar Oct 23 '24 09:10 anilsoni7

Hi @anilsoni7 sorry for bothering you again. We have fixed the issue with the npm-audit, could you merge the main branch into this branch? There is also an issue on the migration scripts that needs to be fixed before merging

dlpzx avatar Oct 29 '24 10:10 dlpzx