{"id":1831,"date":"2019-10-25T13:19:47","date_gmt":"2019-10-25T11:19:47","guid":{"rendered":"https:\/\/wpethzprd.ethz.ch\/its\/?p=1831"},"modified":"2019-10-25T13:19:49","modified_gmt":"2019-10-25T11:19:49","slug":"a-successful-small-open-source-project","status":"publish","type":"post","link":"https:\/\/blogs.ethz.ch\/its\/2019\/10\/25\/a-successful-small-open-source-project\/","title":{"rendered":"A successful small open-source project"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In this short article I would like to show\nhow a small project developed by the ITS User Services could gain popularity\nand attract several developers which are now improving it and keeping it alive.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">The beginning<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Year 2007, the ITS Hosting group used <a href=\"https:\/\/en.wikipedia.org\/wiki\/Nagios\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (\u00f6ffnet in neuem Tab)\">Nagios<\/a> to proactively check our servers (e.g., memory, CPU usage, disk usage, network traffic). In the same year it became clear that the SSL protocol was not perfect and that several configurations could be a simple vector for several attacks (denial of service, information disclosure and even remote access).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After the publication of <a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2007-1858\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (\u00f6ffnet in neuem Tab)\">CVE-2007-1858<\/a> about the default ciphers of the Tomcat Server, we felt the need to check all our machines and keep the check running regularly in case an update would change the SSL\/TLS settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another important check was the validity of\nthe certificate, we wanted to be warned early if a certificate was about to\nexpire.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I then wrote a simple Nagios plugin to\ncheck the security settings and validity of the certificate of an HTTPS server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The API of Nagios is straightforward:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>you just have to return 0 for\nOK, 1 for a warning, 2 for a critical and 3 for an unknown status<\/li><li>and generate a single line of\ntext with a predefined format<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This simple API allows a quick\nimplementation of a prototype.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Implementation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As I did not want to reinvent the wheel, I\nchoose to use the OpenSSL command line utilities to perform the checks and\npacked everything in a shell script (calling command line utilities form Perl\nor C seemed, at the time, an overkill).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Looking at this choice now, it was probably\nthe wrong one: the plugin has now around 3\u00e2\u20ac\u2122000 lines of code and shell\nscripting is not really the most comfortable language for large projects. However,\nat the time, I did not expect that so many checks and features would then be\nadded.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Having a Mac with a BSD system and\ndeploying the plugin on a GNU system, (BSD does not have GNU utilities per\ndefault) I also choose to make the plugin POSIX compliant. A good choice for a\nsuccessful open-source project but a choice that costed many headaches and\ndifficulties (people using bash on a GNU system do not usually realize how much\nis not standard). In the end, I managed to learn a lot about the different\nshells.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Open sourcing<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As the first versions of the plugin were\ndoing a good job, I then decided to release the code as open source. This step\nrequired a lot of work but after 12 years the work that the community put in\nthis project confirms, that the effort was worth the investment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To attract people, you need to make your project easy to understand, easy to use and install and easy to access. The project needs a web page, a bug tracking system and a lot of documentation. I also had to choose a licence, and looking at other Nagios plugins, I decided to go for the <a href=\"https:\/\/www.gnu.org\/licenses\/gpl-3.0.en.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (\u00f6ffnet in neuem Tab)\">GNU General Public License v3<\/a> (given the strong restrictions, especially with the distribution on macOS systems I would have rather chosen the Apache one).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another good choice was to follow Eric Raymond\u00e2\u20ac\u2122s hints in <em><a rel=\"noreferrer noopener\" aria-label=\" (\u00f6ffnet in neuem Tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/The_Cathedral_and_the_Bazaar\" target=\"_blank\">The Cathedral and the Bazaar<\/a><\/em>: <a href=\"https:\/\/en.wikipedia.org\/wiki\/Release_early,_release_often\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (\u00f6ffnet in neuem Tab)\">Release early, release often<\/a>. Since 2007 the tool was released with new features and bug fixes more than 100 times, often several times in the same month.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Important is also\nto listen to the community, to their needs and wishes and to acknowledge the\nwork of co-authors: the <a href=\"https:\/\/github.com\/matteocorti\/check_ssl_cert\/blob\/master\/AUTHORS\">authors list<\/a> has now reached 72 persons, which helped\nwith patches and corrections.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Legal aspects at ETH Z\u00fcrich<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The development of open-source software at the ETH is possible but has to be coordinated with the school with a Software Disclosure agreement with <a href=\"https:\/\/ethz.ch\/en\/industry-and-society\/intellectual-property\/software\/software-disclosure\/Prozess-Meldung-Registrierung-OSS.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (\u00f6ffnet in neuem Tab)\">ETH transfer<\/a>. After leaving the Software Services in 2013, the ETH decided not to continue with the project, which was left to the community.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It was moved to GitHub, and I am now\nmaintaining in as a hobby. By the time we already released 31 versions and the\ncommunity was big enough to keep the project living.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After more than 10 years, the plugin\nattracted a solid community and was developed far beyond what I expected and\nwhat were the original goals. It has tons of advanced features and is widely\nused.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With this short article, I want to advocate\nfor open sourcing your projects: it requires some work at the beginning but eventually,\nyou will get back more than what you had to invest.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Contact &amp; Text<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Dr. Matteo Corti, Head of ITS User Services, <a href=\"https:\/\/ethz.ch\/services\/en\/organisation\/departments\/it-services.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (\u00f6ffnet in neuem Tab)\">IT Services<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this short article I would like to show how a small project developed by the ITS User Services could gain popularity and attract several developers which are now improving it and keeping it alive.<\/p>\n","protected":false},"author":838,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[271393,271672,271253],"class_list":["post-1831","post","type-post","status-publish","format-standard","hentry","category-news","tag-nagios","tag-nagios-plugin","tag-open-source-project"],"_links":{"self":[{"href":"https:\/\/blogs.ethz.ch\/its\/wp-json\/wp\/v2\/posts\/1831","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ethz.ch\/its\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ethz.ch\/its\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ethz.ch\/its\/wp-json\/wp\/v2\/users\/838"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ethz.ch\/its\/wp-json\/wp\/v2\/comments?post=1831"}],"version-history":[{"count":0,"href":"https:\/\/blogs.ethz.ch\/its\/wp-json\/wp\/v2\/posts\/1831\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.ethz.ch\/its\/wp-json\/wp\/v2\/media?parent=1831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ethz.ch\/its\/wp-json\/wp\/v2\/categories?post=1831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ethz.ch\/its\/wp-json\/wp\/v2\/tags?post=1831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}