Advanced usage
Manually trigger retrievers and refresh the internal flag cache
By default, the retrievers are called regularly to refresh the configuration based on the polling interval.
But there are use cases where you want to refresh the configuration explicitly (for example, during the CI process after you have changed your configuration file).
To do so you can call the /admin/v1/retriever/refresh endpoint with a POST request. It will force the retrievers to be called and update the internal cache.
curl -X 'POST' \
'http://<your_domain>:1031/admin/v1/retriever/refresh' \
-H 'accept: application/json' \
-H 'X-API-Key: <your_admin_api_key>' \
-d ''NOTE
This endpoint must be called with an admin token. Authorized keys should be configured in the relay-proxy configuration file under the key authorizedKeys.admin.
# ...
authorizedKeys:
admin:
- "YOUR_API_KEY"Validate a flag file
Before deploying a flag file you can ask the relay proxy to validate it with a POST request to /admin/v1/flags/validate. The validation uses the same rules as the semaphore-cli lint command, and it has no side effect: the flags served by the relay proxy are never modified.
The body of the request is the flag file, and the Content-Type header selects its format: application/json, application/yaml (also application/x-yaml and text/yaml) or application/toml. The size of the body is limited per format: by default 1 MiB for JSON, 64 KiB for YAML and TOML. The limits are configurable with the endpoints.validateFlags options (maxJSONBodySize, maxYAMLBodySize and maxTOMLBodySize), as a number of bytes or a string like 1MiB. Raising the YAML and TOML limits makes the parsing more expensive (the cost grows quadratically with the size of the body). An empty body, null or {} is accepted and returns 200 with valid: true and no flag (an empty JSON body is a syntax error and returns 400).
curl -X 'POST' \
'http://<your_domain>:1031/admin/v1/flags/validate' \
-H 'Content-Type: application/yaml' \
-H 'X-API-Key: <your_admin_api_key>' \
--data-binary @flags.yaml{
"version": "v1.0.0",
"valid": false,
"errors": [{ "flag": "my-flag", "message": "missing default rule" }]
}| Status | Meaning |
|---|---|
200 | All the flags are valid. |
422 | At least one flag is invalid, see errors (sorted by flag). |
400 | The body can't be parsed. |
413 | The body is larger than the limit of its format. |
415 | The Content-Type header is missing or unsupported. |
The validation behaves like the semaphore-cli lint command, so it has the same known gaps:
- The steps of a
scheduledRolloutare not validated. - Unknown or misspelled fields are ignored.
- A file that can be read but has wrongly typed fields returns
400with a parse error, not422.
As for the other admin endpoints, an admin token is required.
FIPS 140-3 mode
The relay proxy can be built in a FIPS 140-3 mode so it can be deployed inside FedRAMP-authorized boundaries that require FIPS 140 validated cryptography (controls SC-13 / SC-8).
The FIPS builds are produced with Go's native FIPS mode (GOFIPS140, available since Go 1.24) backed by the Go Cryptographic Module, which goes through the CMVP validation process. Building with GOFIPS140=v1.0.0 bakes a default GODEBUG=fips140=on into the binary, so the FIPS build runs in FIPS mode out of the box — no extra runtime configuration is required.
The exact module version pinned by the project lives in the .fips-version file at the repo root; the Makefile target reads from it.
NOTE
ScopeInbound TLS is out of scope. The relay proxy serves plain HTTP and expects TLS to be terminated at the ingress / service mesh, so north-south FIPS-validated TLS is handled by your authorized infrastructure.
The FIPS build matters for the proxy's outbound crypto: pulling flag configuration over HTTPS, webhook notifiers, and OTLP export.
Building from source
make build-relayproxy-fipsThis produces out/bin/semaphore-fips, built with GOFIPS140=v1.0.0.
Verifying FIPS mode
At build level — confirm the binary was compiled against the Go Cryptographic Module:
go version -m ./out/bin/semaphore-fips | grep GOFIPS140
# build GOFIPS140=v1.0.0-<commit>The Go toolchain appends the module's commit hash (e.g. v1.0.0-c2097c7c), so the presence of a GOFIPS140 build setting is what confirms the FIPS module was linked.
At runtime — on startup the relay proxy logs whether FIPS crypto is active:
{"level":"info","msg":"crypto mode","fips140":true}A standard (non-FIPS) build logs "fips140":false.
Strict enforcement (optional) — run with GODEBUG=fips140=only to make the process fail if any non-FIPS-approved cryptographic algorithm is used:
GODEBUG=fips140=only ./out/bin/semaphore-fips --config=/semaphore/config.yamlRecommended hardening for FedRAMP deployments
The FIPS build covers cryptography only. The released images already run as the non-root user 65532; in addition run the container with all capabilities dropped, no privilege escalation, the RuntimeDefault seccomp profile and, where your setup allows it, a read-only root filesystem. If you use the file exporter or persistentFlagConfigurationFile (both write files), keep the root filesystem read-only and mount a writable volume for those paths, owned by or writable for uid 65532. Combine this with your platform's pod security standards as appropriate.