GeoNode / geonode-project

A django template project for creating custom GeoNode projects.
http://geonode.org
78 stars 172 forks source link

Geoserver Passwort not set on fresh install #172

Open t-book opened 3 years ago

t-book commented 3 years ago

Branch 3.2.x

Start Stack on a fresh VM Set a secure password instead of default: geoserver

Passwort get's not set and invoke is showing:

Setting GeoServer Admin Password...
Response Code: 401
WARNING: GeoServer admin password *NOT* updated: code [401]
tail: invoke.log: file truncated
Darkonyks commented 3 years ago

@t-book I have also fresh docker GN 3.2.x installation and I have successfully changed admin password. As I can see by default in .env file OAUTH2_API_KEY= is blank. You should first in Geoserver in 'AuthKEY REST Role Service geonode REST role service' add REST Api Key and then add it to your .env. Try it to see if this will help.

d3netxer commented 3 years ago

Thanks, I updated the OAuth2 Rest API Key (https://docs.geonode.org/en/master/install/basic/index.html#oauth2-rest-api-key) and also the admin password in the GeoServer console. Then I was able to change the OAUTH2_API_KEY and geoserver password in the .env file. It worked successfully. You need to change the geoserver password in the .env file to match the geoserver console, or else you will get an error when trying to upload a dataset in GeoNode.

frafra commented 2 years ago

This issue makes impossible to secure GeoServer in production environments. Setting a non-trivial password requires setting it again using the GeoServer web interface, but that lasts until the container is destroyed.