IBM Verify

IBM Verify

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  WebSEAL CRL and OCSP Ordering

    Posted Tue September 19, 2023 04:41 PM

    Can someone explain the ordering of CRL and OCSP checking to me?  I know support has explained this several times, and I thought I had this down, but I still have questions.

    From my understanding, WebSEAL checks OCSP first using entries in AIA (Authority Information Access) if OCSP is enabled, then CRL (HTTP) specified in the order of the incoming certificate's CDP (Certificate Distribution Point), then LDAP CRL (if configured).  Is this accurate?  Is there a flow diagram that anyone has produced for how things are supposed to work?  I thought years ago L2 may have sent me something but I cannot find it years later.

    I came across an environment where client certificates are being used to authenticate against the WebSEAL, however, the first CRL in the cert's CDP can not be reached by this environment.  However, the connection timeouts (as specified in the WebSEAL configuration, see below) are high on this environment, yet there is no slowness in authentication.  On a side note, this particular environment has OCSP disabled in the WebSEAL configuration, although the incoming certs do have an OCSP responder in their AIA.  However, I think the OCSP responders in the certs is irrelevant since OCSP is disabled on the WebSEAL.

    Does WebSEAL check all the CRLs in the CDP in parallel, using the answer from the first one that responds?  I am curious why this lack of connectivity to this particular CRL is not causing authentication delays.  There is no a fast reset on the network for this connection, so the connection to that first CRL is a silent drop.  Now, if both HTTP CRLs are unavailable, then the authentication is delayed (as I have tested this on my lab).

    WebSEAL utilizes the following entries under the [ssl] stanza to control timeout of checking the various OCSP and CRLs as specified in the cert's AIA and CDP.  For example's sake, let's say these values are all set to 20 seconds.  Hence, I would expect things would get hung up when checking that first CRL due to GSK_HTTP_CONNECT_TIMEOUT being 20 seconds.  But authentication is fast in this scenario with one HTTP CRL not being reachable.

    • GSK_HTTP_CONNECT_TIMEOUT gsk-attr-name = numeric:336:<seconds>
    • GSK_OCSP_TIMEOUT gsk-attr-name = number:318:<seconds>
    • GSK_HTTP_CDP_TIMEOUT gsk-attr-name = numeric:319:<seconds>
    • GSK_LDAP_SEARCH_TIMEOUT gsk-attr-name = number:340:<seconds>
    • GSK_LDAP_CONNECT_TIMEOUT gsk-attr-name = number:343:<seconds>

    Also, if WebSEAL does do the HTTP CRL checks in parallel, does it do the same for OCSP?  Or if one of the OCSP responders in a cert's AIA is unavailable, is this going to cause authentication delays waiting on timeouts to occur?

    PS:  This environment is on containers, and I don't have administrator access to the container infrastructure and hence I cannot obtain a packet trace.  On the virtual appliances I would usually use packet traces to figure these types of flow questions out, although that wasn't a definite answer and more of an assumption when I saw certain behaviors.

    Thanks for any thoughts!

    Matt

    For reference:  https://www.ibm.com/docs/en/sva/10.0.6?topic=webseal-certificate-revocation-lists



    ------------------------------
    Matt Jenkins
    ------------------------------


  • 2.  RE: WebSEAL CRL and OCSP Ordering

    Posted Tue September 19, 2023 07:41 PM

    Matt,

     

    I've attempted to answer, with help from the IBM GSKit team, most of your questions below.  Bottom line is that if one of the OCSP responders from the certificates AIA is unavailable you should be seeing delays.

     

    1. From my understanding, WebSEAL checks OCSP first using entries in AIA (Authority Information Access) if OCSP is enabled, then CRL (HTTP) specified in the order of the incoming certificate's CDP (Certificate Distribution Point), then LDAP CRL (if configured).  Is this accurate?  

      The above is correct but GSKit also allows a preconfigured OCSP responder to be tried prior to OCSP AIA.  Additionally, CDP's may also contain LDAP URI's.

    2. Is there a flow diagram that anyone has produced for how things are supposed to work?

      Not that I can find.

    3. Does WebSEAL check all the CRLs in the CDP in parallel, using the answer from the first one that responds?

      No.

    4. Also, if WebSEAL does do the HTTP CRL checks in parallel, does it do the same for OCSP?

      No.

    5. Or if one of the OCSP responders in a cert's AIA is unavailable, is this going to cause authentication delays waiting on timeouts to occur?

      Yes.  Note: in all the above cases we have extensive OCSP and CRL caching as well as options to support Lightweight OCSP etc.  GSKit also supports OCSP Stapling in the handshake.

     

    I hope that this helps.

     

    Scott A. Exton
    Senior Software Engineer
    Chief Programmer - IBM Security Verify Access

    IBM Master Inventor

    cid4122760825*<a href=image002.png@01D85F83.85516C50">

     

     

     






  • 3.  RE: WebSEAL CRL and OCSP Ordering

    Posted Wed September 20, 2023 11:19 AM

    Scott, thanks for the reply and clarification on some points.

    I am still puzzled why this one environment does not encounter authentication delays given the first HTTP CRL is unavailable and has a silent drop at the network (hence no RST returned and it will have to wait the full timeout period).

    For example, given the cert info below (CDP and AIA), if httpcrl1.acme.org is unavailable, wouldn't we encounter an authentication delay waiting for the connect timeout to occur before httpcrl2.acme.org is tried?

    [1]CRL Distribution Point
         Distribution Point Name:
              Full Name:
                   URL=http://httpcrl1.acme.org/SomeCA/CRL1.crl
                   URL=http://httpcrl2.acme.org/SomeCA/CRL1.crl
                   Directory Address:
                        CN=CRL1
                        CN=SomeCA
                        OU=x509
                        O=ACME
                        C=us

    [1]Authority Info Access
         Access Method=Certification Authority Issuer (1.3.6.1.5.5.7.48.2)
         Alternative Name:
              URL=http://httpcrl1.acme.org/x509/SomeCA.p7c
    [2]Authority Info Access
         Access Method=Certification Authority Issuer (1.3.6.1.5.5.7.48.2)
         Alternative Name:
              URL=http://httpcrl2.acme.org/x509/SomeCA.p7c
    [3]Authority Info Access
         Access Method=On-line Certificate Status Protocol (1.3.6.1.5.5.7.48.1)
         Alternative Name:
              URL=http://ocsp1.acme.org/responder
    [4]Authority Info Access
         Access Method=On-line Certificate Status Protocol (1.3.6.1.5.5.7.48.1)
         Alternative Name:
              URL=http://ocsp2.acme.org/responder

    Now, I took this cert and ran it through a lab on a virtual appliance configured the same as this other environment.  What I see is the following in a packet capture:

    1. WebSEAL connects to LDAP CRL specified in WebSEAL config file [ssl] crl-ldap-server setting and gets answer for Intermediate CA of incoming cert
    2. WebSEAL attempts to connect to httpcrl1.acme.org and query Intermediate CA CRL server and the connection is immediately reset (in this lab I can't simulate a slow failure)
    3. WebSEAL connects to httpcrl2.acme.org and gets response for Intermediate CA of incoming cert

    4. WebSEAL connects to LDAP CRL specified in WebSEAL config file and gets answer for incoming user cert CRL
    5. WebSEAL attempts to connect to httpcrl1.acme.org and query for incoming user cert CRL and gets immediately reset
    6. WebSEAL connects to httpcrl2.acme.org and gets response for user cert CRL

    7. Session is established and user authenticated

    One thing I forgot about is the cert is signed by an intermediate CA, so basically Root CA -> Intermediate CA -> User Cert.

    WebSEAL checks the intermediate (signing) CA cert first.  The top level root cert doesn't have a CDP/AIA in this case, so nothing gets checked there.  This intermediate signing cert explains why when the timeout values are higher, as we would encounter more delay because we have to timeout on multiple checks.

    However, what I don't understand is why the LDAP CRL is checked first, and what happens if httpcrl1.acme.org has a slow reset (unfortunately I cannot test that at the moment as I cannot think of a way on the virtual appliance to make httpcrl1.acme.org fail).  According to the ISVA documentation, the LDAP CRL should be checked last:

    https://www.ibm.com/docs/en/sva/10.0.6?topic=webseal-certificate-revocation-lists

    Also, why if we get an answer from that first LDAP CRL call (configured in the WebSEAL conf file, not on the cert CDP or AIA) do we continue onto checking the other CRLs?  Do we check each CRL to make sure there is not a revocation entry in any of them for the cert we are checking?

    Thanks again,

    Matt



    ------------------------------
    Matt Jenkins
    ------------------------------



  • 4.  RE: WebSEAL CRL and OCSP Ordering

    Posted Thu September 21, 2023 02:13 AM

    Matt,

     

    I spoke with the GSKit team again, and they responded with the following:

     

    The ordering is mainly historical as when URI name forms were first being added to certificates, many customers did not have HTTP ports open (and so blocked with timeouts)  and so it was faster and more reliable to try the URI LDAP name form first, so our code is doing that on purpose.  Probably something that is no longer needed.  BTW OCSP should have resulted in CRL being obsolete, but it seems it was just never fast enough.

     

    If you want things investigated further it would probably be best to open a support ticket so that GSKit trace can be collected and examined.

     

    I hope that this helps.

     

    Scott A. Exton
    Senior Software Engineer
    Chief Programmer - IBM Security Verify Access

    IBM Master Inventor

    cid4122760825*<a href=image002.png@01D85F83.85516C50">

    Phone: 61-7-5552-4008
    E-mail: scotte@au1.ibm.com

    1 Corporate Court
    Bundall, QLD 4217
    Australia

     

     

     






  • 5.  RE: WebSEAL CRL and OCSP Ordering

    Posted Thu September 21, 2023 11:23 AM

    Scott, thanks for the update.  So it seems the documentation is inaccurate where it states:

    You can configure WebSEAL to use OCSP, CRL, or both for managing certificates. By default, WebSEAL (using GSKit) tries OCSP first, followed by CRL. If these first two methods fail, WebSEAL can then try LDAP (if configured). This search order is defined by an RFC and cannot be changed.

    It seems from what they are saying, the LDAP CRL is attempted first.  The only remaining question I would have is why when it gets an answer from the LDAP CRL does it continue to check the HTTP CRLs?

    It doesn't seem like we have to wait for those other HTTP CRL requests to return from my experience in this environment where things are not slowing down despite the HTTP CRL path being silently dropped.

    Interesting about OCSP.  I'll pass that information on in case we see issues when we enable it.

    Thanks Scott!

    Matt



    ------------------------------
    Matt Jenkins
    ------------------------------