Skip to content

Config-api logs:#

Two types of logs generated by config-api, application logs and audit log. - Application log contains application functionality logs - Audit log contains information of each request received.

Logging configuration#

Log configuration is stored in DB along with the config-application other configuration

javascript { "configOauthEnabled": true, "apiApprovedIssuer": ["https://jans.server2"], "apiProtectionType": "oauth2", "apiClientId": "1800.c9c0b756-a1fc-4013-9feb-64d531ac2dc1", "apiClientPassword": "X9q7cAemqyD9LaS1c5YzIA==", "endpointInjectionEnabled": false, "authIssuerUrl": "https://jans.server2", "authOpenidConfigurationUrl": "https://jans.server2/.well-known/openid-configuration", "authOpenidIntrospectionUrl": "https://jans.server2/jans-auth/restv1/introspection", "authOpenidTokenUrl": "https://jans.server2/jans-auth/restv1/token", "authOpenidRevokeUrl": "https://jans.server2/jans-auth/restv1/revoke", "smallryeHealthRootPath": "/health-check", "disableJdkLogger":true, "loggingLevel":"INFO", "loggingLayout":"text", "externalLoggerConfiguration":"", "exclusiveAuthScopes": [ "jans_stat", "", "" ], "corsConfigurationFilters": [ { "filterName": "CorsFilter", "corsAllowedOrigins": "*", "corsAllowedMethods": "GET,PUT,POST,DELETE,PATCH,HEAD,OPTIONS", "corsAllowedHeaders": "", "corsExposedHeaders": "", "corsSupportCredentials": true, "corsLoggingEnabled": false, "corsPreflightMaxAge": 1800, "corsRequestDecorate": true, "corsEnabled": true } ], "userExclusionAttributes": [ "userPassword" ], "userMandatoryAttributes": [ "mail", "displayName", "jansStatus", "userPassword", "givenName" ], "agamaConfiguration": { "mandatoryAttributes": [ "qname", "source" ], "optionalAttributes": [ "serialVersionUID", "enabled" ] }, "auditLogConf": { "enabled": true, "ignoreHttpMethod": [], "headerAttributes": [ "User-inum" ] }, "dataFormatConversionConf": { "enabled": true, "ignoreHttpMethod": [ "" ] }, "plugins": [ { "name": "admin", "description": "admin-ui plugin", "className": "" }, { "name": "fido2", "description": "fido2 plugin", "className": "" }, { "name": "scim", "description": "scim plugin", "className": "" }, { "name": "user-management", "description": "user-management plugin", "className": "" } ] }

Audit log#


auditLogConf": {
    "enabled": true,
    "ignoreHttpMethod": [],
    "headerAttributes": [
Field Description Example
enabled Flag to enable and disable audit log true , default value is true, to enable audit logging
ignoreHttpMethod HTTP methods for which audit is disabled,,, etc
headerAttributes List of HTTP header attributes whose value is to be logged User-inum

File name and location on server#

  • Log name: configapi-audit.log
  • Log location: /opt/jans/jetty/jans-config-api/logs

Application Logs#

Config-api uses log4j to generate application execution logs for each endpoint invocation. These can be used to debug the application.


  • DB:

    ``javascript ... "loggingLevel":"DEBUG", "loggingLayout":"text" ...

  • log4j file:

DB configuration#

  1. Fetch configuration

     curl -k -i -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization:Bearer 3114e010-fd4d-4e62-b5e2-a51b7d6dd231" -X GET https://jans.server/jans-config-api/api/v1/api-config
  2. Patch configuration

     curl -X PATCH -k -H 'Content-Type: application/json-patch+json' -H 'Authorization:Bearer 3114e010-fd4d-4e62-b5e2-a51b7d6dd231' -i 'https://jans.server/jans-config-api/api/v1/api-config' --data '[{"op": "replace", "path": "/loggingLevel", "value":"ERROR"}, {"op": "replace", "path": "/loggingLayout", "value":"json"}, {"op": "replace", "path": "/auditLogConf/enabled", "value":false} , {"op": "replace", "path": "/auditLogConf/headerAttributes", "value":["User-inum","city"]}]'

Last update: 2023-01-20
Created: 2022-07-21