You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the geonode_openid_connect tag and configuring the SOCIALACCOUNT_PROVIDERS map to point to a local oidc identity provider. When I login with a user, they should be automatically added to a group if it exists in their access token and in geonode prior to login.
Actual Behavior
Right now there are small bugs in geonode/people/adapters.py and geonode/people/profileextractor.py. When I run my geonode, I configured it to login the user in via the oidc identity provider, it throws an error based on (line 311/312) in geonode/people/adapters.py and geonode/people/profileextractor.py (line 211).
Steps to Reproduce the Problem
Set up an external oidc provider ( in my case keycloak)
In the settings.py file, override the SOCAILACCOUNT_PROVDERS with this block of code based on your keycloak install
As well as these environment variables
Create user and groups in keycloak and a client to log in through
As the geonode admin, create a group with the same name as the group a user is in in keycloak (both group names must be lowercase)
In geonode UI, click login, log in via OpenId Connect
This should result in an error
Specifications
GeoNode version: 4.2.2
Installation type (vanilla, geonode-project): vanilla
Installation method (manual, docker):
Platform: Ubuntu 22.04
Additional details:
Quick fix
Line 211 in geonode/people/profileextractor.py
Should be changed to
This is because on Line 311 in geonode/people/adapters.py to use the object.function notation in python the first argument in the method must be "self."
On Line 312 in geonode/people/adapters.py
Should be changed to
This is because on Line 215 in geonode/groups/models.py the "promote" method takes two arguments on of which is "self" and one of which is the user, however only the self argument is provided in the function call On Line 312 in geonode/people/adapters.py.
The text was updated successfully, but these errors were encountered:
Expected Behavior
I am using the geonode_openid_connect tag and configuring the SOCIALACCOUNT_PROVIDERS map to point to a local oidc identity provider. When I login with a user, they should be automatically added to a group if it exists in their access token and in geonode prior to login.
Actual Behavior
Right now there are small bugs in geonode/people/adapters.py and geonode/people/profileextractor.py. When I run my geonode, I configured it to login the user in via the oidc identity provider, it throws an error based on (line 311/312) in geonode/people/adapters.py and geonode/people/profileextractor.py (line 211).
Steps to Reproduce the Problem
As well as these environment variables
Specifications
Quick fix
Line 211 in geonode/people/profileextractor.py


Should be changed to
This is because on Line 311 in geonode/people/adapters.py to use the object.function notation in python the first argument in the method must be "self."

On Line 312 in geonode/people/adapters.py


Should be changed to
This is because on Line 215 in geonode/groups/models.py the "promote" method takes two arguments on of which is "self" and one of which is the user, however only the self argument is provided in the function call On Line 312 in geonode/people/adapters.py.

The text was updated successfully, but these errors were encountered: