Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31612

Stack trace shown with suppress-stack-trace plugin installed

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major

      When submitting a form as an unprivileged user, Jenkins reports a permissions exception and also prints a stack trace. We have the suppress-stack-trace plugin installed and expect this stack trace not be printed.

        1. stacktrace.txt
          6 kB
          Josh Cook
        2. jenkins-23417594.png
          602 kB
          Josh Cook

          [JENKINS-31612] Stack trace shown with suppress-stack-trace plugin installed

          This plugin overwrites the method createFilter from SecurityRealm and I think it breaks the filter chain and it does not passes by ExceptionTranslationFilter and UnwrapSecurityExceptionFilter

          https://github.com/jenkinsci/reverse-proxy-auth-plugin/blob/master/src/main/java/org/jenkinsci/plugins/reverse_proxy_auth/ReverseProxySecurityRealm.java#L450-L556

          Ivan Fernandez Calvo added a comment - This plugin overwrites the method createFilter from SecurityRealm and I think it breaks the filter chain and it does not passes by ExceptionTranslationFilter and UnwrapSecurityExceptionFilter https://github.com/jenkinsci/reverse-proxy-auth-plugin/blob/master/src/main/java/org/jenkinsci/plugins/reverse_proxy_auth/ReverseProxySecurityRealm.java#L450-L556

          Andrew Bayer added a comment -

          Andrew Bayer added a comment - ifernandezcalvo So would we want something more like https://github.com/jenkinsci/cas-plugin/blob/master/src/main/java/org/jenkinsci/plugins/cas/CasSecurityRealm.java#L172-L176 , adding the new filter to the existing chain?

          Ivan Fernandez Calvo added a comment - - edited

          abayer Yes, it probably works if it is added the filters missing

          Ivan Fernandez Calvo added a comment - - edited abayer Yes, it probably works if it is added the filters missing

          abayer It works, I'm going to make a couple of test more and do the pull request

          Ivan Fernandez Calvo added a comment - abayer It works, I'm going to make a couple of test more and do the pull request

          Andrew Bayer added a comment -

          Great! Assigning to you. =)

          Andrew Bayer added a comment - Great! Assigning to you. =)

          Ivan Fernandez Calvo added a comment - - edited

          tested now all access denied exceptions are controlled.
          I made the PR with the fix.

          Ivan Fernandez Calvo added a comment - - edited tested now all access denied exceptions are controlled. I made the PR with the fix.

          Code changed in jenkins
          User: Ivan Fernandez Calvo
          Path:
          src/main/java/org/jenkinsci/plugins/reverse_proxy_auth/ReverseProxySecurityRealm.java
          http://jenkins-ci.org/commit/reverse-proxy-auth-plugin/dc7808b503d4ae2d2e7c74fa35df0821c1b794f0
          Log:
          JENKINS-31612 creates the default filter and adds the new filter to the chain, so maintains the correct filter chain and unwarps access denied exceptions

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ivan Fernandez Calvo Path: src/main/java/org/jenkinsci/plugins/reverse_proxy_auth/ReverseProxySecurityRealm.java http://jenkins-ci.org/commit/reverse-proxy-auth-plugin/dc7808b503d4ae2d2e7c74fa35df0821c1b794f0 Log: JENKINS-31612 creates the default filter and adds the new filter to the chain, so maintains the correct filter chain and unwarps access denied exceptions

          Code changed in jenkins
          User: Wilder Rodrigues
          Path:
          src/main/java/org/jenkinsci/plugins/reverse_proxy_auth/ReverseProxySecurityRealm.java
          http://jenkins-ci.org/commit/reverse-proxy-auth-plugin/cfa947cdc738e3ef992e99089bd207b12aaa4480
          Log:
          Merge pull request #28 from kuisathaverat/JENKINS-31612

          JENKINS-31612 Fix filter chain

          Compare: https://github.com/jenkinsci/reverse-proxy-auth-plugin/compare/f31a7875d611...cfa947cdc738

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Wilder Rodrigues Path: src/main/java/org/jenkinsci/plugins/reverse_proxy_auth/ReverseProxySecurityRealm.java http://jenkins-ci.org/commit/reverse-proxy-auth-plugin/cfa947cdc738e3ef992e99089bd207b12aaa4480 Log: Merge pull request #28 from kuisathaverat/ JENKINS-31612 JENKINS-31612 Fix filter chain Compare: https://github.com/jenkinsci/reverse-proxy-auth-plugin/compare/f31a7875d611...cfa947cdc738

          Josh Cook added a comment -

          I see that changes to address have been merged into the suppress-stack-trace plugin master branch, but there hasn't been a subsequent release.

          Is there any ETA for when a new version of this plugin will be available including these changes?

          Josh Cook added a comment - I see that changes to address have been merged into the suppress-stack-trace plugin master branch, but there hasn't been a subsequent release. Is there any ETA for when a new version of this plugin will be available including these changes?

          Oleg Nenashev added a comment -

          It has been actually released in 1.6.0

          Oleg Nenashev added a comment - It has been actually released in 1.6.0

            ifernandezcalvo Ivan Fernandez Calvo
            jec Josh Cook
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: