Skip to content

Commit

Permalink
fixes geoserver auth button #4335
Browse files Browse the repository at this point in the history
  • Loading branch information
florian committed Jun 12, 2019
1 parent 05d12ef commit 8fee085
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion scripts/spcgeonode/.env
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ HTTPS_HOST=
HTTPS_PORT=443

# IP or domain name and port where the server can be reached on HTTP (leave HOST empty if you want to use HTTPS only)
HTTP_HOST=127.0.0.1
HTTP_HOST=172.30.218.218

This comment has been minimized.

Copy link
@gannebamm

gannebamm Nov 26, 2019

Contributor

This does not look like it should point to 172.30.218.218, doest it? Don´t know what this guy thought while committing this change.

This comment has been minimized.

Copy link
@gannebamm

gannebamm Nov 26, 2019

Contributor

Just 4 info: The changes above were never included into the master codebase, see #4486

#127.0.0.1
HTTP_PORT=80

# Email where alters should be sent. This will be used by let's encrypt and as the django admin email.
Expand Down
3 changes: 2 additions & 1 deletion scripts/spcgeonode/django/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
pk=1,
name='GeoServer',
client_type='confidential',
authorization_grant_type='authorization-code'
authorization_grant_type='authorization-code',
skip_authorization=True

This comment has been minimized.

Copy link
@frafra

frafra Nov 26, 2019

Contributor

Be aware that this change breaks upgrades because of https://stackoverflow.com/a/28859409/1312346

This comment has been minimized.

Copy link
@gannebamm

gannebamm Nov 26, 2019

Contributor

Btw the actually merged PR is this one: #4486

)
redirect_uris = [
'http://{}/geoserver'.format(os.getenv('HTTPS_HOST',"") if os.getenv('HTTPS_HOST',"") != "" else os.getenv('HTTP_HOST')),
Expand Down
4 changes: 2 additions & 2 deletions scripts/spcgeonode/geoserver/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ fi
sed -i -r "s|<cliendId>.*</cliendId>|<cliendId>$CLIENT_ID</cliendId>|" "/spcgeonode-geodatadir/security/filter/geonode-oauth2/config.xml"
sed -i -r "s|<clientSecret>.*</clientSecret>|<clientSecret>$CLIENT_SECRET</clientSecret>|" "/spcgeonode-geodatadir/security/filter/geonode-oauth2/config.xml"
# OAuth endpoints (client)
sed -i -r "s|<userAuthorizationUri>.*</userAuthorizationUri>|<userAuthorizationUri>$BASEURL/o/authorize/</userAuthorizationUri>|" "/spcgeonode-geodatadir/security/filter/geonode-oauth2/config.xml"
sed -i -r "s|<redirectUri>.*</redirectUri>|<redirectUri>$BASEURL/geoserver/index.html</redirectUri>|" "/spcgeonode-geodatadir/security/filter/geonode-oauth2/config.xml"
sed -i -r "s|<userAuthorizationUri>.*</userAuthorizationUri>|<userAuthorizationUri>/o/authorize/</userAuthorizationUri>|" "/spcgeonode-geodatadir/security/filter/geonode-oauth2/config.xml"
sed -i -r "s|<redirectUri>.*</redirectUri>|<redirectUri>$BASEURL/index.html</redirectUri>|" "/spcgeonode-geodatadir/security/filter/geonode-oauth2/config.xml"
sed -i -r "s|<logoutUri>.*</logoutUri>|<logoutUri>$BASEURL/account/logout/</logoutUri>|" "/spcgeonode-geodatadir/security/filter/geonode-oauth2/config.xml"
# OAuth endpoints (server)
sed -i -r "s|<accessTokenUri>.*</accessTokenUri>|<accessTokenUri>http://nginx/o/token/</accessTokenUri>|" "/spcgeonode-geodatadir/security/filter/geonode-oauth2/config.xml"
Expand Down

0 comments on commit 8fee085

Please sign in to comment.