Description of problem: The default token directory for softhsm is /var/lib/softhsm/tokens. The permissions, ownership and SELinux context for the directory assumes, that OpenDNSSEC is the sole owner and user of the default location. The directories are only accessible by members of the ods group and the ods user. Further more, its context is named_cached_t: # ls -laZ /var/lib/softhsm total 12 drwxr-x---. 3 ods ods system_u:object_r:named_cache_t:s0 4096 Sep 5 09:24 . drwxr-xr-x. 73 root root system_u:object_r:var_lib_t:s0 4096 Sep 5 09:24 .. drwxrwx--T. 4 ods ods system_u:object_r:named_cache_t:s0 4096 Sep 5 09:27 tokens FreeIPA and Dogtag PKI like to use the default location for testing, too. We are working on HSM support and need a convenient way to test HSM integration. SoftHSM is the easiest approach for us, because it doesn't involve expensive hardware. So far, we have no interest to productize or officially support SoftHSM as key store for Dogtag PKI. I considered and tried to use SOFTHSM2_CONF env var and ~/.config/softhsm2/softhsm2.conf. The env var doesn't work with Dogtag at the moment. Dogtag can't pass env vars to installer compoments at the moment. The user location doesn't quite work for us, too. The Dogtag NSSDB is accessed by multiple users (root, pkiuser) and systems (pkispawn, Tomcat, FreeIPA installers and management scripts). I see two options: 1) Change permissions and SELinux context to allow other users to access tokens. This also includes the dynamic token directory. softhsm2-util --init-token creates a directory with 700. The directory name seems to be a dynamic uuid and is not reported as result of --init-token. 2) Improve SoftHSM2 so that path to softhsm2.conf can be passed as PKCS#11 configuration string (e.g. modutil's -string CONFIG_STRING). Version-Release number of selected component (if applicable): softhsm-2.3.0-4.fc28.x86_64
I forgot to mention that certmonger daemon also needs access to softhsm token directory. For now, this hack seems to do the trick for us: # usermod -G ods -a pkiuser # chcon -R -t pki_tomcat_t /var/lib/softhsm # runuser -u pkiuser -- softhsm2-util --init-token ... # chcon -R -t pki_tomcat_t /var/lib/softhsm I guess Fedora needs a dedicated group and SELinux context for softhsm.
I am fine with converting softhsm to have its own user/group "softhsm" and to have the ods user/group (and other ones you need) added to the softhsm group. Would that work?
A dedicated user and group for softhsm would be one step of the solution. We also need a SELinux type for the directory (softhsm_var_t?) and allow the named_exec_t (or whatever its called) to read and write to that context.
This is causing me trouble now as well. I can't start apache because I get an selinux error from nss_pcache trying to access the tokens directory. I removed mod_nss and then it started. If my issue should be filed under a different component, then let me know, but it appears to be the same as this.
This message is a reminder that Fedora 28 is nearing its end of life. On 2019-May-28 Fedora will stop maintaining and issuing updates for Fedora 28. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '28'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 28 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
The issue still affects IPA and our plan to use SoftHSM2 to test HSM support.
This message is a reminder that Fedora 30 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '30'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 30 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.
This message is a reminder that Fedora 32 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '32'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 32 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Christian, Is this bug still relevant ?
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
EPEL has the same bug: https://bugzilla.redhat.com/show_bug.cgi?id=1625548
This message is a reminder that Fedora Linux 34 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '34'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 34 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07. Fedora Linux 34 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. Thank you for reporting this bug and we are sorry it could not be fixed.