automate icon indicating copy to clipboard operation
automate copied to clipboard

code changes in global and config_request files

Open Aishwarya2001A opened this issue 1 year ago • 2 comments

:nut_and_bolt: Description: What code changed, and why?

Added Nginx config for X-Forwarded-For Header

:chains: Related Resources

https://chefio.atlassian.net/browse/CHEF-9078

:+1: Definition of Done

  • Added Nginx config for X-Forwarded-For Header
  • Changed in automate-load-balancer
  • Changed in automate-cs-nginx
  • Made this configurable
  • Tested the changes and see if the source IP is being logged into Server log
  • Tested in Standalone

:athletic_shoe: How to Build and Test the Change

  1. Components to rebuild :
  • rebuild components/automate-gateway/
  • rebuild components/automate-load-balancer/
  • rebuild components/automate-cli/
  • rebuild components/automate-deployment/
  • rebuild components/automate-cs-nginx/
  1. Added the following conf to demo.toml file

    [global.v1.nginx] http_include_x_forwarded_for = true

    and patch using the following command:

    chef-automate config patch demo.toml

  2. sudo tail -f /var/log/access.log ( To check if source IP is being logged into Server logs)

:white_check_mark: Checklist

All PRs must tick these:

With occasional exceptions, all PRs from Progress employees must tick these:

  • [x] Is the code clear? (complicated code or lots of comments--subdivide and use well-named methods, meaningful variable names, etc.)
  • [x] Consistency checked? (user notifications, user prompts, visual patterns, code patterns, variable names)
  • [x] Repeated code blocks eliminated? (adapt and reuse existing components, blocks, functions, etc.)
  • [x] Spelling, grammar, typos checked? (at a minimum use make spell in any component directory)
  • [x] Code well-formatted? (indents, line breaks, etc. improve rather than hinder readability)

All PRs from Progress employees should tick these if appropriate:

  • [ ] Tests added/updated? (all new code needs new tests)
  • [ ] Docs added/updated? (all customer-facing changes)

Please add a note next to any checkbox above if you are NOT ticking it.

:camera: Screenshots, if applicable

Services are up and running

Successfully the source IP is being logged into Server logs

Testing video

https://progresssoftware-my.sharepoint.com/personal/aaishwar_progress_com/_layouts/15/stream.aspx?id=%2Fpersonal%2Faaishwar%5Fprogress%5Fcom%2FDocuments%2FMicrosoft%20Teams%20Chat%20Files%2FX%2Dforwarded%2Dheader%2Emov&ga=1&referrer=StreamWebApp%2EWeb&referrerScenario=AddressBarCopiedShareExpControl%2Eview

Aishwarya2001A avatar Mar 22 '24 07:03 Aishwarya2001A

Deploy Preview for chef-automate ready!

Name Link
Latest commit dfea7f98455906fe8189d8a119e32b6f1c87a312
Latest deploy log https://app.netlify.com/sites/chef-automate/deploys/67063b9947a9270009474383
Deploy Preview https://deploy-preview-8405--chef-automate.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 22 '24 07:03 netlify[bot]

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube