NIFI-8025 - Refactored AccessResource SAML and OIDC endpoints into separate classes#5079
NIFI-8025 - Refactored AccessResource SAML and OIDC endpoints into separate classes#5079thenatog wants to merge 3 commits intoapache:mainfrom
Conversation
NIFI-8025 - Moved SAML to separate class and tested to be working. NIFI-8025 - Added license to new files. NIFI-8025 - Fixed a SAML logout consumer path.
...fi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/AccessResource.java
Outdated
Show resolved
Hide resolved
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for refactoring the SAML and OIDC resources @thenatog, this should make it easier to maintain these features down the road. There may be some additional opportunities for improvement, and I realize most of this is just reorganizing things. There may be an opportunity to reduce some code duplication when checking for request security and method enabled status, but otherwise this seems straightforward.
...ramework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/OIDCAccessResource.java
Outdated
Show resolved
Hide resolved
...ramework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SAMLAccessResource.java
Outdated
Show resolved
Hide resolved
...-security/src/main/java/org/apache/nifi/web/security/saml/impl/StandardSAMLStateManager.java
Show resolved
Hide resolved
…o the AccessResource class.
|
Updated PR to address latest feedback. |
| httpPost.setEntity(new UrlEncodedFormEntity(params)); | ||
|
|
||
| try (CloseableHttpResponse response = httpClient.execute(httpPost)) { | ||
| httpClient.close(); |
There was a problem hiding this comment.
This line will close the httpClient, but now that it is a class member variable, it should not be closed in this method. Creating a new method annotated with @PreDestroy is one option for closing the HttpClient instance prior to application shutdown.
There was a problem hiding this comment.
Tried to commit this change but somehow 'Merge branch 'main' into NIFI-8025-rebased' happened. Will fix.
3962a51 to
3d3dd44
Compare
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for working through the changes @thenatog! Verified SAML and OIDC with Keycloak, looks good! +1 Merging.
This closes apache#5079 Signed-off-by: David Handermann <exceptionfactory@apache.org>
This closes apache#5079 Signed-off-by: David Handermann <exceptionfactory@apache.org>
This closes apache#5079 Signed-off-by: David Handermann <exceptionfactory@apache.org>
NIFI-8025 - Moved SAML to separate class and tested to be working.
NIFI-8025 - Added license to new files.
NIFI-8025 - Fixed a SAML logout consumer path.
Thank you for submitting a contribution to Apache NiFi.
Please provide a short description of the PR here:
Description of PR
Enables X functionality; fixes bug NIFI-YYYY.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically
main)?Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not
squashor use--forcewhen pushing to allow for clean monitoring of changes.For code changes:
mvn -Pcontrib-check clean installat the rootnififolder?LICENSEfile, including the mainLICENSEfile undernifi-assembly?NOTICEfile, including the mainNOTICEfile found undernifi-assembly?.displayNamein addition to .name (programmatic access) for each of the new properties?For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible.