management:
host: 127.0.0.1Management
The Management service is always there, regardless of the mode of operation Heimdall is started in. By default, Heimdall listens on 0.0.0.0:4457 endpoint for incoming requests in this mode of operation and also configures useful default timeouts. No other options are configured. You can however adjust the configuration for your needs.
This service exposes the health and the JWKS endpoints.
Configuration
The configuration for of the Management endpoint can be adjusted in the management property, which lives in the serve property of heimdall’s configuration and supports the following properties.
host: string (optional)By making use of this property, you can specify the TCP/IP address on which heimdall should listen for connections from client applications. The entry
0.0.0.0allows listening for all IPv4 addresses.0.0.0.0is also the default setting.Example 1. Configure heimdall to allow only local TCP/IP “loopback” connections to be made.port: integer (optional)By making use of this property, you can specify the TCP port the heimdall should listen on. Defaults to
4457.Example 2. Configure heimdall to listen on port4444for incoming requests.management: port: 4444verbose_errors: boolean (optional)By making use of this property you can instruct Heimdall to preserve error information and provide it in the response body to the caller. Defaults to
false.Heimdall supports MIME type negotiation. So, if the client sets the HTTP
Acceptheader to e.g.application/json, and Heimdall run into an unhandled internal error condition, in addition to responding with500 Internal Server Error, it will render an error message, like shown below, ifverbose_errorshas been set totrue.{ "code": "internalServerError", "message": "whatever led to the error" }The
messagewill however contain just high-level information, like "failed to parse something", but will not contain any stack traces.Example 3. Configure verbose errorsmanagement: verbose_errors: truetimeout: Timeout (optional)Like written in the introduction of this section, Heimdall configures useful timeout defaults. You can however override this by making use of the
timeoutoption and specifying the timeouts, you need.Example 4. Setting the read timeout to 1 second, write timeout to 2 seconds and the idle timeout to 1 minute.management: timeout: read: 1s write: 2s idle: 1mcors: CORS (optional)CORS (Cross-Origin Resource Sharing) headers can be added and configured by making use of this option. This functionality allows for advanced security features to quickly be set.
Example 5. Possible CORS configurationmanagement: cors: allowed_origins: - example.org allowed_methods: - HEAD - PATCH allow_credentials: true max_age: 10stls: TLS (optional)By default, the Management endpoint accepts HTTP requests. Depending on your deployment scenario, you could require Heimdall to accept HTTPS requests only. You can do so by making use of this option.
Example 6. TLS configurationmanagement: tls: key: /path/to/private_key.pem cert: /path/to/certificate.pem
Last updated on Jul 26, 2022