mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-10 23:57:34 +02:00
authorize: check CRLs only for leaf certificates (#4480)
Set the Envoy option only_verify_leaf_cert_crl, to avoid a bug where CRLs cannot be used in combination with an intermediate CA trust root. Update the client certificate validation logic in the authorize service to match this behavior.
This commit is contained in:
parent
3e330bb76a
commit
c95f1695ec
4 changed files with 27 additions and 39 deletions
|
@ -238,16 +238,6 @@ func Test_isValidClientCertificate(t *testing.T) {
|
|||
assert.NoError(t, err, "should not return an error")
|
||||
assert.True(t, valid, "should return true")
|
||||
})
|
||||
t.Run("missing CRL", func(t *testing.T) {
|
||||
// If a CRL is provided for any CA, it must be provided for all CAs.
|
||||
valid, err := isValidClientCertificate(testCA, testCRL, ClientCertificateInfo{
|
||||
Presented: true,
|
||||
Leaf: testValidIntermediateCert,
|
||||
Intermediates: testIntermediateCA,
|
||||
}, noConstraints)
|
||||
assert.NoError(t, err, "should not return an error")
|
||||
assert.False(t, valid, "should return false")
|
||||
})
|
||||
t.Run("chain too deep", func(t *testing.T) {
|
||||
valid, err := isValidClientCertificate(testCA, "", ClientCertificateInfo{
|
||||
Presented: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue