geonode icon indicating copy to clipboard operation
geonode copied to clipboard

[Fixes #7535] Issues with .env GEOSERVER_ADMIN_PASSWORD

Open jthurner opened this issue 2 years ago • 6 comments

When initializing the geonode stack with docker, the password for the geoserver admin user is changed from the default to the value of $GEOSERVER_ADMIN_PASSWORD. Subsequent password changes require manual intervention to update the password in geoserver (even if FORCE_REINIT=true).

OGC_SERVER_DEFAULT_PASSWORD and OGC_SERVER_DEFAULT_USER are redundant as they always took the value of GEOSERVER_ADMIN_PASSWORD/GEOSERVER_ADMIN_USER if defined, replaced with GEOSERVER_ADMIN_PASSWORD/GEOSERVER_ADMIN_USER to avoid confusion.

Corresponding issues in geonode-project:

  • GeoNode/geonode-project#332
  • GeoNode/geonode-project#172
  • GeoNode/geonode-project#209

Checklist

For all pull requests:

  • [x] Confirm you have read the contribution guidelines
  • [ ] You have sent a Contribution Licence Agreement (CLA) as necessary (not required for small changes, e.g., fixing typos in the documentation)
  • [x] Make sure the first PR targets the master branch, eventual backports will be managed later. This can be ignored if the PR is fixing an issue that only happens in a specific branch, but not in newer ones.

The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):

  • [x] There is a ticket in https://github.com/GeoNode/geonode/issues describing the issue/improvement/feature (a notable exemption is, changes not visible to end-users)
  • [ ] The issue connected to the PR must have Labels and Milestone assigned
  • [x] PR for bug fixes and small new features are presented as a single commit
  • [x] Commit message must be in the form "[Fixes #<issue_number>] Title of the Issue"
  • [ ] New unit tests have been added covering the changes, unless there is an explanation on why the tests are not necessary/implemented
  • [ ] This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • [ ] This PR passes the QA checks: flake8 geonode
  • [ ] Commits changing the settings, UI, existing user workflows, or adding new functionality, need to include documentation updates
  • [ ] Commits adding new texts do use gettext and have updated .po / .mo files (without location infos)

Submitting the PR does not require you to check all items, but by the time it gets merged, they should be either satisfied or inapplicable.

jthurner avatar Aug 26 '22 08:08 jthurner

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @jthurner on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

cla-bot[bot] avatar Aug 26 '22 08:08 cla-bot[bot]

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @jthurner on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

cla-bot[bot] avatar Aug 26 '22 08:08 cla-bot[bot]

Codecov Report

Merging #9911 (dc5a082) into master (a85faae) will decrease coverage by 0.00%. The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master    #9911      +/-   ##
==========================================
- Coverage   61.39%   61.38%   -0.01%     
==========================================
  Files         823      823              
  Lines       50328    50328              
  Branches     7746     7746              
==========================================
- Hits        30898    30896       -2     
- Misses      17753    17756       +3     
+ Partials     1677     1676       -1     

codecov[bot] avatar Aug 26 '22 08:08 codecov[bot]

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id Secret Commit Filename
- Django Secret Key 63f1c8d9261e0630ab1af598061c70c6e06aeff7 .env.sample View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

gitguardian[bot] avatar Nov 23 '22 20:11 gitguardian[bot]

@jthurner your CLA is missing: https://github.com/GeoNode/geonode/blob/master/CONTRIBUTING.md @giohappy @mattiagiupponi old PR (28/08/22) but useful? Should I test it?

t-book avatar Feb 08 '23 22:02 t-book

This PR may have become superseded. It seems that the fixture to change the geoserver password got removed completely. This is actually good, as this raised so many issues.

@afabiani as you did the change, you should decide on this issue. What about all the other open issues targeting the same problem? I did a quick naive search and have the impression that a lot of them originate to the same problem.

ridoo avatar Nov 02 '23 11:11 ridoo