Skip to content

NIFI-14413 - Add User Agent to NiFi User Model#9843

Closed
arturchyzy wants to merge 1 commit intoapache:mainfrom
arturchyzy:NIFI-14413
Closed

NIFI-14413 - Add User Agent to NiFi User Model#9843
arturchyzy wants to merge 1 commit intoapache:mainfrom
arturchyzy:NIFI-14413

Conversation

@arturchyzy
Copy link
Contributor

Summary

NIFI-14413

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 21

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the User Agent property @arturchyzy.

The general approach looks good, but I noticed a gap related to token authentication. I noticed the StandardJwtAuthenticationConverter also creates a NiFi User, but is not included in these updates. That converter does not have access to the request information, which highlights a potential design issue.

Spring Security has an AuthenticationDetailsSource, with implementations that return additional information about the request. The WebAuthenticationDetails is a useful implementation, which includes the Remote Address. Extending that approach seems like the right abstraction for adding the User Agent. That appears to require some other adjustments to the general implementation strategy, but I think that is what needs to happen.

@sfc-gh-achyzy
Copy link

@exceptionfactory I've pushed the changes using AuthenticationDetailsSource. I have to admit it was a bit challenging to track all the authentication types but I think I was able to support all of them.

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the adjustments to use the Authentication Details @arturchyzy, the latest version looks good! +1 merging

TomaszK-stack pushed a commit to TomaszK-stack/nifi that referenced this pull request May 5, 2025
This closes apache#9843

Signed-off-by: David Handermann <exceptionfactory@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants