'SimpleSAMLphp', 'data' => [ 'authSourceId' => '{{ env "SAML_AUTH_SOURCE_ID" }}', 'usernameAttribute' => '{{ env "SAML_USERNAME_ATTRIBUTE" }}', 'realNameAttribute' => '{{ env "SAML_REAL_NAME_ATTRIBUTE" }}', 'emailAttribute' => '{{ env "SAML_EMAIL_ATTRIBUTE" }}' ] ]; $wgGroupPermissions['*']['autocreateaccount'] = true; $wgGroupPermissions['*']['createaccount'] = false; {{ end }} {{ if eq (env "MEDIAWIKI_DEBUG") "1" }} $wgDebugLogFile = "/var/log/debug-{$wgDBname}.log"; $wgShowExceptionDetails = true; $wgDebugToolbar = true; {{ end }} {{ if eq (env "OPENID_ENABLED") "1" }} wfLoadExtension( 'PluggableAuth' ); wfLoadExtension( 'OpenIDConnect' ); $wgPluggableAuth_Config[] = [ 'plugin' => 'OpenIDConnect', 'data' => [ 'providerURL' => '{{ env "OPENID_KEYCLOAK_URL" }}', 'clientID' => '{{ env "OPENID_CLIENT_ID"}}', 'clientsecret' => '{{ secret "openid_client_secret" }}' ] ]; $wgGroupPermissions['*']['autocreateaccount'] = true; $wgGroupPermissions['*']['createaccount'] = false; {{ end }} {{ if env "SMTP_HOST" }} $wgSMTP = [ 'host' => '{{ env "SMTP_HOST" }}', // could also be an IP address. Where the SMTP server is located 'port' => {{ env "SMTP_PORT" }}, // Port to use when connecting to the SMTP server {{ if env "SMTP_USER" }} 'auth' => true, // Should we use SMTP authentication (true or false) 'username' => '{{ env "SMTP_USER" }}', // Username to use for SMTP authentication (if being used) 'password' => '{{ secret "smtp_password" }}' // Password to use for SMTP authentication (if being used) {{ else }} 'auth' => false {{ end }} ]; {{ end }} {{ if eq (env "MSU_ENABLED") "1" }} wfLoadExtension( 'MsUpload' ); $wgAllowJavaUploads = true; // Solves problem with Office 2007 and newer files (docx, xlsx, etc.) {{ end }} {{ if eq (env "PAGEFORMS_ENABLED") "1" }} wfLoadExtension( 'PageForms' ); {{ end }} {{ if eq (env "PAGESCHEMAS_ENABLED") "1" }} wfLoadExtension( 'PageSchemas' ); {{ end }} {{ if eq (env "SEMANTICMW_ENABLED") "1" }} wfLoadExtension( 'SemanticMediaWiki' ); enableSemantics( '{{ env "DOMAIN" }}' ); {{ end }} {{ if eq (env "MARKDOWN_ENABLED") "1" }} wfLoadExtension( 'WikiMarkdown' ); $wgAllowMarkdownExtra = true; // allows usage of Parsedown Extra $wgAllowMarkdownExtended = true; // allows usage of Parsedown Extended {{ end }} $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'doc', 'xls', 'mpp', 'pdf', 'ppt', 'tiff', 'bmp', 'docx', 'xlsx', 'pptx', 'ps', 'odt', 'ods', 'odp', 'odg' ); $wgUploadSizeWarning = 1000000000; $wgMaxUploadSize = 1000000000; # Greatly relax IP-based throttling for logging in while we work around docker networking issues. # https://social.coop/@flancian/110980993608947217 $wgPasswordAttemptThrottle = [ // Short term limit [ 'count' => 9999, 'seconds' => 300 ], // Long term limit. We need to balance the risk // of somebody using this as a DoS attack to lock someone // out of their account, and someone doing a brute force attack. [ 'count' => 999999, 'seconds' => 60 * 60 * 48 ], ];