### Setup MinIO Client and Mirror File Storage Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Installs the MinIO client ('mc'), sets up an alias for your MinIO instance, and mirrors the local file storage to an S3 bucket. Replace placeholders with your actual access key, secret, and bucket name. ```bash wget -O /usr/local/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc chmod +x /usr/local/bin/mc mc alias set local http://127.0.0.1:9000 mc mirror local/proctoring /path/to/backup/s3 ``` -------------------------------- ### Start New Docker Compose Installation Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Starts a new installation using Docker Compose, ensuring all services are recreated and the latest images are pulled. ```bash docker compose up -d --force-recreate --pull always ``` -------------------------------- ### Install and Configure MinIO Client (mc) Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Download, install, and configure the MinIO client (mc) for data migration. Set up an alias for your MinIO server. ```bash # download and install MinIO client curl https://dl.min.io/client/mc/release/linux-amd64/mc \ --create-dirs \ -o $HOME/bin/mc chmod +x $HOME/bin/mc # add alias mc alias set local http://127.0.0.1:9000 ``` -------------------------------- ### Session Search Syntax Examples Source: https://octoproctor.com/resources/documentation/instructions-for-proctors Examples of how to use search syntax to find specific sessions based on identifiers, user logins, or partial matches. ```text ^123$ ``` ```text student1 ``` ```text ^proctor1|proctor2$ ``` ```text ^entrance ``` ```text exam ``` -------------------------------- ### List MinIO Lifecycle Transition Rules Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide List the configured transition rules for a MinIO bucket to verify the setup. ```bash mc ilm rule ls minio1/proctoring --transition ``` -------------------------------- ### TURN Server Connection String Example Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Example of a TURN connection string. Ensure to replace `` with the actual external IP address of your TURN server. ```text turn://webrtc:webrtc@:3478?transport=tcp+udp ``` -------------------------------- ### Full WebSDK Integration Example Source: https://octoproctor.com/resources/documentation/websdk-integration-guide This snippet shows a complete integration of the Supervisor WebSDK, including event handling and session start/stop logic. ```html ``` -------------------------------- ### Initialize then Start Session Source: https://octoproctor.com/resources/documentation/websdk-integration-guide Initialize the session with payload data and then explicitly start the session. This provides more control over the initialization process. ```javascript // initialize the session supervisor.init({ ...payload }).then(function () { // start the session return supervisor.start(); }); ``` -------------------------------- ### Initialize and Start Session with JWT Source: https://octoproctor.com/resources/documentation/websdk-integration-guide Start a proctoring session by providing a JWT token obtained from your server. This is a shortcut for init() and start() calls. ```javascript // initialize the session and start it supervisor.start({ // set your provider name provider: 'jwt', // get JWT string from your server token: fetch('/api/token').then(function (response) { if (response.ok) return response.text(); else throw Error('Failed to get JWT'); }) }); ``` -------------------------------- ### Handle Session Start Event Source: https://octoproctor.com/resources/documentation/websdk-integration-guide Subscribe to the 'start' event to execute custom logic once the proctoring session has successfully begun. ```javascript // subscribe to the session start event supervisor.on('start', function () { console.log('started'); }); ``` -------------------------------- ### Start MinIO Container with GCS Gateway Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Use this command to start a MinIO container with Google Cloud Storage gateway support. Ensure the path to your GCS credentials JSON is correctly specified. ```docker docker run -d --name minio --network host --restart always \ -v /path/to/credentials.json:/credentials.json \ -e "GOOGLE_APPLICATION_CREDENTIALS=/credentials.json" \ -e "MINIO_ROOT_USER=minioadmin" \ -e "MINIO_ROOT_PASSWORD=minioadmin" \ minio/minio:RELEASE.2022-04-16T04-26-02Z \ gateway gcs yourprojectid ``` -------------------------------- ### Example URL Encoding for SDK Link Source: https://octoproctor.com/resources/documentation/integration-with-open-edx Demonstrates the conversion of a direct link to the SDK page into a URL-encoded format, which is required for the LTI tool configuration. ```text Original link: https://your-edx-server/courses/course-v1:edX+DemoX+Demo_Course/f282cfc230d04a14b31ac42df22daa1b/ Encoded link: https%3A%2F%2Fyour-edx-server%2Fcourses%2Fcourse-v1%3AedX%2BDemoX%2BDemo_Course%2Ff282cfc230d04a14b31ac42df22daa1b%2F ``` -------------------------------- ### Run TURN Server Container Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Command to start the TURN server container with specified parameters for ports, credentials, and network settings. ```docker docker run -d --name turn --network host --restart always \ coturn/coturn:latest \ --no-cli --log-file=stdout --no-tls --no-dtls --lt-cred-mech --fingerprint \ --max-allocate-timeout=60 --listening-port=3478 --min-port=49152 --max-port=65535 \ --user=webrtc:webrtc --realm=proctoring --external-ip='$(detect-external-ip)' ``` -------------------------------- ### Start Session in Self-Registration Mode Source: https://octoproctor.com/resources/documentation/websdk-integration-guide Initiate a proctoring session in self-registration mode by calling start() with an empty object or no parameters. ```javascript // start the session in self-registration mode supervisor.start(); ``` -------------------------------- ### Run Recognizer Container Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Command to start the recognizer container. Ensure the API_KEY is set to a secure secret. ```docker docker run -d --name recognizer \ --network host --restart always \ -e "API_KEY=secret" \ public.ecr.aws/s8z4o5f0/recognizer:latest ``` -------------------------------- ### Search using 'now' operator with time units Source: https://octoproctor.com/resources/documentation/instructions-for-administrators This example demonstrates searching for sessions created within the last day, using the 'now' operator and time units. ```search createdAt > now-1d & createdAt <= now ``` -------------------------------- ### Run Octoproctor Application Server Instance Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Docker run command to start the Octoproctor application server. Configure environment variables for database, storage, recognition, TURN, and SSL. ```bash docker run -d --name node --network host --restart always \ --tmpfs /tmp \ -v "cert:/etc/letsencrypt" \ -v "webroot:/var/www" \ -e "DISTRIB_URL=https://files.proctoring.app/dist/proctoring-vXYZ.zip" \ -e "DISTRIB_KEY=secret" \ -e "MONGO_URI=mongodb://admin:secret@127.0.0.1:27017/proctoring?authSource=admin" \ -e "MINIO_URI=http://minioadmin:minioadmin@127.0.0.1:9000/proctoring" \ -e "RECOGNIZER_URI=http://secret@127.0.0.1:8080/recognize" \ -e "TURN_URI=turn://webrtc:webrtc@127.0.0.1:3478?transport=tcp+udp" \ -e "SESSION_KEY=secret" \ -e "SSL_KEY=/etc/letsencrypt/live//privkey.pem" \ -e "SSL_CERT=/etc/letsencrypt/live//cert.pem" \ -e "SSL_CA=/etc/letsencrypt/live//chain.pem" \ -e "PORT=443" \ -e "HTTP_PORT=80" \ -e "HTTP_WEBROOT=/var/www" \ -e "MANAGER_USERNAME=manager" \ -e "MANAGER_PASSWORD=changeme" \ -e "MANAGER_HOST=" \ public.ecr.aws/s8z4o5f0/node:latest ``` -------------------------------- ### Start Proctoring Session Source: https://octoproctor.com/resources/documentation/websdk-integration-guide Initialize a proctoring session using the Supervisor SDK's start() function with a JWT token. This should be called after the test-taker has completed pre-session steps. ```javascript import supervisor from '@octoproctor/supervisor'; const token = "YOUR_JWT_TOKEN"; supervisor.start(token); ``` -------------------------------- ### Add MinIO Lifecycle Transition Rule Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Add a lifecycle rule to transition objects to cold storage after a specified number of days. This example sets a 1-day transition for both current and noncurrent objects. ```bash mc ilm rule add minio1/proctoring \ --transition-tier MINIO_COLD_TIER \ --transition-days 1 \ --noncurrent-transition-tier MINIO_COLD_TIER \ --noncurrent-transition-days 1 ``` -------------------------------- ### Mirror local directory to S3 bucket Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Use this command to mirror a local directory to an S3 bucket. Ensure 'mc' is installed and aliased. ```bash mc mirror /path/to/backup local/proctoring ``` -------------------------------- ### Run MinIO Gateway for Azure Blob Storage Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Start a MinIO container with the Azure gateway enabled. This is for versions prior to June 1, 2022. Replace 'azurestorageaccountname' and 'azurestorageaccountkey' with your Azure credentials. ```docker docker run -d --name minio --network host --restart always \ -e "MINIO_ROOT_USER=azurestorageaccountname" \ -e "MINIO_ROOT_PASSWORD=azurestorageaccountkey" \ minio/minio:RELEASE.2022-04-16T04:26:02Z \ gateway azure ``` -------------------------------- ### Create MinIO Buckets Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Create buckets on both hot and cold storage servers for data organization. ```bash mc mb minio1/proctoring mc mb minio2/proctoring ``` -------------------------------- ### Generated JWT Token Example Source: https://octoproctor.com/resources/documentation/websdk-integration-guide This is an example of a JWT token generated using the HS256 algorithm and a specific secret key with the provided payload. ```text eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImEzNGMxYTFhLTUzZWYtNDcyOC04ZGM1LTljNDc3OWE4NTg2ZSIsIm5pY2tuYW1lIjoiSm9obiBEb2UiLCJpZGVudGlmaWVyIjoiNTY1YjMwYjgtNWNmYi00MmUyLWEyOTItNDc4ZDIwNjMwZDFiIiwidGVtcGxhdGUiOiJkZWZhdWx0Iiwic3ViamVjdCI6IlR1dG9yaWFsOiBwcm9jdG9yaW5nIiwidGFncyI6WyJtYWxlIl19.1sHajdMz3n82hQEsfJTE3bii6mV3nOtTLkxTe6qwzuI ``` -------------------------------- ### Configure MinIO Client Aliases Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Set up aliases for MinIO servers to interact with them using the MinIO Client (mc). Replace and with your storage access keys. ```bash mc alias set minio1 http://127.0.0.1:9000 mc alias set minio2 http://127.0.0.1:9100 ``` -------------------------------- ### Run MinIO Container Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Launches the MinIO object storage container with specified volume, network settings, and root credentials. It configures the server and console addresses. ```bash docker run -d --name minio --network host --restart always \ -v "storage:/data" \ -e "MINIO_ROOT_USER=minioadmin" \ -e "MINIO_ROOT_PASSWORD=minioadmin" \ minio/minio:latest \ server /data --address ":9000" --console-address ":9001" ``` -------------------------------- ### Configure MinIO Admin Policy and User Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Create and attach an admin policy for lifecycle management to a user on the MinIO server. Replace and with your chosen credentials. ```bash mc admin policy create minio1 LifecycleAdminPolicy lifecycle-policy.json mc admin user add minio1 mc admin policy attach minio1 LifecycleAdminPolicy --user=minio1LifecycleAdmin ``` -------------------------------- ### LTI 1.0 External Tool URL Example Source: https://octoproctor.com/resources/documentation/integration-with-canvas Example URL for adding an LTI 1.0 external tool to a Canvas course module. This URL bypasses the need for manual 'url' or 'template' parameter entry in the Canvas UI. ```text https://demo.proctoring.app/api/auth/canvas?redirect=https://your-canvas-server&template=quiz1&url=/courses//quizzes//take ``` -------------------------------- ### Create Docker Volumes for Let's Encrypt Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Commands to create Docker volumes for storing Let's Encrypt certificates and webroot files. ```bash docker volume create cert docker volume create webroot ``` -------------------------------- ### Search for sessions starting with a word (case-insensitive) Source: https://octoproctor.com/resources/documentation/instructions-for-administrators This regex finds sessions whose titles begin with 'Entrance', ignoring case. ```regex ^entrance ``` -------------------------------- ### Import Configuration via JSON Source: https://octoproctor.com/resources/documentation/instructions-for-managers Use this JSON structure to import a new configuration. It requires a 'key' and can optionally include 'params' for system instance settings like webhook configurations. ```json { "key": "...", "params": { "webhooks": { "jwt": { "strategy": "jwt", "secretOrKey": "secret", "profile": { "username": "payload.username", "role": "payload.role", "nickname": "payload.nickname" }, "register": { "name": "payload.name", "subject": "payload.subject", "url": "payload.url", "template": "payload.template" } } } } } ``` -------------------------------- ### Create MongoDB Volumes Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Create volumes on the host machine to store MongoDB database files and configuration data. These are used for both single server and cluster setups. ```bash docker volume create db docker volume create configdb ``` -------------------------------- ### JWT Payload for Proctor Authorization Source: https://octoproctor.com/resources/documentation/websdk-integration-guide Example JWT payload structure for authorizing a proctor with automatic account creation. Ensure the 'username' and 'role' fields are correctly populated. ```json { "username": "proctor1", "role": "proctor" } ``` -------------------------------- ### Automatic Session Initialization (Init Mode) Source: https://octoproctor.com/resources/documentation/websdk-integration-guide Use this script to automatically initialize the WebSDK for a proctoring session in self-registration mode or with a payload from data-attributes. ```html ``` -------------------------------- ### Microsoft Forms Embed Code Source: https://octoproctor.com/resources/documentation/use-case-for-google-forms-and-microsoft-forms This is an example of an iframe code snippet generated by Microsoft Forms for embedding. The 'src' attribute should point to the form's response page. ```html ``` -------------------------------- ### MinIO Storage Connection String Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Connection string for accessing MinIO storage. ```bash http://minioadmin:minioadmin@127.0.0.1:9000/proctoring ``` -------------------------------- ### Google Forms Embed Code Source: https://octoproctor.com/resources/documentation/use-case-for-google-forms-and-microsoft-forms This is an example of an iframe code snippet generated by Google Forms for embedding. Ensure the 'src' attribute contains the correct form URL. ```html ``` -------------------------------- ### TURN Server Command Parameters Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Key command-line parameters for configuring the TURN server, including listening port, UDP port range, user credentials, and realm. ```shell # TURN server port --listening-port=3478 # range of UDP ports --min-port=49152 --max-port=65535 # user credentials as : --user=webrtc:webrtc ``` -------------------------------- ### LearnDash Quiz Proctoring Script Source: https://octoproctor.com/resources/documentation/integration-with-learndash This script initializes the Supervisor SDK and hides the LearnDash quiz content until a proctoring session starts. Replace 'demo.proctoring.app' with your proctoring server domain. ```html ``` -------------------------------- ### Launch All Containers with Docker Compose Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Use this command to create and run all containers defined in your docker-compose.yml file simultaneously. Ensure you are in the directory containing the file. ```bash docker compose up -d ``` -------------------------------- ### Proctoring Host Configuration for LTI Integration Source: https://octoproctor.com/resources/documentation/integration-with-lti-compliant-lms Load this JSON configuration with integration parameters into your proctoring system manager for on-premises installations. It supports both LTI and LTI 1.3 strategies. ```json { "id": "", "key": "", "params": { "webhooks": { "lti": { "strategy": "lti", "consumerKey": "demo", "consumerSecret": "secret", "callbackURL": "query.redirect", "profile": { "username": "payload.user_id", "role": "payload.roles.find(v=>/Instructor/.test(v))?'proctor':'student'", "nickname": "payload.lis_person_name_full", "lang": "(payload.launch_presentation_locale||'').slice(0,2)", "group": "['G',payload.context_id,payload.resource_link_id].join('-')", "referrer": "payload.launch_presentation_return_url", "labels": "payload.lis_person_contact_email_primary" }, "register": { "identifier": "[payload.user_id,payload.context_id,payload.resource_link_id].join('-').replace(/[^A-Za-z0-9_-]+/g,'_')", "subject": "payload.resource_link_title", "template": "payload.custom_template||'default'", "members": "payload.custom_members==='@'?user.group:payload.custom_members", "url": "payload.custom_url||payload.launch_presentation_return_url", "code": "payload.custom_code" }, "start": true, "stop": true, "pause": true, "submit": true }, "lti13": { "strategy": "lti13", "privateKey": "", "publicKeysetURL": "", "accessTokenURL": "", "authRequestURL": "", "callbackURL": "query.redirect", "profile": { "username": "payload.sub", "role": "payload.roles.find(v=>/Instructor/.test(v))?'proctor':'student'", "nickname": "payload.name", "lang": "(payload.launch_presentation.locale||'').slice(0,2)", "group": "['G',payload.context.id,payload.resource_link.id].join('-')", "referrer": "payload.launch_presentation.return_url", "labels": "payload.email" }, "register": { "identifier": "[payload.sub,payload.context.id,payload.resource_link.id].join('-')", "subject": "payload.resource_link.title", "template": "payload.custom?.template||'default'", "members": "payload.custom?.members==='@'?user.group:payload.custom?.members", "url": "payload.custom?.url||payload.launch_presentation.return_url", "code": "payload.custom?.code" }, "start": true, "pause": true, "stop": true, "submit": true } } } } ``` -------------------------------- ### Create Supervisor Instance Source: https://octoproctor.com/resources/documentation/websdk-integration-guide Instantiate the Supervisor class with the proctoring server URL. Ensure the script is loaded from the same domain as specified in the URL. ```javascript // create Supervisor instance var supervisor = new Supervisor({ url: 'https://demo.proctoring.app', }); ``` -------------------------------- ### Enable Logging via Page Code Source: https://octoproctor.com/resources/documentation/websdk-integration-guide Automatically enable all supervisor logging namespaces by adding this script before the supervisor script loads. Logging will cease once the session is completed. ```html ``` -------------------------------- ### Configure LTI Consumer for Proctoring Source: https://octoproctor.com/resources/documentation/integration-with-open-edx Example of custom parameters for an LTI Consumer element in Open edX. The 'url' parameter specifies the assessment page, and 'template' selects the proctoring session template. ```json ["url=https://your-edx-server/path/to/quiz","template=default"] ``` -------------------------------- ### Mirror MinIO Data Locally Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Copy all data from the MinIO server to a local directory using the 'mc mirror' command. This is a step in upgrading MinIO. ```bash # download all data into local directory mc mirror local/proctoring /path/to/backup ``` -------------------------------- ### Restore File Storage from S3 Bucket Source: https://octoproctor.com/resources/documentation/octoproctor-system-installation-and-upgrade-guide Restores file storage data by mirroring an S3 bucket to a local directory using the MinIO client. Ensure 'mc' is installed and aliased, and replace placeholders with your actual access key, secret, and bucket name. ```bash mc alias set local http://127.0.0.1:9000 mc mirror /path/to/backup/s3/ local/proctoring ``` -------------------------------- ### LTI External Tool Configuration Parameters Source: https://octoproctor.com/resources/documentation/integration-with-lti-compliant-lms Use these parameters to set up the LTI external tool in your LMS. Ensure to replace placeholders with your specific URLs and credentials. ```text Tool URL: https://demo.proctoring.app/api/lti?redirect= Custom Parameters: Key: template Value: default Key: members Value: @ Key: url Value: #/path/to/submit Key: code Value: ``` -------------------------------- ### Example HTTP Response Headers for IFRAME Embedding Source: https://octoproctor.com/resources/documentation/use-case-without-integration These headers are required to allow a third-party assessment page to open correctly within an IFRAME on the proctoring system's page, and to enable cookie usage across domains. Ensure your assessment pages support HTTPS with a valid SSL certificate. ```HTTP Set-Cookie: =; SameSite=None; Secure Content-Security-Policy: frame-src https://*.proctoring.app ``` -------------------------------- ### Open edX Proctoring Host Configuration Source: https://octoproctor.com/resources/documentation/integration-with-open-edx This JSON configuration is used to connect the integration API with Open edX. It defines webhook strategies for LTI integration, including profile mapping, registration parameters, and scoring logic for starting, stopping, pausing, and submitting proctoring sessions. Ensure 'consumerKey' and 'consumerSecret' are replaced with randomly generated strings. ```json { "id": "", "key": "", "params": { "webhooks": { "edx": { "strategy": "lti", "consumerKey": "demo", "consumerSecret": "secret", "callbackURL": "query.redirect", "profile": { "username": "payload.user_id", "role": "payload.roles.find(v=>/Instructor/.test(v))?'proctor':'student'", "nickname": "payload.lis_person_name_full", "lang": "(payload.launch_presentation_locale||'').slice(0,2)", "group": "['G',payload.context_id,payload.resource_link_id].join('-')", "referrer": "payload.launch_presentation_return_url", "labels": "payload.lis_person_contact_email_primary" }, "register": { "identifier": "[payload.user_id,payload.context_id,payload.resource_link_id].join('-').replace(/[^A-Za-z0-9_-]+/g,'_')", "template": "payload.custom_template||'default'", "subject": "payload.resource_link_title", "members": "payload.custom_members==='@'?user.group:payload.custom_members", "url": "payload.custom_url||payload.launch_presentation_return_url", "tags": "payload.lis_person_contact_email_primary" }, "start": { "score": "1" }, "stop": { "score": "0" }, "pause": { "score": "0" }, "submit": { "score": "room.conclusion?(room.conclusion==='positive'?0.999:0):Math.min((room.score||0)/100, 0.999)" } } } } } ```