-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconnector_settings.py
116 lines (105 loc) · 3.07 KB
/
connector_settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
"""
Development settings for eidas_node.connector Django app.
DO NOT USE IN PRODUCTION!
See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
"""
# Security
from typing import Dict, Any
SECRET_KEY = 'secret'
DEBUG = True
ALLOWED_HOSTS = ['*']
# Application definition
INSTALLED_APPS = (
'django.contrib.staticfiles',
'eidas_node.connector.apps.ConnectorConfig',
)
MIDDLEWARE = (
'django.middleware.common.CommonMiddleware',
)
ROOT_URLCONF = 'eidas_node.connector.urls'
STATIC_URL = '/static/'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.contrib.messages.context_processors.messages',
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.template.context_processors.i18n',
]
}
}
]
# eIDAS Connector
CONNECTOR_REQUEST_TOKEN: Dict[str, Any] = {
'HASH_ALGORITHM': 'sha256',
'SECRET': 'mySecretConnectorRequest',
'ISSUER': 'specificCommunicationDefinitionConnectorRequest',
}
CONNECTOR_RESPONSE_TOKEN: Dict[str, str] = {
'HASH_ALGORITHM': 'sha256',
'SECRET': 'mySecretConnectorResponse',
'ISSUER': 'specificCommunicationDefinitionConnectorResponse',
'LIFETIME': 10, # minutes
}
CONNECTOR_SERVICE_PROVIDER: Dict[str, str] = {
'ENDPOINT': '/DemoServiceProviderResponse',
'REQUEST_ISSUER': 'REQUEST_ISSUER',
'RESPONSE_ISSUER': 'RESPONSE_ISSUER',
}
CONNECTOR_LIGHT_STORAGE: Dict[str, Any] = {
'BACKEND': 'eidas_node.storage.ignite.IgniteStorage',
'OPTIONS': {
'host': 'ignite.example.net',
'port': 10800,
'request_cache_name': 'specificNodeConnectorRequestCache',
'response_cache_name': 'nodeSpecificConnectorResponseCache',
}
}
CONNECTOR_EIDAS_NODE: Dict[str, str] = {
'CONNECTOR_REQUEST_URL': 'http://eidasnode.example.net/EidasNode/SpecificConnectorRequest',
'REQUEST_ISSUER': 'connector-request-issuer',
}
# Logging
LOGGING = {
'version': 1,
'formatters': {
'verbose': {'format': '%(asctime)s %(levelname)-8s %(module)s:%(funcName)s:%(lineno)s %(message)s'},
},
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'verbose',
},
},
'loggers': {
'': {
'handlers': ['console'],
'level': 'INFO',
'propagate': False,
},
'django.request': {
'handlers': ['console'],
'level': 'DEBUG',
'propagate': False,
},
'django': {
'handlers': ['console'],
'level': 'INFO',
'propagate': False,
},
'eidas_node.connector': {
'handlers': ['console'],
'level': 'DEBUG',
'propagate': False,
},
'eidas_node.storage': {
'handlers': ['console'],
'level': 'DEBUG',
'propagate': False,
},
},
}