log OU too
This commit is contained in:
parent
e55d9ef5f3
commit
91e6bf7638
2 changed files with 2 additions and 2 deletions
|
@ -271,7 +271,7 @@ func (ta *TLSAuth) ValidateCert(c *gin.Context) (bool, string, error) {
|
|||
}
|
||||
|
||||
if revoked {
|
||||
return false, "", fmt.Errorf("client certificate for %s is revoked", clientCert.Subject.CommonName)
|
||||
return false, "", fmt.Errorf("client certificate for CN=%s OU=%s is revoked", clientCert.Subject.CommonName, clientCert.Subject.OrganizationalUnit)
|
||||
}
|
||||
|
||||
ta.logger.Debugf("client OU %v is allowed vs required OU %v", clientCert.Subject.OrganizationalUnit, ta.AllowedOUs)
|
||||
|
|
|
@ -150,7 +150,7 @@ teardown() {
|
|||
./instance-crowdsec start
|
||||
rune -1 cscli lapi status
|
||||
assert_log --partial "client certificate is revoked by CRL"
|
||||
assert_log --partial "client certificate for localhost is revoked"
|
||||
assert_log --partial "client certificate for CN=localhost OU=[agent-ou] is revoked"
|
||||
rune -0 cscli machines list -o json
|
||||
assert_output '[]'
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue