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

[Gh-1528] Configurable stack logs display #1559

Merged
merged 16 commits into from
Sep 25, 2024

Conversation

TejasRGitHub
Copy link
Contributor

Feature or Bugfix

  • Feature

Detail

As described in this issue - #1528 , stack logs provide some key info.

Creating a feature config called show_stack_logs for s3_datasets, s3_dataset_shares, and core ( for environment stack logs ) and adding logic in frontend to hide/show the logs button.
Using decorator in backend to restrict access based on config.

Relates

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)? N/A
    • Is the input sanitized?
    • What precautions are you taking before deserializing the data you consume?
    • Is injection prevented by parametrizing queries?
    • Have you ensured no eval or similar functions are used?
  • Does this PR introduce any functionality or component that requires authorization? N/A
    • How have you ensured it respects the existing AuthN/AuthZ mechanisms?
    • Are you logging failed auth attempts?
  • Are you using or adding any cryptographic features? N/A
    • Do you use a standard proven implementations?
    • Are the used keys controlled by the customer? Where are they stored?
  • Are you introducing any new policies/roles/users? N/A
    • 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.

config.json Show resolved Hide resolved
Copy link
Contributor

@dlpzx dlpzx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @TejasRGitHub thank you so much for the cool feature! I left some comments and suggestions!

@TejasRGitHub
Copy link
Contributor Author

Hi @dlpzx , Thanks a lot for the detailed review and suggestions . I have incorporated those changes and updated code. Please let me know if this looks good now

config.json Outdated Show resolved Hide resolved
@TejasRGitHub
Copy link
Contributor Author

@dlpzx , updated PR based on comments in the PR. The npm-audit is failing and it seems some network issue. Can you restart the npm-audit step

default_value='enabled',
config_property='modules.shares_base.features.show_share_logs',
)
def check_view_logs_permissions(username, groups, shareUri):
Copy link
Contributor

@dlpzx dlpzx Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we do not need to pass the username and groups as argument of check_view... We can get them directly from the context object as context.groups and context.username

Copy link
Contributor

@dlpzx dlpzx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Tejas, thanks again for all the effort put in this PR. Have a look at the summary in this comment: https://github.com/data-dot-all/dataall/pull/1559/files#r1770948390 for the changes needed :)

@TejasRGitHub
Copy link
Contributor Author

Hi @dlpzx , I have made the changes and tested the code locally and on aws data.all deployment. Please let me know if it looks good and can be merged

@dlpzx
Copy link
Contributor

dlpzx commented Sep 24, 2024

Hi @TejasRGitHub, this is a great PR! I have left one last nit comment and resolved all other comments. I have approved it and will merge with your response.

@dlpzx dlpzx merged commit 075b43c into data-dot-all:main Sep 25, 2024
9 checks passed
dlpzx pushed a commit that referenced this pull request Oct 15, 2024
### Feature or Bugfix
- Feature ( Docs ) 


### Detail
- Added in the "Deploy to AWS" section 

### Relates
- #1559

### Security
Please answer the questions below briefly where applicable, or write
`N/A`. Based on
[OWASP 10](https://owasp.org/Top10/en/).

- 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)?
  - Is the input sanitized?
- What precautions are you taking before deserializing the data you
consume?
  - Is injection prevented by parametrizing queries?
  - Have you ensured no `eval` or similar functions are used?
- Does this PR introduce any functionality or component that requires
authorization?
- How have you ensured it respects the existing AuthN/AuthZ mechanisms?
  - Are you logging failed auth attempts?
- Are you using or adding any cryptographic features?
  - Do you use a standard proven implementations?
  - Are the used keys controlled by the customer? Where are they stored?
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants