Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shibboleth support for Dataverse requires SELinux to be disabled or set to permissive #3406

Closed
pdurbin opened this issue Oct 14, 2016 · 8 comments
Assignees

Comments

@pdurbin
Copy link
Member

pdurbin commented Oct 14, 2016

As documented at http://guides.dataverse.org/en/4.5.1/installation/shibboleth.html#disable-selinux the way Shibboleth support has been implemented for Dataverse requires that SELinux be disabled or set to permissive.

Users such as @Venki18 have indicated at https://groups.google.com/d/msg/dataverse-community/U04sLtEkJ7Q/HTufSDqgAgAJ that "Our IT team want us to set SELinux enforcing ON". As of this writing the number one goal at http://dataverse.org/goals-roadmap-and-releases is "increase adoption (users, dataverses, datasets, installations, journals)" so we should attempt to address this issue for potential installations of Dataverse.

To be clear, Dataverse itself runs fine with SELinux enabled. It's shibd and friends that don't work with SELinux. As of this writing https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPSELinux says, "At the present time, we do not support the SP in conjunction with SELinux, and at minimum we know that communication between the mod_shib and shibd components will fail if it's enabled. Other problems may also occur."

There are a few ways we could address this issue, and here is my preferred order:

@pdurbin
Copy link
Member Author

pdurbin commented Oct 15, 2016

@whorka has what seems to be excellent advice in this area: "Typically, the simplest way to do this is to feed the audit log messages through the "audit2allow" tool, which generates SELinux rules to permit any of the denied operations. You can see an example of this at https://wiki.centos.org/HowTos/SELinux#head-faa96b3fdd922004cdb988c1989e56191c257c01 ."

@pdurbin
Copy link
Member Author

pdurbin commented Oct 17, 2016

@whorka and I came up with this and it seems to work!

module shibboleth 1.0;

require {
    class file {open read};
    class sock_file write;
    class unix_stream_socket connectto;
    type initrc_t;
    type httpd_t;
    type var_run_t;
    type var_t;
}

allow httpd_t var_run_t:sock_file write;
allow httpd_t initrc_t:unix_stream_socket connectto;
allow httpd_t var_t:file {open read};

pdurbin added a commit that referenced this issue Oct 18, 2016
Also explain how to update the `shibboleth.te` file in the future.
@pdurbin
Copy link
Member Author

pdurbin commented Oct 18, 2016

I just made pull request #3411 to document how to make use of the SELinux Type Enforcement (TE) file I posted above. At https://waffle.io/IQSS/dataverse I'm advancing this to Code Review and @landreev said he'd be willing to take a look since there's potential for figuring out how to get rApache to work with SELinux as well. The pull request is only a change to the Installation Guide and the Developer Guide.

@whorka suggested that we could add it to the installer as well and @landreev and I discussed this but ultimately agreed that just like how TwoRavens is an optional component and has its own installer, Shibboleth shouldn't be in the main installer either since it's also optional. That's our current thinking anyway. Maybe @donsizemore can add the SELinux magic to https://github.com/IQSS/dataverse-ansible and maybe @lwo can add it to https://github.com/IQSS/dataverse-puppet . I don't know that https://github.com/IQSS/dataverse-aws supports Shibboleth at all so I'll leave @telnoratti and @joelmarkanderson alone for now. 😄

I'd love to hear from @Venki18 if the fix works for him. It sounds like he and a colleague are starting to work on a parallel effort: https://groups.google.com/d/msg/dataverse-community/U04sLtEkJ7Q/AUUBXxffBgAJ

@pdurbin pdurbin added this to the 4.6 - File Replace milestone Oct 18, 2016
@pdurbin
Copy link
Member Author

pdurbin commented Oct 18, 2016

@djbrooke said to go ahead and add a milestone of 4.6 on this so I just did.

@pdurbin
Copy link
Member Author

pdurbin commented Oct 19, 2016

@landreev @Venki18 to make it easier to see the changing to the guides @kcondon just built the docs in a temporary location (thanks!). To see the "diff" please go to f9e6b14 but to see the rendered HTML pages, please visit the following places that have changed in pull request #3411:

I've given this issue to @landreev for code review but I've also encouraged @Venki18 and his colleague to do some of their own testing: https://groups.google.com/d/msg/dataverse-community/U04sLtEkJ7Q/5boz_xl0BwAJ

@pdurbin
Copy link
Member Author

pdurbin commented Oct 24, 2016

@landreev the guy who added the Picard gif (the guy behind http://stopdisablingselinux.com ) also wrote this: "the policy looks okay to me -- but i've only tested it with my eye-parser :P" -- https://irclog.perlgeek.de/crimsonfu/2016-10-20#i_13436213

Also, on Friday @tdilauro shared his own http_mod_shib.te file with the community: https://groups.google.com/d/msg/dataverse-community/U04sLtEkJ7Q/Ea98RneSAAAJ

@pdurbin
Copy link
Member Author

pdurbin commented Oct 24, 2016

@landreev left his (positive) code review at #3411 (review) so this issue is now in QA.

@kcondon
Copy link
Contributor

kcondon commented Oct 26, 2016

Built, doc looks ok. Trusting accuracy of content to Phil and Bill, closing.

@kcondon kcondon closed this as completed Oct 26, 2016
kcondon added a commit that referenced this issue Oct 26, 2016
Explain how to get Shibboleth working with SELinux #3406
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

No branches or pull requests

4 participants