Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 2. Masking sensitive data in workflow logs


serverless logic includes a built-in log filter that masks sensitive data in workflow runtime logs. When request and response logging is enabled, HTTP headers such as Authorization: Bearer <token> can appear in plain text. You can enable and configure the sensitive data filter to prevent credentials and tokens from being written to log output.

2.1. Configuring sensitive data masking in workflow logs

You can configure serverless logic to automatically mask sensitive data in workflow runtime logs. The built-in sensitive data filter uses regular expressions to replace matching strings with a configurable mask before they appear in log output.

Prerequisites

  • You have a workflow application project.
  • You have access to the application.properties file for your workflow.

Procedure

  1. Enable the sensitive data filter for each log handler in application.properties:

    quarkus.log.console.filter=sensitive-data-filter

    To apply the filter to a file log handler, set quarkus.log.file.filter=sensitive-data-filter instead, or set it in addition to the existing handler filter.

    Note

    When enabled without custom patterns, the filter masks the following data by default:

    • Authorization and X-Authorization header values, including Bearer tokens
    • JSON Web Tokens (JWTs) in the format eyJ…​
    • GitHub tokens with gho_ or ghs_ prefixes
  2. Optional: To mask additional data patterns, specify one or more regular expressions in application.properties:

    org.sonataflow.logger.sensitive-data-filter.patterns=<pattern>

    where:

    <pattern>

    Specifies a comma-separated list of regular expressions. Alternatively, use Quarkus indexed property syntax to define patterns individually:

    org.sonataflow.logger.sensitive-data-filter.patterns[0]=<pattern_1>
    org.sonataflow.logger.sensitive-data-filter.patterns[1]=<pattern_2>
    Important

    When you set custom patterns, the filter no longer applies the default token-masking patterns. If you still need to mask authorization headers and JWTs, include those patterns explicitly alongside your custom ones.

  3. Optional: To customize the mask string, set the following property:

    org.sonataflow.logger.sensitive-data-filter.mask=<mask>

    where:

    <mask>
    Specifies the replacement string written to the log in place of any matched value. If not set, the filter uses MASKED as the default mask.

Verification

Run oc logs <workflow_pod_name> and inspect the output after a workflow execution. Strings matching the active patterns appear as the configured mask string instead of the original value.

Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat Dokumentation

Legal Notice

Theme

© 2026 Red Hat
Nach oben