Closed AbduazizZiyodov closed 1 year ago
@AbduazizZiyodov Thank's for the report. Can you confirm me that if you click on "login again" several times it works ?
Sure. Here is my first visit to the admin panel:
I clicked on 'login again':
Got the same error:
I tried it by recreating many projects, the result is not changed. But now, I opened my dev tools and I see here is an error response:
Hey @AbduazizZiyodov ,
I don't reproduce your issue.
Can you add this logging settings in your settings.py
.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'loggers': {
'root': {
'handlers':['console'],
'formatter': 'default',
'level':'DEBUG',
}
}
}
Restart the django server, and try again to login. In your server output you will see the authentication requests. If you can copy/past the log here.
Thank's
Yeah, I can. It seems there is an error with the expiration signature (I read it from HTTP_500 response's body). You can see this response body on my previous comment.
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'.
Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
[10/Mar/2022 16:36:18] "OPTIONS /forest/authentication HTTP/1.1" 200 0
[10/Mar/2022 16:36:20] "POST /forest/authentication HTTP/1.1" 200 1123
[10/Mar/2022 16:36:21] "OPTIONS /forest/authentication/callback?code=yogfcCkdNM5CP_lZld6vUUwlVQ5_ejG695eJZGrLLu3gsU8RphV-yivuaCOPa-Rh&state=%7B%22renderingId%22%3A+120430%7D HTTP/1.1" 200 0
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'.
Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
Internal Server Error: /forest/authentication/callback
[10/Mar/2022 16:36:23] "GET /forest/authentication/callback?code=yogfcCkdNM5CP_lZld6vUUwlVQ5_ejG695eJZGrLLu3gsU8RphV-yivuaCOPa-Rh&state=%7B%22renderingId%22%3A+120430%7D HTTP/1.1" 500 65
Is your project is available in github ? I would like to try to onboarding it.
@AbduazizZiyodov A new release has been done. If you install it we should have more info about the issue
Hi, I pushed my test project on Github: https://github.com/AbduazizZiyodov/forest-test Installed a new release of django-forestadmin, recreated the project on forestadmin.com. I restarted my Django server and got a new error:
Log:
[14/Mar/2022 23:32:02] "POST /forest/authentication HTTP/1.1" 200 1123
[14/Mar/2022 23:32:02] "OPTIONS /forest/authentication/callback?code=1HbR32UUvcy3G9o9e5mLljgORrh7mJ3oTqoxEKAnv862kLh-PQWcDjqWiQuWeSke&state=%7B%22renderingId%22%3A+120841%7D HTTP/1.1" 200 0
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
[14/Mar/2022 23:32:04] "GET /forest/authentication/callback?code=1HbR32UUvcy3G9o9e5mLljgORrh7mJ3oTqoxEKAnv862kLh-PQWcDjqWiQuWeSke&state=%7B%22renderingId%22%3A+120841%7D HTTP/1.1" 200 498
[14/Mar/2022 23:32:04] "OPTIONS /forest/authentication HTTP/1.1" 200 0
[14/Mar/2022 23:32:04] "POST /forest/authentication HTTP/1.1" 200 1123
[14/Mar/2022 23:32:05] "OPTIONS /forest/authentication/callback?code=QXzmo9b7ZedRgeMh7acgiCXaW36lXCnyDGeaFk2rvrG9DdjywcZpsMAcqE7jB55t&state=%7B%22renderingId%22%3A+120841%7D HTTP/1.1" 200 0
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
[14/Mar/2022 23:32:06] "GET /forest/authentication/callback?code=QXzmo9b7ZedRgeMh7acgiCXaW36lXCnyDGeaFk2rvrG9DdjywcZpsMAcqE7jB55t&state=%7B%22renderingId%22%3A+120841%7D HTTP/1.1" 200 498
[14/Mar/2022 23:32:06] "OPTIONS /forest/auth_group?timezone=Etc%2FGMT-5&fields%5Bauth_group%5D=id%2Cname&page%5Bnumber%5D=1&page%5Bsize%5D=15&sort=-id HTTP/1.1" 200 0
[14/Mar/2022 23:32:06] Forbidden: /forest/auth_group
"OPTIONS /forest/auth_group/count?fields%5Bauth_group%5D=id%2Cname&timezone=Etc%2FGMT-5 HTTP/1.1" 200 0
[14/Mar/2022 23:32:06] "GET /forest/auth_group?timezone=Etc%2FGMT-5&fields%5Bauth_group%5D=id%2Cname&page%5Bnumber%5D=1&page%5Bsize%5D=15&sort=-id HTTP/1.1" 403 0
Forbidden: /forest/auth_group/count
[14/Mar/2022 23:32:06] "GET /forest/auth_group/count?fields%5Bauth_group%5D=id%2Cname&timezone=Etc%2FGMT-5 HTTP/1.1" 403 0
Screenshots:
@AbduazizZiyodov I clone your repository and I try to use it in forest. It works on my side. Please add these settings and paste me the django logs. On your screen the logs are not enabled and I can't help you without them.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'loggers': {
'django_forest': {
'handlers':['console'],
'formatter': 'default',
'level':'DEBUG',
}
}
}```
Logs:
System check identified no issues (0 silenced).
March 15, 2022 - 15:13:30
Django version 3.2.7, using settings 'forest_test.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
[15/Mar/2022 15:13:41] "OPTIONS /forest/authentication HTTP/1.1" 200 0
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
Retrieve authentication configuration successfull
{'authorization_endpoint': 'https://api.forestadmin.com/oidc/auth', 'device_authorization_endpoint': 'https://api.forestadmin.com/oidc/device/auth', 'claims_parameter_supported': False, 'claims_supported': ['sub', 'email', 'sid', 'auth_time', 'iss'], 'code_challenge_methods_supported': ['S256'], 'end_session_endpoint': 'https://api.forestadmin.com/oidc/session/end', 'grant_types_supported': ['authorization_code', 'urn:ietf:params:oauth:grant-type:device_code'], 'id_token_signing_alg_values_supported': ['HS256', 'RS256'], 'issuer': 'https://api.forestadmin.com', 'jwks_uri': 'https://api.forestadmin.com/oidc/jwks', 'registration_endpoint': 'https://api.forestadmin.com/oidc/reg', 'response_modes_supported': ['query'], 'response_types_supported': ['code', 'none'], 'scopes_supported': ['openid', 'email', 'profile'], 'subject_types_supported': ['public'], 'token_endpoint_auth_methods_supported': ['none'], 'token_endpoint_auth_signing_alg_values_supported': [], 'token_endpoint': 'https://api.forestadmin.com/oidc/token', 'request_object_signing_alg_values_supported': ['HS256', 'RS256'], 'request_parameter_supported': False, 'request_uri_parameter_supported': True, 'require_request_uri_registration': True, 'claim_types_supported': ['normal']}
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
New oic client registration success.
metadata: {'token_endpoint_auth_method': 'none', 'redirect_uris': ['http://127.0.0.1:8000/forest/authentication/callback'], 'registration_endpoint': 'https://api.forestadmin.com/oidc/reg'},
headers: {'Authorization': 'Bearer dd3b1432299c7e35214422c5cecfd78669d47f9149ea7fa104af4ab7ad7320e7'}
[15/Mar/2022 15:13:44] "POST /forest/authentication HTTP/1.1" 200 1123
[15/Mar/2022 15:13:45] "OPTIONS /forest/authentication/callback?code=rXpOkocKfzUT1i71HaddPla4jaj3q8dz6ewgj6UEHf31PAV1ZxtjZ8KQWlEBMYrT&state=%7B%22renderingId%22%3A+120841%7D HTTP/1.1" 200 0
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
[15/Mar/2022 15:13:47] "GET /forest/authentication/callback?code=rXpOkocKfzUT1i71HaddPla4jaj3q8dz6ewgj6UEHf31PAV1ZxtjZ8KQWlEBMYrT&state=%7B%22renderingId%22%3A+120841%7D HTTP/1.1" 200 498
[15/Mar/2022 15:13:47] "OPTIONS /forest/authentication HTTP/1.1" 200 0
[15/Mar/2022 15:13:47] "POST /forest/authentication HTTP/1.1" 200 1123
[15/Mar/2022 15:13:47] "OPTIONS /forest/authentication/callback?code=o--8QPSWYblZKnXCRpFuEbkHnrxU-PuQCYpYNXVj-JKSGLY_UOTWbm93RMQnbjuo&state=%7B%22renderingId%22%3A+120841%7D HTTP/1.1" 200 0
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
C:\Users\User\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
[15/Mar/2022 15:13:49] "GET /forest/authentication/callback?code=o--8QPSWYblZKnXCRpFuEbkHnrxU-PuQCYpYNXVj-JKSGLY_UOTWbm93RMQnbjuo&state=%7B%22renderingId%22%3A+120841%7D HTTP/1.1" 200 498
[15/Mar/2022 15:13:49] "OPTIONS /forest/auth_group?timezone=Etc%2FGMT-5&fields%5Bauth_group%5D=id%2Cname&page%5Bnumber%5D=1&page%5Bsize%5D=15&sort=-id HTTP/1.1" 200 0
Forbidden: /forest/auth_group
[15/Mar/2022 15:13:49] "OPTIONS /forest/auth_group/count?fields%5Bauth_group%5D=id%2Cname&timezone=Etc%2FGMT-5 HTTP/1.1" 200 0
[15/Mar/2022 15:13:49] "GET /forest/auth_group?timezone=Etc%2FGMT-5&fields%5Bauth_group%5D=id%2Cname&page%5Bnumber%5D=1&page%5Bsize%5D=15&sort=-id HTTP/1.1" 403 0
Forbidden: /forest/auth_group/count
[15/Mar/2022 15:13:49] "GET /forest/auth_group/count?fields%5Bauth_group%5D=id%2Cname&timezone=Etc%2FGMT-5 HTTP/1.1" 403 0
Expected behaviour
Actual behaviour
Internal Server Error: /forest/authentication/callback
Failure Logs
Context
1.1.2
3.2.7