fix bouncer test
This commit is contained in:
parent
91e6bf7638
commit
a01ce0a907
2 changed files with 3 additions and 2 deletions
|
@ -66,7 +66,7 @@ func (a *APIKey) authTLS(c *gin.Context, logger *log.Entry) *ent.Bouncer {
|
|||
|
||||
validCert, extractedCN, err := a.TlsAuth.ValidateCert(c)
|
||||
if !validCert {
|
||||
logger.Errorf("invalid client certificate: %s", err)
|
||||
logger.Error(err)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,8 @@ teardown() {
|
|||
@test "simulate one bouncer request with a revoked certificate" {
|
||||
truncate_log
|
||||
rune -0 curl -i -s --cert "${tmpdir}/bouncer_revoked.pem" --key "${tmpdir}/bouncer_revoked-key.pem" --cacert "${tmpdir}/bundle.pem" https://localhost:8080/v1/decisions\?ip=42.42.42.42
|
||||
assert_log --partial "invalid client certificate: client certificate is revoked"
|
||||
assert_log --partial "client certificate is revoked by CRL"
|
||||
assert_log --partial "client certificate for CN=localhost OU=[bouncer-ou] is revoked"
|
||||
assert_output --partial "access forbidden"
|
||||
rune -0 cscli bouncers list -o json
|
||||
assert_output "[]"
|
||||
|
|
Loading…
Add table
Reference in a new issue