Skip to content

NIFI-8025 - Refactored AccessResource SAML and OIDC endpoints into separate classes#5079

Closed
thenatog wants to merge 3 commits intoapache:mainfrom
thenatog:NIFI-8025-rebased
Closed

NIFI-8025 - Refactored AccessResource SAML and OIDC endpoints into separate classes#5079
thenatog wants to merge 3 commits intoapache:mainfrom
thenatog:NIFI-8025-rebased

Conversation

@thenatog
Copy link
Contributor

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 squash or use --force when pushing to allow for clean monitoring of changes.

For code changes:

  • Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
  • Have you written or updated unit tests to verify your changes?
  • Have you verified that the full build is successful on JDK 8?
  • Have you verified that the full build is successful on JDK 11?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
  • If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
  • If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

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.

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.
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 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.

@thenatog
Copy link
Contributor Author

thenatog commented Jun 4, 2021

Updated PR to address latest feedback.

httpPost.setEntity(new UrlEncodedFormEntity(params));

try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
httpClient.close();
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tried to commit this change but somehow 'Merge branch 'main' into NIFI-8025-rebased' happened. Will fix.

@thenatog thenatog force-pushed the NIFI-8025-rebased branch from 3962a51 to 3d3dd44 Compare June 21, 2021 15:30
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 working through the changes @thenatog! Verified SAML and OIDC with Keycloak, looks good! +1 Merging.

@asfgit asfgit closed this in 9744644 Jun 21, 2021
timeabarna pushed a commit to timeabarna/nifi that referenced this pull request Jul 6, 2021
This closes apache#5079

Signed-off-by: David Handermann <exceptionfactory@apache.org>
timeabarna pushed a commit to timeabarna/nifi that referenced this pull request Jul 21, 2021
This closes apache#5079

Signed-off-by: David Handermann <exceptionfactory@apache.org>
krisztina-zsihovszki pushed a commit to krisztina-zsihovszki/nifi that referenced this pull request Jun 28, 2022
This closes apache#5079

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.

2 participants