Giter Club home page Giter Club logo

Comments (9)

stack72 avatar stack72 commented on June 24, 2024

Do you think it is possible to use something like Nginx to SSL Proxy jira?

from puppet-jira.

Conzar avatar Conzar commented on June 24, 2024

Using puppetlabs/apache seems to work without having to modify the jira configuration at all. So maybe its not worth adding since apache can handle it?

  class { 'apache':
    mpm_module    => 'prefork',
    default_vhost => false,
  }

  class { 'apache::mod::rewrite':
  }

  class { 'apache::mod::ssl':
  }
  apache::vhost { 'jira non-ssl':
    servername => 'jira',
    port       => '80',
    docroot    => '/var/www',
    rewrites   => [
      {
        comment      => 'redirect to https',
        rewrite_cond => ['%{HTTPS} off'],
        rewrite_rule => ['(.*) https://%{HTTP_HOST}:443%{REQUEST_URI}'],
      },
    ],
  }

  apache::vhost { 'jira ssl':
    servername          => 'jira',
    port                => '443',
    docroot             => '/var/www',
    default_vhost       => true,
    ssl                 => true,
    ssl_cert            => '/etc/ssl/certs/ssl-cert-snakeoil.pem',
    ssl_key             => '/etc/ssl/private/ssl-cert-snakeoil.key',
    proxy_preserve_host => 'On',
    proxy_pass => [
      { 'path' => '/', 'url' => 'http://localhost:8080/' },
    ],
    require => Apache::Vhost [ 'jira non-ssl']
  }

from puppet-jira.

stack72 avatar stack72 commented on June 24, 2024

@Conzar that's great news. I think the documentation for the module can just be updated to show your example code. I'm not a massive fan of complicating systems and SSL Termination works a lot of the time for me :)

from puppet-jira.

Conzar avatar Conzar commented on June 24, 2024

Well, not so good news. It seemed to work on a fresh install of Jira. But it didn't work on an existing install of jira. Essentially, it was getting a proxy timeout error. Does anything need to change on the server.xml?

Here is the main error:

JIRA is reporting that it is using the URL scheme 'http', which does not match the scheme used to run these diagnostics, 'https'. This is known to cause JIRA to construct URLs using an incorrect hostname, which will result in errors in the dashboard, among other issues.

from puppet-jira.

stack72 avatar stack72 commented on June 24, 2024

@Conzar this article may be of use to you

https://confluence.atlassian.com/display/STASH/Securing+Stash+behind+nginx+using+SSL

I know its for stash but they work in a similar way

from puppet-jira.

Conzar avatar Conzar commented on June 24, 2024

Do you think the changes required to the connector in the server.xml should be rolled into this module?

from puppet-jira.

mkrakowitzer avatar mkrakowitzer commented on June 24, 2024

@Conzar The scheme should be https. I will add some examples on how to do this with the puppet apache and puppet nginx modules. This is the way I would recommend setting it up.

That being said i think we could role in the required https settings into this module. I will take a look at it.

from puppet-jira.

Conzar avatar Conzar commented on June 24, 2024

I have switched to using reverse proxies in Apache (for port 80 to 8080 traffic). What needs to be done to use ssl? I saw you added the following:
proxy => { scheme => 'https', proxyName => 'www.example.com', proxyPort => '443', },

What is proxy, is that specific to this module?

from puppet-jira.

mkrakowitzer avatar mkrakowitzer commented on June 24, 2024

No proxy is specific to tomcat, Setting the tomcat connector:

<Connector port="8081" ...
              proxyName="www.mycompany.com"
              proxyPort="443"
              scheme="https"/>

will cause servlets inside this web application to think that all proxied requests were directed to www.mycompany.com on port 443 using https. More detail here: http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html#Attributes

AFAIK its required if you are doing ssl offloading with reverse proxying via apache/nginx.

from puppet-jira.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.