@@ -55,12 +55,7 @@ func registerSessionHandlers(api *operations.ConsoleAPI) {
55
55
}
56
56
57
57
func getClaimsFromToken (sessionToken string ) (map [string ]interface {}, error ) {
58
- jp := new (jwtgo.Parser )
59
- // nolint:staticcheck // ignore SA1019
60
- jp .ValidMethods = []string {
61
- "RS256" , "RS384" , "RS512" , "ES256" , "ES384" , "ES512" ,
62
- "RS3256" , "RS3384" , "RS3512" , "ES3256" , "ES3384" , "ES3512" ,
63
- }
58
+ jp := jwtgo .NewParser ()
64
59
var claims jwtgo.MapClaims
65
60
_ , _ , err := jp .ParseUnverified (sessionToken , & claims )
66
61
if err != nil {
@@ -115,7 +110,7 @@ func getSessionResponse(ctx context.Context, session *models.Principal) (*models
115
110
116
111
// All calls from console are signature v4.
117
112
condition .S3SignatureVersion .Name (): {"AWS4-HMAC-SHA256" },
118
- // All calls from console are signature v4.
113
+ // All calls from console use header-based authentication
119
114
condition .S3AuthType .Name (): {"REST-HEADER" },
120
115
// This is usually empty, may be set some times (rare).
121
116
condition .S3LocationConstraint .Name (): {GetMinIORegion ()},
@@ -237,15 +232,6 @@ func getSessionResponse(ctx context.Context, session *models.Principal) (*models
237
232
resourcePermissions [key ] = resourceActions
238
233
239
234
}
240
- serializedPolicy , err := json .Marshal (policy )
241
- if err != nil {
242
- return nil , ErrorWithContext (ctx , err , ErrInvalidSession )
243
- }
244
- var sessionPolicy * models.IamPolicy
245
- err = json .Unmarshal (serializedPolicy , & sessionPolicy )
246
- if err != nil {
247
- return nil , ErrorWithContext (ctx , err )
248
- }
249
235
250
236
// environment constants
251
237
var envConstants models.EnvironmentConstants
0 commit comments