• 
      

    Promote some mandatory properties from cert storage backends to base.

    Review Request #14898 — Created March 12, 2026 and updated

    Information

    Review Board
    release-7.1.x

    Reviewers

    There are some important variables in the SSL/TLS cert storage backends
    that are currently locked into the file storage backend. This promotes
    the following from that backend into the base classes and adds
    validation during construction:

    • BaseStoredCertificate.hostname
    • BaseStoredCertificate.port
    • BaseStoredCertificateBundle.name
    • BaseStoredCertificateFingerprints.hostname
    • BaseStoredCertificateFingerprints.port

    Unit tests pass.

    Summary ID
    Promote some mandatory properties from cert storage backends to base.
    There are some important variables in the SSL/TLS cert storage backends that are currently locked into the file storage backend. This promotes the following from that backend into the base classes and adds validation during construction: * `BaseStoredCertificate.hostname` * `BaseStoredCertificate.port` * `BaseStoredCertificateBundle.name` * `BaseStoredCertificateFingerprints.hostname` * `BaseStoredCertificateFingerprints.port`
    c56dfaa8f3b49c02237c23f7e12d4a9ae296fb5f
    Description From Last Updated

    I think we can get rid of the "These will be mandatory in Review Board 9", they're only mandatory if …

    maubinmaubin

    Copy/pasteo: hostname -> port

    daviddavid

    Can you add a Raises section in the docs for these.

    maubinmaubin

    Do we need to go through a release cycle where these are optional and say "These will be mandatory in …

    maubinmaubin

    Copy/pasteo: hostname -> port

    daviddavid

    There are double spaces on these (space at the end of one line and the beginning of the next)

    daviddavid

    This should end with )>

    daviddavid

    This test says "missing hostname" but your certificate has a hostname, so it's testing a missing port. We should probably …

    daviddavid
    maubin
    1. 
        
    2. reviewboard/certs/storage/base.py (Diff revision 1)
       
       
       
      Show all issues

      I think we can get rid of the "These will be mandatory in Review Board 9", they're only mandatory if certificate is not set. And if we get rid of that we can merge this with the above bullet point. I guess you can say "These will be mandatory if certificate is not provided".

    3. reviewboard/certs/storage/base.py (Diff revision 1)
       
       
      Show all issues

      Can you add a Raises section in the docs for these.

    4. reviewboard/certs/storage/base.py (Diff revision 1)
       
       
      Show all issues

      Do we need to go through a release cycle where these are optional and say "These will be mandatory in Review Board X" before we make them mandatory?

      1. Because none of this was used in prior releases, we're going to forgo the deprecation phase.

    5. 
        
    david
    1. 
        
    2. reviewboard/certs/storage/base.py (Diff revision 1)
       
       
      Show all issues

      Copy/pasteo: hostname -> port

    3. reviewboard/certs/storage/base.py (Diff revision 1)
       
       
      Show all issues

      Copy/pasteo: hostname -> port

    4. reviewboard/certs/storage/file_storage.py (Diff revision 1)
       
       
       
       
      Show all issues

      There are double spaces on these (space at the end of one line and the beginning of the next)

    5. Show all issues

      This should end with )>

    6. reviewboard/certs/tests/test_file_storage_backend.py (Diff revision 1)
       
       
       
       
       
       
       
       
       
       
       
       
       
      Show all issues

      This test says "missing hostname" but your certificate has a hostname, so it's testing a missing port. We should probably fix this one and introduce a second test case for a missing port.

    7. 
        
    chipx86
    Review request changed
    Change Summary:
    • Updated versions for RB 8.
    • Fixed some unit test names.
    • Removed the incorrect note about some arguments being mandatory.
    • FIxed a unit test for FileStoredCertificate.__init__ testing port instead of hostname, and added a test for port.
    Commits:
    Summary ID
    Promote some mandatory properties from cert storage backends to base.
    There are some important variables in the SSL/TLS cert storage backends that are currently locked into the file storage backend. This promotes the following from that backend into the base classes and adds validation during construction: * `BaseStoredCertificate.hostname` * `BaseStoredCertificate.port` * `BaseStoredCertificateBundle.name` * `BaseStoredCertificateFingerprints.hostname` * `BaseStoredCertificateFingerprints.port`
    58cfc367f643a0448defcfbe8aa0157d64f1598d
    Promote some mandatory properties from cert storage backends to base.
    There are some important variables in the SSL/TLS cert storage backends that are currently locked into the file storage backend. This promotes the following from that backend into the base classes and adds validation during construction: * `BaseStoredCertificate.hostname` * `BaseStoredCertificate.port` * `BaseStoredCertificateBundle.name` * `BaseStoredCertificateFingerprints.hostname` * `BaseStoredCertificateFingerprints.port`
    c56dfaa8f3b49c02237c23f7e12d4a9ae296fb5f

    Checks run (2 succeeded)

    flake8 passed.
    JSHint passed.
    maubin
    1. Ship It!
    2.