You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/06/22 13:05:50 UTC

[GitHub] [nifi] exceptionfactory opened a new pull request, #6145: NIFI-9849 Refactor SAML Support with Spring Security 5

exceptionfactory opened a new pull request, #6145:
URL: https://github.com/apache/nifi/pull/6145

   # Summary
   
   [NIFI-9849](https://issues.apache.org/jira/browse/NIFI-9849) Refactors SAML 2.0 authentication support using Spring Security 5 libraries.
   
   The `spring-security-saml2-core` library reached [end of life in October 2021](https://spring.io/blog/2020/09/22/spring-security-saml-extensions-1-x-eol-on-october-6-2021). Spring Security 5 introduced direct support for SAML 2.0 integration through the `spring-security-saml2-service-provider` library.
   
   The refactored implementation replaces custom REST resources with Spring Security Filters and related components. The new `Saml2AccessResource` class has a single method for returning a Bearer Token previously set as cookie following successful SAML 2.0 authentication. The updated approach maintains support for existing SAML resource paths, and the Administrator's Guide includes an additional section for supported resources.
   
   The new implementation retains support for existing SAML application properties, with the exception of the following removed properties:
   
   1. `nifi.security.user.saml.message.logging.enabled`
   2. `nifi.security.user.saml.metadata.signing.enabled`
   3. `nifi.security.user.saml.signature.digest.algorithm`
   
   The `message.logging.enabled` property is no longer applicable to the refactored implementation, and standard logger configuration applies to various Spring Security components.
   
   The `metadata.signing.enabled` and `signature.digest.algorithm` properties applied signing SAML metadata and do not have analogous options in Spring Security 5.
   
   The Spring Security 5 library supports both OpenSAML 3 and OpenSAML 4, however, OpenSAML 4 requires Java 11. Spring Security has marked OpenSAML 3 components as deprecated, and these implementations will need to be replaced with OpenSAML 4 components when Apache NiFi removes support for Java 8.
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [X] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
   
   ### Pull Request Tracking
   
   - [X] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
   - [X] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
   
   ### Pull Request Formatting
   
   - [X] Pull Request based on current revision of the `main` branch
   - [X] 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
   
   - [X] Build completed using `mvn clean install -P contrib-check`
     - [X] JDK 8
     - [X] JDK 11
     - [X] JDK 17
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
   
   ### Documentation
   
   - [X] Documentation formatting appears as expected in rendered files
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] thenatog commented on pull request #6145: NIFI-9849 Refactor SAML Support with Spring Security 5

Posted by GitBox <gi...@apache.org>.
thenatog commented on PR #6145:
URL: https://github.com/apache/nifi/pull/6145#issuecomment-1169042816

   +1 will merge


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] thenatog closed pull request #6145: NIFI-9849 Refactor SAML Support with Spring Security 5

Posted by GitBox <gi...@apache.org>.
thenatog closed pull request #6145: NIFI-9849 Refactor SAML Support with Spring Security 5
URL: https://github.com/apache/nifi/pull/6145


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] exceptionfactory commented on pull request #6145: NIFI-9849 Refactor SAML Support with Spring Security 5

Posted by GitBox <gi...@apache.org>.
exceptionfactory commented on PR #6145:
URL: https://github.com/apache/nifi/pull/6145#issuecomment-1166297846

   > One thing I'm noticing is that the logout button isn't appearing in the top right corner after login.
   
   Thanks for the feedback and highlighting the problem @thenatog. The `/access/saml/login/exchange` resource was conflicting with the SAML 2 filter responsible for consuming Asserting Party messages. As a result of the conflict, the web user interface did not retrieve the access token, which prevented the logout button from appearing.
   
   Returning the entire token to the user interface is no longer necessary for the SAML authentication process, so I pushed an update that replaces the exchange method with a simpler approach that returns the Access Token Expiration, which is what the user interface uses to determine the visibility of the logout button.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] thenatog commented on pull request #6145: NIFI-9849 Refactor SAML Support with Spring Security 5

Posted by GitBox <gi...@apache.org>.
thenatog commented on PR #6145:
URL: https://github.com/apache/nifi/pull/6145#issuecomment-1165897881

   One thing I'm noticing is that the logout button isn't appearing in the top right corner after login. I am able to log in so far though using a Google SAML provider.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] thenatog commented on pull request #6145: NIFI-9849 Refactor SAML Support with Spring Security 5

Posted by GitBox <gi...@apache.org>.
thenatog commented on PR #6145:
URL: https://github.com/apache/nifi/pull/6145#issuecomment-1167952401

   Confirmed that the logout button is now present, and I'm able to log in and out repeatedly without issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] thenatog commented on pull request #6145: NIFI-9849 Refactor SAML Support with Spring Security 5

Posted by GitBox <gi...@apache.org>.
thenatog commented on PR #6145:
URL: https://github.com/apache/nifi/pull/6145#issuecomment-1163316591

   Cool, will test this one out


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org