diff --git a/install_docker.ps1 b/install_docker.ps1 index 1c708698..e873d928 100644 --- a/install_docker.ps1 +++ b/install_docker.ps1 @@ -315,8 +315,9 @@ function Try-Extract-Config { function Update-AuthBypassOrPassword { Write-Host ""; Write-Info "Setting up authentication for your Morphik deployment:" - Write-Info " • For external access, set a LOCAL_URI_PASSWORD." + Write-Info " • Set a LOCAL_URI_PASSWORD when you want to protect local connection URI generation." Write-Info " • For local-only access, press Enter to enable bypass_auth_mode." + Write-Info " • With a LOCAL_URI_PASSWORD set, use POST /local/generate_uri with password_token in the form body to create an authorized local connection URI." $password = Read-Host "Enter a secure LOCAL_URI_PASSWORD (or press Enter to skip)" if ([string]::IsNullOrWhiteSpace($password)) { Write-Info "No password provided - enabling authentication bypass (bypass_auth_mode=true)." @@ -324,7 +325,9 @@ function Update-AuthBypassOrPassword { $content = $content -replace '(?m)^bypass_auth_mode\s*=\s*false', 'bypass_auth_mode = true' Set-Content morphik.toml -Value $content } else { - Write-Ok "LOCAL_URI_PASSWORD set - keeping production mode (bypass_auth_mode=false)." + Write-Ok "LOCAL_URI_PASSWORD set - keeping authenticated mode (bypass_auth_mode=false)." + Write-Info "Use POST /local/generate_uri with password_token in the form body to create authorized local connection URIs." + Write-Info "Treat generated local connection URIs as bearer credentials." (Get-Content .env -Raw) -replace 'LOCAL_URI_PASSWORD=', "LOCAL_URI_PASSWORD=$password" | Set-Content .env } diff --git a/install_docker.sh b/install_docker.sh index bdad5ab0..5efa9b3f 100755 --- a/install_docker.sh +++ b/install_docker.sh @@ -330,9 +330,9 @@ fi # 5.0.5 Now that morphik.toml exists, handle LOCAL_URI_PASSWORD configuration echo "" print_info "🔐 Setting up authentication for your Morphik deployment:" -print_info " • If you plan to access Morphik from outside this server, setting a LOCAL_URI_PASSWORD will secure your deployment" +print_info " • Set LOCAL_URI_PASSWORD when you want to protect local connection URI generation" print_info " • For local-only access, you can skip this step (bypass_auth_mode will be enabled)" -print_info " • With a LOCAL_URI_PASSWORD set, you'll need to use /generate_local_uri endpoint for authorization tokens" +print_info " • With a LOCAL_URI_PASSWORD set, use POST /local/generate_uri with password_token in the form body to create an authorized local connection URI" echo "" read -p "Please enter a secure LOCAL_URI_PASSWORD (or press Enter to skip for local-only access): " local_uri_password < /dev/tty if [[ -z "$local_uri_password" ]]; then @@ -346,8 +346,9 @@ if [[ -z "$local_uri_password" ]]; then print_warning "morphik.toml not found, cannot set bypass_auth_mode" fi else - print_success "LOCAL_URI_PASSWORD set - keeping production mode (bypass_auth_mode=false) with authentication enabled" - print_info "Use the /generate_local_uri endpoint with this password to create authorized connection URIs" + print_success "LOCAL_URI_PASSWORD set - keeping authenticated mode (bypass_auth_mode=false)" + print_info "Use POST /local/generate_uri with password_token in the form body to create authorized local connection URIs" + print_info "Treat generated local connection URIs as bearer credentials" fi # Only update .env if a password was provided