Skip to content

Config check reference

Every problem that nocleye check can report, with what to do about it. Errors stop the gateway from starting and make nocleye check exit with a failure. Warnings don’t, but point to something you probably want to fix.

Message Fix
Config file is empty Add your configuration, starting with ApiVersion.
Invalid YAML syntax Check indentation (spaces only, no tabs), colons and quotes around the reported line.
Unknown key “…” Check the spelling, keys are case sensitive, or remove it.
Wrong kind of value The key expects a different kind of value, e.g. a list or a number. The message says which.
Unsupported ApiVersion Set ApiVersion to v1Beta.
No servers defined Add at least one server under ServerConfigs.
No routes defined Add at least one route under ServerRoutes.
Message Fix
Server without a URL Set the URL the gateway should forward requests to, e.g. http://localhost:9090.
Server with an invalid URL Use a full URL including the scheme, e.g. http://localhost:9090.
Server TLS CA certificate can’t be used Check that TLS.CACertFile names a readable PEM certificate file inside /etc/nocleye-beta/gateway/certs/ (other locations are rejected).
Route without a match Set MatchOptions.PathPattern (e.g. /api/users) and/or MatchOptions.Header.
Route with a blank PathPattern Set MatchOptions.PathPattern to a path like /api/users, or remove it.
Route header match is incomplete MatchOptions.Header needs both a Name and a Value.
Route header match has an invalid Name Use a valid header name without underscores, e.g. X-Version. Host can’t be matched.
Route header match has an unknown Mode Use Exact (default), Prefix or Suffix.
Two routes use the same header match Routes can share a header Name, but each needs a different Value or Mode.
Header match Priority is out of range Priority must be a number from 1 to 255. 1 is the highest priority and 255 the lowest.
Two header matches use the same Priority Every header match needs its own Priority. Omitting it means 255, so only one route can leave it out.
RemoveHeader without a header match Set MatchOptions.Header or remove RemoveHeader.
RemovePathPattern without a PathPattern Set MatchOptions.PathPattern or remove RemovePathPattern.
AddPathPrefix has an invalid format Start it with / and don’t end it with /, e.g. /v1.
AddHeader is incomplete or invalid Set both Header and Value (no line breaks or control characters), or remove it.
AddHeader has an invalid header name Header names can’t be empty or contain underscores or other invalid characters.
AddHeader uses a header the gateway or HTTP manages X-Nocleye-*, identity headers, hop-by-hop and framing headers, X-Forwarded-* and trace headers can’t be set. Pick another name.
Server has an invalid HTTP, GRPC or WebSocket block The details name the field: a duration that doesn’t parse or isn’t above zero where it must be (DialTimeout, TLSHandshakeTimeout, IdleConnTimeout; "0s" is only allowed for IdleTimeout, MaxLifetime and ResponseHeaderTimeout), a negative number, a MaxLifetime below a written IdleTimeout, a bad MaxRequestBodySize, or an AllowedOrigins entry that isn’t scheme://host[:port]. A server may carry several blocks.
Header rule on a gRPC route removes or sets Te or Grpc-* Remove the entry: gRPC needs those headers.
Header rule on a WebSocket route removes or sets Upgrade, Connection or Sec-WebSocket-* Remove the entry: the handshake needs those headers.
Route targets a server that doesn’t exist Set TargetServer to a name defined under ServerConfigs.
Two routes use the same PathPattern Give each route its own PathPattern, or remove the duplicate.
Message Fix
Invalid header collection mode Set the header rule Mode to All or Custom.
Invalid header name in a header rule Header names can’t be empty or contain underscores or other invalid characters, e.g. X-Trace-Id.
Reserved header used in a header rule That header is managed by the gateway, pick another name.
Set uses a header produced by the gateway X-Nocleye-* headers carry the real request and user identity and can’t be overwritten. Pick another name.
Set uses a header managed by HTTP or the proxy Connection, Content-Length, Host, Transfer-Encoding, X-Forwarded-*, trace headers and similar can’t be set. Pick another name.
Set value has control characters Header values can’t contain line breaks or other control characters.
Server / Route / GlobalConfig uses a header rule that doesn’t exist Define the rule under Rules > HeaderRules, or fix the name.
Message Fix
Invalid access log rule The details name the value: SampleRate must be in (0, 1], status codes 100 to 599, MinStatus 0 to 599, MinLatencyMs not negative, GrpcStatuses 0 to 16, CloseReasons one of completed, client_closed, upstream_closed, idle_timeout, max_lifetime, shutdown, config_retired.
Message Fix
Unknown client id collection mode Use one of the modes listed in client ID rules.
Client id rule without modes Add at least one mode under Modes, e.g. IP.
Custom header rule without a value Set HeaderCustomValue, or change the mode.
Custom query string rule without a value Set QueryStringCustomValue, or change the mode.
Server / Route / GlobalConfig uses a client id rule that doesn’t exist Define the rule under Rules > ClientIDRules, or fix the name.
Message Fix
Usage control rule with an invalid request count RequestCount must be greater than zero.
Usage control rule with an invalid burst value BurstValue must be between 1 and RequestCount.
Unrecognised time window format Use a number followed by a unit: m (minutes), h (hours), w (weeks) or Mo (months), e.g. 1m, 5h, 1w, 1Mo.
Invalid time window Use a positive number followed by a unit, e.g. 1m, 5h, 1w, 1Mo.
Server / Route / GlobalConfig uses a usage control rule that doesn’t exist Define the rule under Rules > UsageControlRules, or fix the name.
Usage control rule with an unknown State Use InMemory (default) or Database.
Usage control rule on a database without TargetDatabase Set TargetDatabase to a key of ExternalDependencies, or use State: InMemory.
Usage control rule has TargetDatabase but is in memory Remove TargetDatabase or set State: Database.
Usage control rule points to a database that doesn’t exist Define it under ExternalDependencies, or fix TargetDatabase.
Usage control rule points to a dependency that is not a Redis-like database The dependency needs Type: Database and SubType: RedisLike.
External dependency with an unknown Type / SubType Use Type: Database and SubType: RedisLike.
External dependency without addresses List at least one host:port under Addresses.
External dependency with an invalid FailMode Use open or closed. Omitting it means closed.
External dependency with a negative TimeoutMs Use a positive number of milliseconds, or omit it.
External dependency credentials written inline Auth.Username and Auth.Password must be env:NAME or file:name references.
External dependency with a username but no password Set Auth.Password, or drop Auth.Username.
External dependency with half a client certificate Set both TLS.ClientCertFile and TLS.ClientKeyFile for mTLS, or neither.
Route has usage control but no way to identify callers Add an auth method or a client ID rule that applies to the route (on the route, its server or GlobalConfig), see client ID rules.
Server usage control can’t run on some routes Same fix, for the routes listed (routes with UsageControlMode: Strict are not counted).
Global usage control can’t run on some routes Same fix, for the server/route pairs listed.
Message Fix
Unknown auth method mode Mode must be Bearer, RawHeader, JWE, OAuth2 or OAuth2Introspection.
Unsupported signing method SigningMethod must be one of HS256/384/512, RS256/384/512, PS256/384/512, ES256/384/512 or EdDSA.
Auth method without a KeyRef Set KeyRef to the key the gateway should use to verify tokens.
Auth method without a HeaderName RawHeader and JWE modes read the token from a header, set HeaderName.
OAuth2 auth method without a JWKSUri it can find Set JWKSUri to the https URL where your identity provider publishes its public keys, or leave it out and set Issuer to an https URL so the gateway can use discovery.
OAuth2 auth method with an invalid JWKSUri Use a full https URL, e.g. https://idp.example.com/.well-known/jwks.json. Plain http is not accepted.
OAuth2 auth method without Algorithms List the token algorithms you accept, e.g. [RS256].
OAuth2 auth method with an invalid algorithm Use asymmetric algorithms only: RS256/384/512, PS256/384/512, ES256/384/512 or EdDSA.
OAuth2 auth method without an Issuer / Audience Set the values your tokens carry in the iss and aud claims.
Invalid RequiredClaims in an OAuth2 auth method Give every RequiredClaims entry a claim name.
Invalid ForwardClaims in an auth method Map each claim name to a header suffix made of letters, digits and -. Two claims cannot share a suffix.
Invalid JWE auth method settings A JWE method needs KeyRef, HeaderName, a KeyManagementAlg (RSA-OAEP-256, ECDH-ES, ECDH-ES+A256KW, A256KW or dir) and a ContentEncryptionAlg (A128GCM, A256GCM, A128CBC-HS256 or A256CBC-HS512). NestedSigningMethod and NestedKeyRef go together.
Invalid Decryption block in an OAuth2 auth method Set KeyRef and list the accepted KeyManagementAlgs and ContentEncryptionAlgs. All KeyManagementAlgs must use the same kind of key (RSA, EC or symmetric).
Invalid introspection settings in an OAuth2Introspection auth method Set IntrospectionUri (https), ClientId and ClientSecretRef (env:NAME or file:name, never the secret itself). IntrospectionAuthStyle is basic (default), post or bearer.
Invalid RequiredScopes entry List scopes one per entry, without spaces (e.g. orders:write). RequiredScopes goes on GlobalConfig, a server or a route.
Unknown ScopesMode Use Additive (default) or Override.
RequiredScopes on a route that has no auth method Scopes are read from the caller’s token, so an auth method must apply to the route (on the route, its server or GlobalConfig).
Invalid duration in an auth method Use a positive duration such as 30s, 5m or 1h.
The JWKS URL did not return usable keys The details say why: unreachable, not HTTP 200, not a JWKS document, or no signing keys. Open the URL and check it. Skipped with nocleye check --offline.
Server / Route / GlobalConfig uses an auth method that doesn’t exist Define it under AuthMethods, or fix the name.
Message Fix
Support port collides with the gateway port Set --sPort (or SUPPORT_PORT) to a port different from --gPort.
Unknown or repeated Prometheus metrics group Use core, all, or a list of metric groups from Logs and metrics. A preset can’t be combined with other names.
Message Meaning
No config file was given Pass --gConfigPath <file name> (a file inside /etc/nocleye-beta/gateway/) or set GATEWAY_CONFIG_PATH. The check can’t run.
The config file doesn’t exist, can’t be read, or is a directory Fix the name: it must be a file inside /etc/nocleye-beta/gateway/, absolute paths are rejected. The check can’t run.
Message What it means and what to do
External dependency is not used No rule points to it. Remove it or reference it from a rule’s TargetDatabase.
External dependency fails open While it is down, limits using it stop being enforced. Use FailMode: closed if limits must always hold.
External dependency certificate verification is disabled InsecureSkipVerify leaves the connection open to impersonation. Prefer TLS.CACertFile.
External dependency sends a password without TLS The password crosses the network in clear text. Add a TLS block.
No usage control rules defined Clients won’t be limited at all. Add a rule under Rules > UsageControlRules if you want limits.
No auth method defined Every route is publicly accessible. Add an entry under AuthMethods if you need protection.
Requests without a credential are let through as anonymous The auth method has AllowAnonymous. Those requests are rate limited by client IP and reach the backend with X-Nocleye-Authenticated: false. Remove AllowAnonymous to reject them.
A route requires scopes but its auth method allows anonymous callers Anonymous callers hold no scopes and always get 403. Drop AllowAnonymous or the RequiredScopes.
OAuth2 auth method accepts any token type No RequiredTokenType or RequiredClaims is set and no route using the method requires scopes, so any token from the provider with the right iss and aud passes, including ID tokens. Set RequiredTokenType (e.g. at+jwt) or RequiredScopes on the routes.
JWE auth method has no inner signature Without NestedSigningMethod, anyone who knows the public encryption key can build a token the gateway accepts. Have the issuer sign the claims before encrypting and set NestedSigningMethod and NestedKeyRef.
ScopesMode: Override drops inherited scopes This server or route has no RequiredScopes of its own, so Override leaves it with none even though a level above requires some. Add its scopes or use Additive.
Route removes a credential header RemoveHeader on Authorization or Cookie means the upstream won’t receive the credentials. Make sure that is intended.
AddHeader sets the header the route matched on The upstream will see the AddHeader value instead of the client’s. Make sure that is intended.
Server is unreachable No route targets this server. Add a route for it or remove the server.
Route to a gRPC server rewrites the path RemovePathPattern or AddPathPrefix changes the RPC name (/pkg.Service/Method) the backend sees. Only keep it if the backend is mounted under a prefix.
WebSocket server without AllowedOrigins forwards cookies Browsers can be driven cross-site (Cross-Site WebSocket Hijacking). Set AllowedOrigins on the server.
HTTP and GRPC on an http:// URL The backend must answer HTTP/1.1 and h2c on the same port. Not shown for https:// or when there is no explicit HTTP block.
Server TLS settings are ignored The URL doesn’t use https, so the TLS block has no effect. Switch to https or remove the block.
Server certificate verification is disabled InsecureSkipVerify makes the connection open to impersonation. Prefer TLS.CACertFile.
No client id rules defined Callers of routes without an auth method are not identified, so usage control can’t limit them. Add a rule under Rules > ClientIDRules and bind it with ClientIDRule.
No header rules defined All headers from the request are forwarded. Add a rule under Rules > HeaderRules to restrict them.
Support server is not loopback and has no token The live config API is open to the network. Set --sToken (or SUPPORT_TOKEN).