Log Management#
Logging for Janssen Server modules is managed at the individual module level. Meaning there is no single switch or configuration that will enable or disable logs for all modules. Each module can be individually configured and can be configured differently when it comes to logging.
Log Configuration For jans-auth#
Use the command line to perform actions from the terminal. Learn how to use Jans CLI here or jump straight to the Using Command Line
Use a fully functional text-based user interface from the terminal. Learn how to use Jans Text-based UI (TUI) here or jump straight to the Using-text-based-ui
Use REST API for programmatic access or invoke via tools like CURL or Postman. Learn how to use Janssen Server Config API here or Jump straight to the Using Configuration REST API
Using Command Line#
In the Janssen Server, you can deploy and customize the Logging Configuration
using the command line. To get the details of Janssen command line operations
relevant to Logging configuration, you can check the operations under
ConfigurationLogging
task using the
command below:
jans cli --info ConfigurationLogging
Operation ID: get-config-logging
Description: Returns Jans Authorization Server logging settings
Operation ID: put-config-logging
Description: Updates Jans Authorization Server logging settings
Schema: Logging
To get sample schema type jans cli --schema <schema>, for example jans cli --schema Logging
Find Logging Configuration#
jans cli --operation-id get-config-logging
Sample Output | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
Update Logging Configuration#
To update the configuration follow the steps below.
- Get the current logging configuration and store it in a file for editing.
The following command will retrieve the current logging configuration and
store it in a file.
Command
jans cli -no-color --operation-id get-config-logging > /tmp/log-config.json
- Update the configuration with desired value in the file while
keeping other properties and values unchanged. Updates must adhere to the
Logging
schema as mentioned here. The schema details can be retrieved using the command below. The schema defines what values and datatypes are acceptable for each property value.Commandjans cli --schema Logging
- Use the updated file to send the update to the Janssen Server using the
command below
CommandUpon successful execution of the update, the Janssen Server responds with updated configuration.
jans cli --operation-id put-config-logging --data /tmp/log-config.json
Using-text-based-ui#
Start TUI using the command below:
jans tui
Logging Configuration for Auth Server#
- Navigate to
Auth Server
->Logging
to open the Logging screen as shown in the image below to change the logging properties configuration.
Logging Configuration for FIDO#
- Navigate to
FIDO
to open the Logging screen as shown in the image below to change the logging properties configuration.
Logging Configuration for SCIM#
- Navigate to
SCIM
to open the Logging screen as shown in the image below to change the logging properties configuration.
Using Configuration REST API#
Janssen Server Configuration REST API exposes relevant endpoints for managing and configuring logging. Endpoint details are published in the Swagger document.
Default Log Location#
On a VM installation, logs for jans-auth
module are generated at
/opt/jans/jetty/jans-auth/logs/
. Similarly, logs for FIDO2 and SCIM modules
are generated under /opt/jans/jetty/jans-fido2/logs/
and
/opt/jans/jetty/jans-scim/logs/
respectively.
Cloud-Native Deployments#
Logging configuration for a cloud-native deployment is detailed here
Created: 2021-04-22