Skip to content
Frank Smutniak edited this page Jul 9, 2019 · 4 revisions

Introduction

The main application configuration for Vireo is located in conf/application.conf. The file consists of simple name/value pairs used to direct how the application operates. Oftentimes it is helpful to have several deployment scenarios defined in a configuration file at the same time. To support this, Play has the concept of frameworks. Each framework is an ID used to identify a configuration set. All the parameters defined below can be scoped to a particular framework. For example:

paramater1 = default value
%myframework.paramater1 = another value

When evaluated if Play is operating under the framework "myframework" then paramater1 is "another value". However, under any other framework the value is "default value". Using this you can specify local deployment configuration. For example, if you want to change the HTTP port that is used for your instance of Vireo, you could define %myedu.http.port = 80. Then, when you run Play, always use the "myedu" framework.

To specify a framework when running Vireo add --%frameworkID to the end of any command. For example play start --%myedu

Config File

# This is the main configuration file for the application.
#
# Documentation: 
# https://github.com/TexasDigitalLibrary/Vireo/wiki/Configuration

HTTP

# HTTP
# ~~~~~
http.port=9000
http.path=/

URL

# Reverse routing URLs for background tasks. If you are proxying Vireo you
# still need to turn on "PreserveHost On".
application.baseUrl=http://www.yourdomain.com/

Database

# Database
# ~~~~~
db=postgres://host/database_name
db.user = user
db.pass = secret

# JPA Schema settings
# - validate: validate the schema, makes no changes to the database
# - update: update the schema
# - create: creates the schema, destroying previous data.
# - create-drop: drop the schema at the end of the session
jpa.ddl=update

# If you are using postgres be sure to turn on this table sequence dialect
jpa.dialect=org.tdl.vireo.model.jpa.TableNameSequencePostgresDialect

Data Paths

# Assetstore
# ~~~~~~
# Vireo stores several types of files these are the locations for where they
# will be stored. The attachments directory is where all files associated with
# a submission are stored, the index directory contains the lucene search index
# of submissions, and finally the deposit directory is where any deposits are
# made by the FileDepositor.
# NOTE: These paths need to be relative to the Vireo application root path
attachments.path=data/attachments
index.path=data/indexes
deposits.path=data/deposits

E-Mail

# Mail
# ~~~~~ 
mail.smtp.host=127.0.0.1
# mail.smtp.user=admin
# mail.smtp.pass=
# mail.smtp.channel=ssl

Authentication

# Authentication
# ~~~~~
# You have several authentication options for security identifying Vireo users.
# Below configures how each of these options work, you can either enable only
# one option or have multiple the options enabled allowing the user to select
# which one is best for their particular case.

# Force all authenticated sessions to use SSL
auth.forceSSL = false

# Password Authentication Module
auth.pass.enabled = true
auth.pass.visible = true
auth.pass.name = Vireo Account
auth.pass.description = Users who are not able to use other options should select this option to login with Vireo account.

# Shibboleth Authentication Module
auth.shib.enabled = false
auth.shib.visible = true
auth.shib.name = Shibboleth Authentication
auth.shib.description = Users who are currently active with the university may login using the <a href="http://shibboleth.net" />Shibboleth protocol</a> to provide secure attributes about the user.
auth.shib.login.forceSSL = false
auth.shib.login.url = /Shibboleth.sso/Login?target=%1s
auth.shib.logout.url = /Shibboleth.sso/Logout?return=%1s
auth.shib.logout.enabled = false
# primary identifier may be either netid or email.
auth.shib.primaryIdentifier = netid 
# Shib-specific settings to assist with debugging
auth.shib.mock = false
auth.shib.log = false

Shibboleth

# Required attributes, netid is only required if it is the primary identifier
auth.shib.attribute.netid = SHIB_netid
auth.shib.attribute.email = SHIB_mail
auth.shib.attribute.firstName = SHIB_givenName
auth.shib.attribute.lastName = SHIB_sn

# Optional attributes
auth.shib.attribute.institutionalIdentifier = SHIB_uin
auth.shib.attribute.middleName = SHIB_initials
auth.shib.attribute.birthYear = SHIB_birthYear
auth.shib.attribute.affiliations = SHIB_eduPersonAffiliation
auth.shib.attribute.currentPhoneNumber = SHIB_phone
auth.shib.attribute.currentPostalAddress = SHIB_postal
auth.shib.attribute.currentEmailAddress = SHIB_mail
auth.shib.attribute.permanentPhoneNumber = SHIB_permanentPhone
auth.shib.attribute.permanentPostalAddress = SHIB_permanentPostal
auth.shib.attribute.permanentEmailAddress = SHIB_permanentEmail
auth.shib.attribute.currentDegree = SHIB_degree
auth.shib.attribute.currentDepartment = SHIB_department
auth.shib.attribute.currentCollege = SHIB_college
auth.shib.attribute.currentMajor = SHIB_major
auth.shib.attribute.currentGraduationYear = SHIB_gradYear
auth.shib.attribute.currentGraduationMonth = SHIB_gradMonth
auth.shib.attribute.orcid = SHIB_orcid

# Limit advisor's affiliation

# This option requires that your authentication source (probably LDAP or 
# Shibboleth) receive an attribute similar to eduPersonAffilation which
# describes how the person is affiliated with the institution. When this
# parameter is supplied then you can limit advisors to only those who have a 
# particular affiliation(s). Supply all the acceptable affiliations below 
# separated by a semicolon. if the list is empty or commented out then, all 
# affiliations will be allowed to act as an advisor in Vireo and approve 
# applications.
#
advisor.affiliation.restrict = faculty


# Locking submission fields
#
# Determine what fields should be locked during the submission process. If the
# authentication method is able to provide information about a person and that
# grouping of information listed below as locked then the student will not be
# able to edit that information during submission. If the authentication
# mechanism is not able to provide the information, or it is invalid, then 
# the student will always be able to edit the field no matter what the lock
# setting says. Available groups:
#
# "personal": first, middle, and last names along with birth year.
# "affiliation": department, degree, major.
# "contact": permanent and current phone, address, and email.
#
submit.field.lock = personal

Play Framework Secret Key

# Secret key
# ~~~~~
# The secrete key used to secure cryptographic functions (like authentication
# cookies). Use the "play secret" command to generate a new random key for each
# deployment. If you're application is load balanced between several instances
# they must all have the same key. 
application.secret=E0b6jRAusIRPEWE7zv7tj3ujDJxjWFlwrBU8DzGcbw7rrzltkMPwFjdS8QcuHoFU

Logging

# Log level
# ~~~~~
# Specify log level for your application.
# If you want a very customized log, create a log4j.properties file in the conf
# directory
application.log=INFO

# More logging configuration
application.log.path=/log4j.properties
application.log.system.out=off

Vireo Application Configuration

# Vireo Version
# ~~~~~
vireo.version = 3.0.0

# Framework
# ~~~~~
# Do not edit these
application.name=vireo3
application.mode=prod
play.spring.namespace-aware=true
date.format=MM/dd/yyyy

File Size Validation

# File Size Validation
# ~~~~~
# set validate to true to enforce individual and total file size maximums during upload step.
# not enforced in administrator interface (allowing overrides, when appropriate).
fileSize.validate = true
fileSize.maxFileSize = 512
fileSize.maxFileSizeTotal = 4096

Development/Testing

# Testing. Set up a custom configuration for test mode
# ~~~~~
# These are the override settings for when runing as a test deployment
%test.application.mode=dev

# Test Database
# ~~~~~
%test.db=mem
%test.db.url=jdbc:h2:mem:play;MODE=MYSQL;LOCK_MODE=0
%test.db.h2.webport=8083
%test.jpa.ddl=create

# Test Mail
# ~~~~~
%test.mail.smtp=mock
%test.mail.smtp=mock
%test.mail.debug=true

# Test Log level
# ~~~~~
%test.application.log=DEBUG
%test.application.log.path=/log4j.test.properties
%test.application.log.system.out=on

# Enable Mock shib for testing
%test.auth.shib.enabled = true