瀏覽代碼

Clarify SSH policy evaluation errors with opposing SSH cert type

Herman Slatman 2 年之前
父節點
當前提交
31656e3d14
共有 1 個文件被更改,包括 2 次插入 和 2 次删除
  1. 2 2
      authority/policy/engine.go

+ 2 - 2
authority/policy/engine.go

@@ -91,7 +91,7 @@ func (e *Engine) IsSSHCertificateAllowed(cert *ssh.Certificate) error {
 		// when no host policy engine is configured, but a user policy engine is
 		// configured, the host certificate is denied.
 		if e.sshHostPolicy == nil && e.sshUserPolicy != nil {
-			return errors.New("authority not allowed to sign ssh host certificates")
+			return errors.New("authority not allowed to sign ssh host certificates when ssh user certificate policy is active")
 		}
 
 		// return result of SSH host policy evaluation
@@ -100,7 +100,7 @@ func (e *Engine) IsSSHCertificateAllowed(cert *ssh.Certificate) error {
 		// 	when no user policy engine is configured, but a host policy engine is
 		// 	configured, the user certificate is denied.
 		if e.sshUserPolicy == nil && e.sshHostPolicy != nil {
-			return errors.New("authority not allowed to sign ssh user certificates")
+			return errors.New("authority not allowed to sign ssh user certificates when ssh host certificate policy is active")
 		}
 
 		// return result of SSH user policy evaluation