Browse Source

fix(sts): use STSErrSTSNotReady when LDAP provider is missing

pull/8003/head
Chris Lu 10 hours ago
parent
commit
08f00dfb1f
  1. 2
      weed/s3api/s3api_sts.go

2
weed/s3api/s3api_sts.go

@ -379,7 +379,7 @@ func (h *STSHandlers) handleAssumeRoleWithLDAPIdentity(w http.ResponseWriter, r
if ldapProvider == nil { if ldapProvider == nil {
glog.V(2).Infof("AssumeRoleWithLDAPIdentity: no LDAP provider configured") glog.V(2).Infof("AssumeRoleWithLDAPIdentity: no LDAP provider configured")
h.writeSTSErrorResponse(w, r, STSErrAccessDenied,
h.writeSTSErrorResponse(w, r, STSErrSTSNotReady,
fmt.Errorf("no LDAP provider configured - please add an LDAP provider to IAM configuration")) fmt.Errorf("no LDAP provider configured - please add an LDAP provider to IAM configuration"))
return return
} }

Loading…
Cancel
Save