Skip to content

Commit

Permalink
Add settings of ORA2 fileupload openedx#1498 (openedx#1504)
Browse files Browse the repository at this point in the history
  • Loading branch information
hachiyanagi-ks authored Nov 30, 2016
1 parent a0f1f47 commit c3817d5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cms/envs/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,3 +402,19 @@

### Max character length of course display name
MAX_LENGTH_COURSE_DISPLAY_NAME = ENV_TOKENS.get('MAX_LENGTH_COURSE_DISPLAY_NAME', MAX_LENGTH_COURSE_DISPLAY_NAME)

##### ORA2 ######
# Prefix for uploads of example-based assessment AI classifiers
# This can be used to separate uploads for different environments
# within the same S3 bucket.
ORA2_FILE_PREFIX = ENV_TOKENS.get("ORA2_FILE_PREFIX", ORA2_FILE_PREFIX)

# Specific setting for the File Upload Service to store media in a bucket.
FILE_UPLOAD_STORAGE_BUCKET_NAME = ENV_TOKENS.get('FILE_UPLOAD_STORAGE_BUCKET_NAME', FILE_UPLOAD_STORAGE_BUCKET_NAME)
FILE_UPLOAD_STORAGE_PREFIX = ENV_TOKENS.get('FILE_UPLOAD_STORAGE_PREFIX', FILE_UPLOAD_STORAGE_PREFIX)

# Security settings for ORA2 file upload
if FEATURES.get('ENABLE_ORA2_WAF_PROXY'):
ORA2_WAF_PROXY_SERVER_IP = ENV_TOKENS.get("ORA2_WAF_PROXY_SERVER_IP", ORA2_WAF_PROXY_SERVER_IP)
ORA2_WAF_PROXY_SERVER_PORT = ENV_TOKENS.get("ORA2_WAF_PROXY_SERVER_PORT", ORA2_WAF_PROXY_SERVER_PORT)
ORA2_WAF_VIRUS_DETECTION_KEYWORD = ENV_TOKENS.get("ORA2_WAF_VIRUS_DETECTION_KEYWORD", ORA2_WAF_VIRUS_DETECTION_KEYWORD)
7 changes: 7 additions & 0 deletions cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
REST_FRAMEWORK,
# The following settings need to load module(lms.djangoapps.instructor.views.instructor_dashboard).
BULK_EMAIL_DEFAULT_RETRY_DELAY, BULK_EMAIL_MAX_RETRIES, GRADES_DOWNLOAD_ROUTING_KEY,
# The following settings need to use ORA2 file upload.
ORA2_FILE_PREFIX, FILE_UPLOAD_STORAGE_BUCKET_NAME, FILE_UPLOAD_STORAGE_PREFIX,
ORA2_WAF_PROXY_SERVER_IP, ORA2_WAF_PROXY_SERVER_PORT, ORA2_WAF_VIRUS_DETECTION_KEYWORD,
)
from path import Path as path
from warnings import simplefilter
Expand Down Expand Up @@ -198,6 +201,10 @@

# Enable secure token feature to playback video in JWPlayer XBlock
'ENABLE_JWPLAYER_SECURE_TOKEN': True,

# Optional security feature for ORA2 file upload
'ENABLE_ORA2_WAF_PROXY': False,
'ENABLE_ORA2_FILE_TYPE_STRICT_CHECK': False,
}

ENABLE_JASMINE = False
Expand Down

0 comments on commit c3817d5

Please sign in to comment.