IBM i Global

IBM i Global

Connect, learn, share, and engage with IBM Power.

 View Only
  • 1.  Importing a root certificate without any accompnaying client/server one

    Posted Thu August 10, 2023 08:41 AM
    Edited by Satid Singkorapoom Thu August 10, 2023 08:53 AM

    I work for a system integrator as an IBM i SME for a bank customer under way of its core bank replacement project.   I now have a request from a core bank ISV team member to install a certificate file in IBM i 7.4 LPAR that acts as a client to an FTPs server on Intel box that he takes care of.   His core bank application running in IBM i sends many stream files with FTPs to this Intel server every night after EoD batch process finishes.

    When I use Windows certificate viewer against the crtificate file I receive, I see only a root certificate without any associated client certificate. 

    I ask that person for a client certificate and explain its difference from a root certificate but I receive a response that he always generates a certificate file like this and I have an impression he does know the difference.   I then import it to IBM i *SYSTEM store anyway and validate it with a successful result.   Since, there is no client certificate, I cannot assign one to IBM i FTP Client application.   With curiosity, I try initiating an FTPs connection to the Intel server and it works with TLS active, to my surprise!   In DCM *SYSTEM store, IBM i FTP Client has no certificate assigned and its CA Trust List is disabled.

    Could any kind soul help explain to me why FTPs works with no client certificate assigned to it ?  Clearly with my limited understanding in this certificate matter, I have always thought a client certificate is needed to be assigned to IBM i FTP Client in DCM for FTPS to work but my real-life experiment proves me wrong. Or is this a strange bug?

    Thanks in advance for any clarification/education.



    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------



  • 2.  RE: Importing a root certificate without any accompnaying client/server one

    Posted Thu August 10, 2023 09:17 PM

    Later on I did one more experiment.  I disabled the root certificate and found that FTPs client failed to connect with error -23.  Only unsecured FTP works.  FTPs connection came back to work after I enable the root certificate which means it is needed for FTPs connection to work.   I have had the notion that a client certificate is needed to be assigned to IBM i FTP Client definition for FTPs to work but this incident is curiously interesting as to why it works. 



    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------



  • 3.  RE: Importing a root certificate without any accompnaying client/server one

    Posted Fri August 11, 2023 07:51 AM

    Is it possible, if you haven't registered a "client certificate", that the server really just doesn't verify client certificates in the first place (try with another client if you are curious).

    The client trust the server, and maybe that is sufficient for the current server setup. Public CA are usually already updated. Private/internal CAs of course must be imported and trusted.

    Doing client certification in FTPS is indeed possibile, maybe not so mainstream.

    Many people uses SFTP (SSH) "normally" with that requirement.



    ------------------------------
    --ft
    ------------------------------



  • 4.  RE: Importing a root certificate without any accompnaying client/server one

    Posted Fri August 11, 2023 09:56 PM

    Dear FT

    Thank for your response which corresponds to Christian's below and I will take both your and his explanations to do some more reading to get more acquaint to TLS.

     



    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------



  • 5.  RE: Importing a root certificate without any accompnaying client/server one

    Posted Fri August 11, 2023 12:36 PM

    Hi,

    If you add the root CA to you CA list in *system it means that all your TCP services using SSL will trust this signer certificate unless you specifically set a trust list for each service. There is an old IBM guide:

    https://www.ibm.com/support/pages/ssltls-ftp-client-configuration-using-heritage-digital-certificate-manager

    (it is optionally to create the trustlist). The FTP server you connect to has a certificate which is signed by this root CA and therefore you trust his certificate. You can retrieve the certificate from the FTP to check it through QMGTOOLS:

    https://www.ibm.com/support/pages/qmgtools-getssl-utility 

    Regards

    Kim



    ------------------------------
    Kim Clausen
    ------------------------------



  • 6.  RE: Importing a root certificate without any accompnaying client/server one

    Posted Fri August 11, 2023 10:02 PM

    Dear Kim

    I still have a hard time understanding when a CA Trust List is really needed. I never had a need to use one so far.  I understand its description in IBM i publication but I hope it is explained more on what kind of situation a CA Trust List is really needed.    And thank for reminding me of the QMGTOOLS as I did use this feature to get the certificate from the other side when no one passed to me one.  Quite useful !



    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------



  • 7.  RE: Importing a root certificate without any accompnaying client/server one

    Posted Fri August 11, 2023 03:29 AM

    Hi Satid.

    What you have running now is TLS with server verification! Your IBM i FTP client has the root certificate used to issue the FTP server certificate and will now trust the FTP server and TLS can run. Did you not have the root certificate, your FTP client would not trust the FTP server and TLS would not work.

    You're probably thinking of a client certificate verifying the FTP client - the IBM i. But this is only needed if the server only will accept connections from specific, trusted clients!

    I tend to avoid FTPS if possible and go for SFTP - FTP over SSH - instead, since this is much simpler to set up: Just generate a SSH key and copy the public key to the server, and you're good to go. SSH is almost always available on IBM i - just install licensed program 5733SC1 - and it will also give you a secure terminal. And the best part? No expiring certificate here! :-)

    Best regards

    Christian



    ------------------------------
    Christian Jorgensen
    IT System Administrator
    Network of Music Partners A/S
    ------------------------------



  • 8.  RE: Importing a root certificate without any accompnaying client/server one

    Posted Fri August 11, 2023 09:52 PM
    Edited by Satid Singkorapoom Fri August 11, 2023 10:10 PM

    Dear Christian

    Thanks for your explanation. I hope that IBM would publish an IBM i Technote that explains about basic idea of TLS involved on when just a root certificate in *SYSTEM store is enough and when explicit client certificate assignment is needed and which IBM i application definitions use which one of these 2 cases. 

    As for the use of FTPS, my customer made their own decision despite my explanation that SFTP is more firewall friendly than FTPS because it used only one port instead of using separate port(s) for data channel which also jumps around in FTPS which needs to be restrained.  They had their reason that I was not shared.

     

    >>>>>  You're probably thinking of a client certificate verifying the FTP client - the IBM i. But this is only needed if the server only will accept connections from specific, trusted clients!  <<<<

    The confusing thing here is that IBM i DCM uses the terminology "client/server certificate".  If the root certificate is enough for server's identity verification to the client, then I could not help wonder why IBM i DCM uses "client/server" because from my Google search, no articles about this matter use this same terminology at all.  Now, I have to wonder when "server" part is used since a root certificate in *SYSTEM store is enough for server ID verification. 


    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------