1 from django.conf import settings
3 # Set the expiration time of newly created auth tokens
4 # to be this many hours after their creation time.
5 AUTH_TOKEN_DURATION = getattr(settings, 'ASTAKOS_AUTH_TOKEN_DURATION', 30 * 24)
7 # OAuth2 Twitter credentials.
8 TWITTER_TOKEN = getattr(settings, 'ASTAKOS_TWITTER_TOKEN', '')
9 TWITTER_SECRET = getattr(settings, 'ASTAKOS_TWITTER_SECRET', '')
10 TWITTER_AUTH_FORCE_LOGIN = getattr(settings, 'ASTAKOS_TWITTER_AUTH_FORCE_LOGIN',
13 DEFAULT_USER_LEVEL = getattr(settings, 'ASTAKOS_DEFAULT_USER_LEVEL', 4)
15 INVITATIONS_PER_LEVEL = getattr(settings, 'ASTAKOS_INVITATIONS_PER_LEVEL', {
23 # Address to use for outgoing emails
24 DEFAULT_CONTACT_EMAIL = getattr(
25 settings, 'ASTAKOS_DEFAULT_CONTACT_EMAIL', 'support@cloud.grnet.gr')
27 # Identity Management enabled modules
28 # Supported modules are: 'local', 'twitter' and 'shibboleth'
29 IM_MODULES = getattr(settings, 'ASTAKOS_IM_MODULES', ['local'])
31 # Force user profile verification
32 FORCE_PROFILE_UPDATE = getattr(settings, 'ASTAKOS_FORCE_PROFILE_UPDATE', True)
35 INVITATIONS_ENABLED = getattr(settings, 'ASTAKOS_INVITATIONS_ENABLED', False)
37 COOKIE_NAME = getattr(settings, 'ASTAKOS_COOKIE_NAME', '_pithos2_a')
38 COOKIE_DOMAIN = getattr(settings, 'ASTAKOS_COOKIE_DOMAIN', None)
39 COOKIE_SECURE = getattr(settings, 'ASTAKOS_COOKIE_SECURE', True)
41 IM_STATIC_URL = getattr(settings, 'ASTAKOS_IM_STATIC_URL', '/static/im/')
43 # If set to False and invitations not enabled newly created user will be automatically accepted
44 MODERATION_ENABLED = getattr(settings, 'ASTAKOS_MODERATION_ENABLED', True)
47 BASEURL = getattr(settings, 'ASTAKOS_BASEURL', 'http://pithos.dev.grnet.gr')
50 SITENAME = getattr(settings, 'ASTAKOS_SITENAME', 'GRNET Cloud')
53 RECAPTCHA_PUBLIC_KEY = getattr(settings, 'ASTAKOS_RECAPTCHA_PUBLIC_KEY', '')
54 RECAPTCHA_PRIVATE_KEY = getattr(settings, 'ASTAKOS_RECAPTCHA_PRIVATE_KEY', '')
55 RECAPTCHA_OPTIONS = getattr(settings, 'ASTAKOS_RECAPTCHA_OPTIONS',
56 {'theme': 'custom', 'custom_theme_widget': 'okeanos_recaptcha'})
57 RECAPTCHA_USE_SSL = getattr(settings, 'ASTAKOS_RECAPTCHA_USE_SSL', True)
58 RECAPTCHA_ENABLED = getattr(settings, 'ASTAKOS_RECAPTCHA_ENABLED', False)
60 # set AstakosUser fields to propagate in the billing system
61 BILLING_FIELDS = getattr(settings, 'ASTAKOS_BILLING_FIELDS', ['is_active'])
64 QUEUE_CONNECTION = getattr(settings, 'ASTAKOS_QUEUE_CONNECTION', None) # Example: 'rabbitmq://guest:guest@localhost:5672/astakos'
66 # Set where the user should be redirected after logout
67 LOGOUT_NEXT = getattr(settings, 'ASTAKOS_LOGOUT_NEXT', '')
69 # Set user email patterns that are automatically activated
70 RE_USER_EMAIL_PATTERNS = getattr(
71 settings, 'ASTAKOS_RE_USER_EMAIL_PATTERNS', [])
73 # Messages to display on login page header
74 # e.g. {'warning': 'This warning message will be displayed on the top of login page'}
75 LOGIN_MESSAGES = getattr(settings, 'ASTAKOS_LOGIN_MESSAGES', [])
77 # Messages to display on login page header
78 # e.g. {'warning': 'This warning message will be displayed on the top of signup page'}
79 SIGNUP_MESSAGES = getattr(settings, 'ASTAKOS_SIGNUP_MESSAGES', [])
81 # Messages to display on login page header
82 # e.g. {'warning': 'This warning message will be displayed on the top of profile page'}
83 PROFILE_MESSAGES = getattr(settings, 'ASTAKOS_PROFILE_MESSAGES', [])
85 # Messages to display on all pages
86 # e.g. {'warning': 'This warning message will be displayed on the top of every page'}
87 GLOBAL_MESSAGES = getattr(settings, 'ASTAKOS_GLOBAL_MESSAGES', [])
89 # messages to display as extra actions in account forms
90 # e.g. {'https://cms.okeanos.grnet.gr/': 'Back to ~okeanos'}
91 PROFILE_EXTRA_LINKS = getattr(settings, 'ASTAKOS_PROFILE_EXTRA_LINKS', {})
93 # The number of unsuccessful login requests per minute allowed for a specific user
94 RATELIMIT_RETRIES_ALLOWED = getattr(
95 settings, 'ASTAKOS_RATELIMIT_RETRIES_ALLOWED', 3)
97 # If False the email change mechanism is disabled
98 EMAILCHANGE_ENABLED = getattr(settings, 'ASTAKOS_EMAILCHANGE_ENABLED', False)
100 # Set the expiration time (in days) of email change requests
101 EMAILCHANGE_ACTIVATION_DAYS = getattr(
102 settings, 'ASTAKOS_EMAILCHANGE_ACTIVATION_DAYS', 10)
104 # Set the astakos main functions logging severity (None to disable)
105 from logging import INFO
106 LOGGING_LEVEL = getattr(settings, 'ASTAKOS_LOGGING_LEVEL', INFO)
108 # Configurable email subjects
109 INVITATION_EMAIL_SUBJECT = getattr(
110 settings, 'ASTAKOS_INVITATION_EMAIL_SUBJECT',
111 'Invitation to %s alpha2 testing' % SITENAME)
112 GREETING_EMAIL_SUBJECT = getattr(settings, 'ASTAKOS_GREETING_EMAIL_SUBJECT',
113 'Welcome to %s alpha2 testing' % SITENAME)
114 FEEDBACK_EMAIL_SUBJECT = getattr(settings, 'ASTAKOS_FEEDBACK_EMAIL_SUBJECT',
115 'Feedback from %s alpha2 testing' % SITENAME)
116 VERIFICATION_EMAIL_SUBJECT = getattr(
117 settings, 'ASTAKOS_VERIFICATION_EMAIL_SUBJECT',
118 '%s alpha2 testing account activation is needed' % SITENAME)
119 ACCOUNT_CREATION_SUBJECT = getattr(
120 settings, 'ASTAKOS_ACCOUNT_CREATION_SUBJECT',
121 '%s alpha2 testing account created (%%(user)s)' % SITENAME)
122 GROUP_CREATION_SUBJECT = getattr(settings, 'ASTAKOS_GROUP_CREATION_SUBJECT',
123 '%s alpha2 testing group created (%%(group)s)' % SITENAME)
124 HELPDESK_NOTIFICATION_EMAIL_SUBJECT = getattr(
125 settings, 'ASTAKOS_HELPDESK_NOTIFICATION_EMAIL_SUBJECT',
126 '%s alpha2 testing account activated (%%(user)s)' % SITENAME)
127 EMAIL_CHANGE_EMAIL_SUBJECT = getattr(
128 settings, 'ASTAKOS_EMAIL_CHANGE_EMAIL_SUBJECT',
129 'Email change on %s alpha2 testing' % SITENAME)
130 PASSWORD_RESET_EMAIL_SUBJECT = getattr(
131 settings, 'ASTAKOS_PASSWORD_RESET_EMAIL_SUBJECT',
132 'Password reset on %s alpha2 testing' % SITENAME)
134 # Set the quota holder component URI
135 QUOTAHOLDER_URL = getattr(settings, 'ASTAKOS_QUOTAHOLDER_URL', '')
136 QUOTAHOLDER_TOKEN = getattr(settings, 'ASTAKOS_QUOTAHOLDER_TOKEN', '')
138 # Set the cloud service properties
139 SERVICES = getattr(settings, 'ASTAKOS_SERVICES', {
141 'url': 'https://node1.example.com/ui/',
146 'desc': 'Number of virtual machines'
150 'uplimit':30*1024*1024*1024,
152 'desc': 'Virtual machine disk size'
157 'desc': 'Number of virtual machine processors'
161 'uplimit':6*1024*1024*1024,
163 'desc': 'Virtual machines'
165 'name':'network.private',
168 'desc': 'Private networks'
173 'url': 'https://node2.example.com/ui/',
177 'uplimit':5 * 1024 * 1024 * 1024,
179 'desc': 'Pithos account diskspace'
184 # Set the billing URI
185 AQUARIUM_URL = getattr(settings, 'ASTAKOS_AQUARIUM_URL', '')
187 # Set how many objects should be displayed per page
188 PAGINATE_BY = getattr(settings, 'ASTAKOS_PAGINATE_BY', 8)
190 # Set how many objects should be displayed per page in show all groups page
191 PAGINATE_BY_ALL = getattr(settings, 'ASTAKOS_PAGINATE_BY_ALL', 15)
193 # Enforce token renewal on password change/reset
194 NEWPASSWD_INVALIDATE_TOKEN = getattr(
195 settings, 'ASTAKOS_NEWPASSWD_INVALIDATE_TOKEN', True)
198 RESOURCES_PRESENTATION_DATA = getattr(
199 settings, 'ASTAKOS_RESOURCES_PRESENTATION_DATA', {
202 'help_text':'Compute resources (amount of VMs, CPUs, RAM, System disk) ',
203 'is_abbreviation':False,
205 'verbose_name':'compute',
208 'help_text':'Storage resources (amount of space to store files on Pithos) ',
209 'is_abbreviation':False,
211 'verbose_name':'storage',
214 'help_text':' Network resources (amount of Private Networks) ',
215 'is_abbreviation':False,
217 'verbose_name':'network',
221 'pithos+.diskspace': {
222 'help_text':'This is the space on Pithos for storing files and VM Images. ',
223 'help_text_input_each':'This is the total amount of space on Pithos that will be granted to each user of this Project ',
224 'is_abbreviation':False,
225 'report_desc':'Storage Space',
226 'placeholder':'eg. 10GB',
227 'verbose_name':'Storage Space',
230 'help_text':'These are the VMs one can create on the Cyclades UI ',
231 'help_text_input_each':'This is the total number of VMs that will be granted to each user of this Project ',
232 'is_abbreviation':True,
233 'report_desc':'Virtual Machines',
234 'placeholder':'eg. 2',
238 'help_text':'This is the System Disk that the VMs have that run the OS ',
239 'help_text_input_each':"This is the total amount of System Disk that will be granted to each user of this Project (this refers to the total System Disk of all VMs, not each VM's System Disk) ",
240 'is_abbreviation':False,
241 'report_desc':'System Disk',
242 'placeholder':'eg. 5GB, 2GB etc',
243 'verbose_name':'System Disk'
246 'help_text':'RAM used by VMs ',
247 'help_text_input_each':'This is the total amount of RAM that will be granted to each user of this Project (on all VMs) ',
248 'is_abbreviation':True,
250 'placeholder':'eg. 4GB',
254 'help_text':'CPUs used by VMs ',
255 'help_text_input_each':'This is the total number of CPUs that will be granted to each user of this Project (on all VMs) ',
256 'is_abbreviation':True,
257 'report_desc':'CPUs',
258 'placeholder':'eg. 1',
261 'cyclades.network.private': {
262 'help_text':'These are the Private Networks one can create on the Cyclades UI. ',
263 'help_text_input_each':'This is the total number of Private Networks that will be granted to each user of this Project ',
264 'is_abbreviation':False,
265 'report_desc':'Private Networks',
266 'placeholder':'eg. 1',
267 'verbose_name':'private network'
274 # Permit local account migration
275 ENABLE_LOCAL_ACCOUNT_MIGRATION = getattr(settings, 'ASTAKOS_ENABLE_LOCAL_ACCOUNT_MIGRATION', True)
277 # Strict shibboleth usage
278 SHIBBOLETH_REQUIRE_NAME_INFO = getattr(settings,
279 'ASTAKOS_SHIBBOLETH_REQUIRE_NAME_INFO',