Skip to content

Allow disabling NiFi 2.x SNI checks #812

@Maleware

Description

@Maleware

Part of #809.

The SNI hostname checks appear to exist so that accidentally hitting the wrong node cannot happen.

We have opened an upstream issue and PR to allow to make this configurable:

The upstream PR has been rejected but we still believe it is the correct solution and does not have a noticeable impact on security. And it is opt-in so we'll allow disabling SNI.

Tasks:

Related material:


CRD Decision

As mentioned above, we want to be able to configure the SNI check being imposed by NiFi. Per default, it is enabled in NiFi (which is using the default Jetty configuration)

Proposal 1

clusterConfig:
  tls:
    sniRequired: false # default false
    sniHostCheck: true # default true

The first proposal is based on the patch we apply for NiFi. Naming of fields was taken from the Jetty configuration and it was sorted under tls, since SNI is a TLS extension. Default values are set to reflect the default NiFi/Jetty configuration of those values.

Proposal 2

clusterConfig:
  tls:
    sniHostCheck: true # default true

The second proposal was shortened to only include the sniHostCheck field but requires an adjustment to the above patch.
In the NiFi code a SecureRequestCustomizer is instantiated with its default values (false for sniRequired and true for sniHostCheck). In our patch we change the default behavior and set sniRequired to true, which we then need to be able to set to false again. If we would remove the code changing the sniRequired value to true, we could just make use of the default behavior and not having to disable it per config/CRD in the first place.

Proposal 3

No CRD change

As suggested by @NickLarsenNZ, disabling the SNI check might not be necessary in most cases if stackabletech/secret-operator#630 gets implemented. For the remaining unlikely possibility that the user still needs to disable the check, they can do so with configOverrides.

Metadata

Metadata

Assignees

Type

Projects

Status

Development: In Progress

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions