Re: [I] api login with ldap account ,returns error [superset]

2024-05-31 Thread via GitHub


marrocksd commented on issue #27964:
URL: https://github.com/apache/superset/issues/27964#issuecomment-2141890530

   Posted a workaround here. Have a look!
   https://github.com/apache/superset/discussions/28138


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] api login with ldap account ,returns error [superset]

2024-04-19 Thread via GitHub


square-li commented on issue #27964:
URL: https://github.com/apache/superset/issues/27964#issuecomment-2065835489

   I am having the same issue login from API if runing just `docker compose 
up`. However when I run something like 
   ```
   export TAG=4.0.0
   docker compose -f docker-compose-image-tag.yml up
   ```
   then I don't have any issues.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] api login with ldap account ,returns error [superset]

2024-04-18 Thread via GitHub


Attachai77 commented on issue #27964:
URL: https://github.com/apache/superset/issues/27964#issuecomment-2065674447

   any updates?  I have the same error.
   
   
   https://github.com/apache/superset/assets/15119618/4aa4b2a7-0bf3-4e96-934d-34527544f2d9;>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] api login with ldap account ,returns error [superset]

2024-04-10 Thread via GitHub


schoenbl-plwr commented on issue #27964:
URL: https://github.com/apache/superset/issues/27964#issuecomment-2047791181

   I'm receiving the same error.
   
   I'm cloning the repo.
   
   I'm adding to the default my superset_config.py:
   ```
   TALISMAN_ENABLED = False
   ENABLE_CORS = True
   HTTP_HEADERS={"X-Frame-Options":"ALLOWALL"}
   
   SESSION_COOKIE_SAMESITE = None
   ENABLE_PROXY_FIX = True
   PUBLIC_ROLE_LIKE_GAMMA = True
   FEATURE_FLAGS = {
   "EMBEDDED_SUPERSET": True
   }
   
   CORS_OPTIONS = {
 'supports_credentials': True,
 'allow_headers': ['*'],
 'resources':['*'],
 'origins': ['*']
   }
   ```
   
   I'm running `sudo docker-compose -f docker-compose-non-dev.yml up -d`
   
   From postman requesting: `http://domain/api/v1/security/login`
   This is the payload:
   ```
   {
 "password": "admin",
 "provider": "db",
 "refresh": true,
 "username": "admin"
   }
   ```
   
   This is the response:
   ```
   {
   "message": "Fatal error"
   }
   ```
   
   When looking at the logs:
   ```
   2024-04-10 14:58:51,257:ERROR:flask_appbuilder.api:'SupersetApp' object has 
no attribute 'json_encoder'
   superset_app  | Traceback (most recent call last):
   superset_app  |   File 
"/usr/local/lib/python3.10/site-packages/flask_appbuilder/api/__init__.py", 
line 110, in wraps
   superset_app  | return f(self, *args, **kwargs)
   superset_app  |   File 
"/usr/local/lib/python3.10/site-packages/flask_appbuilder/security/api.py", 
line 107, in login
   superset_app  | resp[API_SECURITY_ACCESS_TOKEN_KEY] = 
create_access_token(
   superset_app  |   File 
"/usr/local/lib/python3.10/site-packages/flask_jwt_extended/utils.py", line 
169, in create_access_token
   superset_app  | return jwt_manager._encode_jwt_from_config(
   superset_app  |   File 
"/usr/local/lib/python3.10/site-packages/flask_jwt_extended/jwt_manager.py", 
line 506, in _encode_jwt_from_config
   superset_app  | json_encoder=config.json_encoder,
   superset_app  |   File 
"/usr/local/lib/python3.10/site-packages/flask_jwt_extended/config.py", line 
276, in json_encoder
   superset_app  | return current_app.json_encoder
   superset_app  | AttributeError: 'SupersetApp' object has no 
attribute 'json_encoder'
   superset_app  | 76.88.39.186 - - [10/Apr/2024:14:58:51 +] "POST 
/api/v1/security/login HTTP/1.1" 500 31 "-" "PostmanRuntime/7.36.0"
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[I] api login with ldap account ,returns error [superset]

2024-04-09 Thread via GitHub


baiyuxiong opened a new issue, #27964:
URL: https://github.com/apache/superset/issues/27964

   ### Bug description
   
   ```
   curl --location --request POST 'http://127.0.0.1:8088/api/v1/security/login' 
\
   --header 'accept: application/json' \
   --header 'Content-Type: application/json' \
   --header 'Cookie: 
session=.eJwljktqBDEMRO_idRay9e25TCPbEhPSZKA72WTI3eMh1OoVvKKeZc3zrnu5pR9XvJX9fZZbSWriEbVmqIWNV1IJ2KRTxwSWZpw2NlPJ8MWB5CrI3XlLiswGo4rWzW0IGitXaAqcuY1slLWaIvQ-mQiTCXm2imRE2L2sI99XnP9veOG4zty_Hh_x-So8VGJtepLZbIi4CYAKdW7VvcOUMTKWdzyGH7Gcn3v5_QNPCEKx.ZhTSkg.WdM3dPnPc9Shb1qo4QojKgueBeA'
 \
   --data-raw '{
 "password": "*",
 "provider": "ldap",
 "refresh": true,
 "username": "ldapuser"
   }'
   ```
   
   
   
![截图_17126423063075](https://github.com/apache/superset/assets/230689/7f706c19-4e4c-4970-adbf-3e96d8d9e9eb)
   
   
   ### How to reproduce the bug
   
   1. git clone https://github.com/apache/superset.git
   2. docker compose -f docker-compose-non-dev.yml up -d
   3. enable ldap login
   4. curl login with ldap accout
   5. got error as image above.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [X] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org