allow JWT parsing on large session policy based tokens (#17167)

This commit is contained in:
Harshavardhana
2023-05-09 00:53:08 -07:00
committed by GitHub
parent 57acacd5a7
commit a7f266c907
6 changed files with 19 additions and 11 deletions
+1 -1
View File
@@ -238,7 +238,7 @@ func (sts *stsAPIHandlers) AssumeRole(w http.ResponseWriter, r *http.Request) {
// The plain text that you use for both inline and managed session
// policies shouldn't exceed 2048 characters.
if len(sessionPolicyStr) > 2048 {
writeSTSErrorResponse(ctx, w, ErrSTSInvalidParameterValue, fmt.Errorf("Session policy shouldn't exceed 2048 characters"))
writeSTSErrorResponse(ctx, w, ErrSTSInvalidParameterValue, errSessionPolicyTooLarge)
return
}