curl --request GET \
--url http://localhost:4200/auth/statusimport requests
url = "http://localhost:4200/auth/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:4200/auth/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4200",
CURLOPT_URL => "http://localhost:4200/auth/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:4200/auth/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:4200/auth/status")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4200/auth/status")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyWhether a password is needed, and whether requests will be accepted at all
Public, because a client has to be able to ask before it holds a credential. The two fields are two questions, and they come apart in exactly one state: a closed mount has no password gate, so gateEnabled is false, and a client that reads that as “open” renders itself around a site whose every other route refuses it — with no password box and no way to reach one. mode names that state, and reason names the environment variable that ends it. Saying so costs nothing: in this state no credential exists, so there is no caller to withhold it from — only the operator looking at a 401 on their own deployment. mode and reason come from createOrchestrator(), whose gate covers every route; the standalone server gates only the agent surface and reports gateEnabled alone. Source: resolveAuth in packages/orchestrator-core/src/handler/auth.ts.
curl --request GET \
--url http://localhost:4200/auth/statusimport requests
url = "http://localhost:4200/auth/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:4200/auth/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4200",
CURLOPT_URL => "http://localhost:4200/auth/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:4200/auth/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:4200/auth/status")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4200/auth/status")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyResponse
{ gateEnabled, mode }, plus reason when mode is closed. gateEnabled is true only when ACCESS_PASSWORD_HASH is set: it answers one question — should the client show a password box? — and a host that brings its own auth hook has no password to collect. mode answers the other one — will my other requests be accepted? — and is one of hook (config.auth was supplied, so the host decides per request), token (ACCESS_PASSWORD_HASH and/or ORCHESTRATOR_ACCESS_TOKEN is configured, so the built-in token gate runs), open-dev (neither is configured and NODE_ENV is not production, so nothing is refused), or closed (production with neither configured, so every gated route answers 401). reason is the same sentence a closed mount's 401 carries.