From Fedora Project Wiki
No edit summary
(add tracker bug and release notes ticket)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Switch pam_userdb from BerkeleyDB to GDBM =
= Switch pam_userdb from BerkeleyDB to GDBM =
{{Change_Proposal_Banner}}


== Summary ==
== Summary ==
pam_userdb was built with support for BerkeleyDB, but this project is no longer maintained, so it is replaced by GDBM.
pam_userdb was built with support for BerkeleyDB, but this project is no longer maintained as open source, so it is replaced by GDBM.


== Owner ==
== Owner ==
Line 15: Line 13:


== Current status ==
== Current status ==
[[Category:ChangePageIncomplete]]
[[Category:ChangeAcceptedF40]]
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
<!-- The Wrangler announces the Change to the devel-announce list and changes the category to Category:ChangeAnnounced (no action required) -->
<!-- After review, the Wrangler will move your page to Category:ChangeReadyForFesco... if it still needs more work it will move back to Category:ChangePageIncomplete-->
 
[[Category:SystemWideChange]]
[[Category:SystemWideChange]]


Line 31: Line 24:
ON_QA -> change is fully code complete
ON_QA -> change is fully code complete
-->
-->
* [<will be assigned by the Wrangler> devel thread]
* [https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org/thread/6JU3CVHX5ABRRAHNVHD7FX535P2WAGJ7/ Announced]
* FESCo issue: <will be assigned by the Wrangler>
* [https://discussion.fedoraproject.org/t/f40-change-proposal-switch-pam-userdb-from-berkeleydb-to-gdbm-system-wide/89606/1 Discussion Thread]
* Tracker bug: <will be assigned by the Wrangler>
* FESCo issue: [https://pagure.io/fesco/issue/3071 #3071]
* Release notes tracker: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=2245149 #2245149]
* Release notes tracker: [https://pagure.io/fedora-docs/release-notes/issue/1054 #1054]


== Detailed Description ==
== Detailed Description ==
Line 42: Line 36:


== Feedback ==
== Feedback ==
<!-- Summarize the feedback from the community and address why you chose not to accept proposed alternatives. This section is optional for all change proposals but is strongly suggested. Incorporating feedback here as it is raised gives FESCo a clearer view of your proposal and leaves a good record for the future. If you get no feedback, that is useful to note in this section as well. For innovative or possibly controversial ideas, consider collecting feedback before you file the change proposal. -->
This proposal contains manual steps to be executed by system administrators in the upgrade path. It is a risky point, as it relies on sysadmins reading the documentation, but it's the best solution so far. The database location is defined in the PAM stack, and the system administrator can set it to any value. Therefore, the only way to automate this would be to embed the database port in the PAM module code. But the port should be handled by libdb as this will allow to concentrate all the effort on a single binary, which will do this job for other packages as well.
 
An [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/HXK2RS7IBCRRYAQEYP2P66T6W4ONFBAZ/ email thread] was opened in Fedora devel to discuss this topic. Steve Grubb mentioned that this approach was used in the past to update other PAM modules. So even if the solution is not ideal, the best approach is to document the database porting process and let the system administrator run it manually.


== Benefit to Fedora ==
== Benefit to Fedora ==
* This changes uses an upstream maintained version, with new features and bug fixing. pam_userdb controls user authentication, and a bug in the database could lead to a security vulnerability.
* This change uses a database that is Fedora license compatible.
* This change uses a database that is Fedora license compatible.
* This changes uses an upstream maintained database version, with new features and bug fixing. pam_userdb controls user authentication, and a bug in the database could lead to a security vulnerability.


== Scope ==
== Scope ==
* Proposal owners:
* Proposal owners:
** libdb provides a program to port a BerkeleyDB database to GDBM.
** libdb includes a new subpackage libdb-convert-util, that provides db_converter, a program to port a BerkeleyDB database to GDBM.
** Change PAM database build option to GDBM.
** Change PAM database build option to GDBM.


Line 57: Line 53:
* Release engineering: https://pagure.io/releng/issue/11649
* Release engineering: https://pagure.io/releng/issue/11649


* Policies and guidelines: N/A (not needed for this Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Policies and guidelines: Yes. Opened a [https://gitlab.com/fedora/docs/fedora-linux-documentation/fedora-linux-sysadmin-guide/-/merge_requests/14 MR in the System Administrator’s Guide] with the documentation proposal.
<!-- Do the packaging guidelines or other documents need to be updated for this feature?  If so, does it need to happen before or after the implementation is done?  If a FPC ticket exists, add a link here. Please submit a pull request with the proposed changes before submitting your Change proposal. -->


* Trademark approval: N/A
* Trademark approval: N/A
Line 65: Line 60:


== Upgrade/compatibility impact ==
== Upgrade/compatibility impact ==
<!-- What happens to systems that have had a previous versions of Fedora installed and are updated to the version containing this change? Will anything require manual configuration or data migration? Will any existing functionality be no longer supported? -->
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
=== Upgrade ===
=== Upgrade ===
* If the pam_userdb module is used by the system, then the user/sysadmin will have to run the conversion tool. This can't be done automatically because the database location is configurable, and the conversion tool will need manual intervention.
* If the pam_userdb module is used by the system, then the user/sysadmin will have to run the conversion tool. This can't be done automatically because the database location is configurable, and the conversion tool will need manual intervention.


=== Compatibility ===
=== Compatibility ===
* pam_userdb module is mainly used in vsftpd environments. If this module is used by the system and the database isn't converted, then the user won't be able to authenticate in vsftpd environments. The user would still be able to authenticate using other methods and run the conversion tool.
* pam_userdb module is mainly used in vsftpd environments. If this module is used by the system and the database isn't converted, then the user won't be able to authenticate in vsftpd environments. The user would still be able to authenticate using other methods (i.e. su, ssh) and run the conversion tool.




== How To Test ==
== How To Test ==
<!-- This does not need to be a full-fledged document. Describe the dimensions of tests that this change implementation is expected to pass when it is done. If it needs to be tested with different hardware or software configurations, indicate them. The more specific you can be, the better the community testing can be.
* Run `db_converter` to convert the database. Example
 
`db_converter --src /etc/vsftpd/login.db --dest /etc/vsftpd/login.gdbm`
Remember that you are writing this how to for interested testers to use to check out your change implementation - documenting what you do for testing is OK, but it's much better to document what *I* can do to test your change.
 
A good "how to test" should answer these four questions:


0. What special hardware / data / etc. is needed (if any)?
* vsftpd login
1. How do I prepare my system to test this change? What packages
need to be installed, config files edited, etc.?
2. What specific actions do I perform to check that the change is
working like it's supposed to?
3. What are the expected results of those actions?
-->


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Check that the user is authenticated




== User Experience ==
== User Experience ==
<!-- If this change proposal is noticeable by users, how will their experiences change as a result?
Users won't experience any change.
 
This section partially overlaps with the Benefit to Fedora section above. This section should be primarily about the User Experience, written in a way that does not assume deep technical knowledge. More detailed technical description should be left for the Benefit to Fedora section.
 
Describe what Users will see or notice, for example:
  - Packages are compressed more efficiently, making downloads and upgrades faster by 10%.
  - Kerberos tickets can be renewed automatically. Users will now have to authenticate less and become more productive. Credential management improvements mean a user can start their work day with a single sign on and not have to pause for reauthentication during their entire day.
- Libreoffice is one of the most commonly installed applications on Fedora and it is now available by default to help users "hit the ground running".
- Green has been scientifically proven to be the most relaxing color. The move to a default background color of green with green text will result in Fedora users being the most relaxed users of any operating system.
-->


== Dependencies ==
== Dependencies ==
<!-- What other packages (RPMs) depend on this package?  Are there changes outside the developers' control on which completion of this change depends?  In other words, completion of another change owned by someone else and might cause you to not be able to finish on time or that you would need to coordinate?  Other upstream projects like the kernel (if this is not a kernel change)? -->
vsftpd depends on this change, but nothing needs to be done in this package.
 
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
 


== Contingency Plan ==
== Contingency Plan ==
 
* Contingency mechanism: Postpone to the next release.
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "Revert the shipped configuration".  Or it might not (e.g. rebuilding a number of dependent packages).  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
* Contingency deadline: Beta freeze.
* Contingency mechanism: (What to do?  Who will do it?) N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Blocks release? No.
<!-- When is the last time the contingency mechanism can be put in place?  This will typically be the beta freeze. -->
* Contingency deadline: N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? -->
* Blocks release? N/A (not a System Wide Change), Yes/No <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->




== Documentation ==
== Documentation ==
<!-- Is there upstream documentation on this change, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
[https://gitlab.com/fedora/docs/fedora-linux-documentation/fedora-linux-sysadmin-guide/-/merge_requests/14 MR in the System Administrator’s Guide] with the documentation proposal.


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
N/A (not a System Wide Change)


== Release Notes ==
== Release Notes ==
<!-- The Fedora Release Notes inform end-users about what is new in the release. Examples of past release notes are at https://docs.fedoraproject.org/en-US/fedora/latest/release-notes/ -->
pam_userdb switches database provider to GDM. [https://gitlab.com/fedora/docs/fedora-linux-documentation/fedora-linux-sysadmin-guide/-/merge_requests/14 Instructions on how to update in the System Administrator’s Guide]
<!-- The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this change, indicate them here.  A link to upstream documentation will often satisfy this need.  This information forms the basis of the release notes edited by the documentation team and shipped with the release.
 
Release Notes are not required for initial draft of the Change Proposal but has to be completed by the Change Freeze.
-->

Latest revision as of 19:15, 19 October 2023

Switch pam_userdb from BerkeleyDB to GDBM

Summary

pam_userdb was built with support for BerkeleyDB, but this project is no longer maintained as open source, so it is replaced by GDBM.

Owner


Current status

Detailed Description

Currently, the Fedora provided BerkeleyDB versions is 5.x, which has been unmaintained upstream for several years. BerkeleyDB v6.x is license incompatible, so moving to that version is not an option.

The proposal is to switch to GDBM, which has upstream support and whose license is compatible with Fedora.

Feedback

This proposal contains manual steps to be executed by system administrators in the upgrade path. It is a risky point, as it relies on sysadmins reading the documentation, but it's the best solution so far. The database location is defined in the PAM stack, and the system administrator can set it to any value. Therefore, the only way to automate this would be to embed the database port in the PAM module code. But the port should be handled by libdb as this will allow to concentrate all the effort on a single binary, which will do this job for other packages as well.

An email thread was opened in Fedora devel to discuss this topic. Steve Grubb mentioned that this approach was used in the past to update other PAM modules. So even if the solution is not ideal, the best approach is to document the database porting process and let the system administrator run it manually.

Benefit to Fedora

  • This change uses a database that is Fedora license compatible.
  • This changes uses an upstream maintained database version, with new features and bug fixing. pam_userdb controls user authentication, and a bug in the database could lead to a security vulnerability.

Scope

  • Proposal owners:
    • libdb includes a new subpackage libdb-convert-util, that provides db_converter, a program to port a BerkeleyDB database to GDBM.
    • Change PAM database build option to GDBM.
  • Other developers: N/A
  • Trademark approval: N/A
  • Alignment with Community Initiatives: N/A

Upgrade/compatibility impact

Upgrade

  • If the pam_userdb module is used by the system, then the user/sysadmin will have to run the conversion tool. This can't be done automatically because the database location is configurable, and the conversion tool will need manual intervention.

Compatibility

  • pam_userdb module is mainly used in vsftpd environments. If this module is used by the system and the database isn't converted, then the user won't be able to authenticate in vsftpd environments. The user would still be able to authenticate using other methods (i.e. su, ssh) and run the conversion tool.


How To Test

  • Run db_converter to convert the database. Example

db_converter --src /etc/vsftpd/login.db --dest /etc/vsftpd/login.gdbm

  • vsftpd login
  • Check that the user is authenticated


User Experience

Users won't experience any change.

Dependencies

vsftpd depends on this change, but nothing needs to be done in this package.

Contingency Plan

  • Contingency mechanism: Postpone to the next release.
  • Contingency deadline: Beta freeze.
  • Blocks release? No.


Documentation

MR in the System Administrator’s Guide with the documentation proposal.


Release Notes

pam_userdb switches database provider to GDM. Instructions on how to update in the System Administrator’s Guide