Commit 650adc59 authored by Nico Vermaas's avatar Nico Vermaas

into the cors dragon's lair again!

parent 9cd35812
Pipeline #15543 passed with stages
in 2 minutes and 58 seconds
......@@ -15,12 +15,12 @@ logger = logging.getLogger(__name__)
import mozilla_django_oidc.utils
# nv: monkey patching absolutify to force https callback... (joern put me up to it!)
def my_absolutify(request, path):
#return request.build_absolute_uri(path)
callback_url = request.build_absolute_uri(reverse('oidc_authentication_callback')).replace('http:','https:')
callback_url = request.build_absolute_uri(path)
#callback_url = request.build_absolute_uri(reverse('oidc_authentication_callback')).replace('http:','https:')
logger.info('callback_url = ' + callback_url)
return callback_url
# mozilla_django_oidc.utils.absolutify = my_absolutify
mozilla_django_oidc.utils.absolutify = my_absolutify
class EsapQuerySchemaViewSet(viewsets.ModelViewSet):
......
......@@ -18,6 +18,8 @@ IS_DEV = True
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_CREDENTIALS = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# Database
DATABASE_ROUTERS = [
'query.database_router.QueryRouter',
......
......@@ -8,12 +8,8 @@ import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
# SECRET_KEY = 'cie-((m#n$br$6l53yash45*2^mwuux*2u)bad5(0flx@krnj9'
# SECURE_SSL_REDIRECT = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
......
......@@ -10609,3 +10609,41 @@
[20/Jul/2021 17:21:10,376] OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS: 60
[20/Jul/2021 17:21:10,377] uid = https://iam-escape.cloud.cnaf.infn.it/userinfo:2c49b469-d7ad-4e59-a503-cadbae9bd30a
[20/Jul/2021 17:21:10,392] user_profile = <QuerySet [<EsapUserProfile: vermaas>]>
[22/Jul/2021 09:41:18,963] callback_url = http://localhost:5555/esap-api/oidc/callback/
[22/Jul/2021 09:41:38,596] callback_url = http://localhost:5555/esap-api/oidc/callback/
[22/Jul/2021 09:42:36,304] callback_url = http://localhost:5555/esap-api/oidc/callback/
[22/Jul/2021 09:43:26,054] update_userprofile uid = https://iam-escape.cloud.cnaf.infn.it/userinfo:2c49b469-d7ad-4e59-a503-cadbae9bd30a
[22/Jul/2021 09:43:27,109] id_token expires in 59 seconds
[22/Jul/2021 09:43:27,109] OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS: 60
[22/Jul/2021 09:43:27,110] uid = https://iam-escape.cloud.cnaf.infn.it/userinfo:2c49b469-d7ad-4e59-a503-cadbae9bd30a
[22/Jul/2021 09:43:27,129] user_profile = <QuerySet [<EsapUserProfile: vermaas>]>
[22/Jul/2021 09:43:27,192] id_token expires in 59 seconds
[22/Jul/2021 09:43:27,192] OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS: 60
[22/Jul/2021 09:43:27,193] uid = https://iam-escape.cloud.cnaf.infn.it/userinfo:2c49b469-d7ad-4e59-a503-cadbae9bd30a
[22/Jul/2021 09:43:27,214] user_profile = <QuerySet [<EsapUserProfile: vermaas>]>
[22/Jul/2021 09:43:27,354] id_token expires in 59 seconds
[22/Jul/2021 09:43:27,354] OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS: 60
[22/Jul/2021 09:43:27,355] uid = https://iam-escape.cloud.cnaf.infn.it/userinfo:2c49b469-d7ad-4e59-a503-cadbae9bd30a
[22/Jul/2021 09:43:27,374] user_profile = <QuerySet [<EsapUserProfile: vermaas>]>
[22/Jul/2021 09:59:11,565] 'oidc_id_token'
[22/Jul/2021 09:59:42,398] callback_url = http://localhost:5555/esap-api/oidc/callback/
[22/Jul/2021 10:00:13,313] update_userprofile uid = https://iam-escape.cloud.cnaf.infn.it/userinfo:2c49b469-d7ad-4e59-a503-cadbae9bd30a
[22/Jul/2021 10:00:14,641] id_token expires in 59 seconds
[22/Jul/2021 10:00:14,641] OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS: 60
[22/Jul/2021 10:00:14,641] uid = https://iam-escape.cloud.cnaf.infn.it/userinfo:2c49b469-d7ad-4e59-a503-cadbae9bd30a
[22/Jul/2021 10:00:14,664] user_profile = <QuerySet [<EsapUserProfile: vermaas>]>
[22/Jul/2021 10:00:14,744] id_token expires in 59 seconds
[22/Jul/2021 10:00:14,745] OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS: 60
[22/Jul/2021 10:00:14,745] uid = https://iam-escape.cloud.cnaf.infn.it/userinfo:2c49b469-d7ad-4e59-a503-cadbae9bd30a
[22/Jul/2021 10:00:14,761] user_profile = <QuerySet [<EsapUserProfile: vermaas>]>
[22/Jul/2021 10:00:14,854] id_token expires in 59 seconds
[22/Jul/2021 10:00:14,854] OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS: 60
[22/Jul/2021 10:00:14,855] uid = https://iam-escape.cloud.cnaf.infn.it/userinfo:2c49b469-d7ad-4e59-a503-cadbae9bd30a
[22/Jul/2021 10:00:14,869] user_profile = <QuerySet [<EsapUserProfile: vermaas>]>
[22/Jul/2021 10:00:33,197] 'oidc_id_token'
[22/Jul/2021 10:01:30,951] 'oidc_id_token'
[22/Jul/2021 10:02:40,371] 'oidc_id_token'
[22/Jul/2021 10:05:15,084] callback_url = http://localhost:5555/esap-api/oidc/callback/
[22/Jul/2021 10:05:34,612] callback_url = http://localhost:5555/esap-api/oidc/callback/
[22/Jul/2021 10:06:59,837] callback_url = http://localhost:5555/esap-api/oidc/callback/
[22/Jul/2021 10:10:16,096] callback_url = http://localhost:5555/esap-api/oidc/callback/
......@@ -70,7 +70,7 @@
</div>
<p class="footer" small>ASTRON - version 20 jul 2021 - 18:05</p>
<p class="footer" small>ASTRON - version 22 jul 2021 - 10:00</p>
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment