Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for policyBytes (0.09 sec)

  1. cmd/admin-handlers-users_test.go

     ]
    }`)
    
    	err := s.adm.AddCannedPolicy(ctx, policy1, policyBytes)
    	if err != nil {
    		c.Fatalf("policy add error: %v", err)
    	}
    
    	err = s.adm.AddCannedPolicy(ctx, policy2, newPolicyBytes)
    	if err != nil {
    		c.Fatalf("policy add error: %v", err)
    	}
    
    	// 2. Verify that policy json is validated by server
    	invalidPolicyBytes := policyBytes[:len(policyBytes)-1]
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 22 00:33:43 UTC 2024
    - 47.3K bytes
    - Viewed (0)
  2. cmd/sts-handlers_test.go

    	}
    
    	// Create policy
    	policy := "mypolicy-username"
    	policyBytes := []byte(`{
     "Version": "2012-10-17",
     "Statement": [
      {
       "Effect": "Allow",
       "Action": [
        "s3:*"
       ],
       "Resource": [
        "arn:aws:s3:::${aws:username}-*"
       ]
      }
     ]
    }`)
    	err = s.adm.AddCannedPolicy(ctx, policy, policyBytes)
    	if err != nil {
    		c.Fatalf("policy add error: %v", err)
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 10 23:40:37 UTC 2024
    - 97.1K bytes
    - Viewed (0)
  3. cmd/admin-handlers-users-race_test.go

    	// Create a policy policy
    	policy := "mypolicy"
    	policyBytes := []byte(fmt.Sprintf(`{
     "Version": "2012-10-17",
     "Statement": [
      {
       "Effect": "Allow",
       "Action": [
        "s3:PutObject",
        "s3:GetObject",
        "s3:ListBucket"
       ],
       "Resource": [
        "arn:aws:s3:::%s/*"
       ]
      }
     ]
    }`, bucket))
    	err = s.adm.AddCannedPolicy(ctx, policy, policyBytes)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 28 09:06:25 UTC 2024
    - 4K bytes
    - Viewed (0)
  4. cmd/sftp-server_test.go

    	policy := "mypolicy"
    	policyBytes := []byte(`{
     "Version": "2012-10-17",
     "Statement": [
      {
       "Effect": "Allow",
       "Action": [
        "s3:PutObject",
        "s3:GetObject",
        "s3:ListBucket"
       ],
       "Resource": [
        "arn:aws:s3:::BUCKET/*"
       ]
      }
     ]
    }`)
    
    	err := s.adm.AddCannedPolicy(ctx, policy, policyBytes)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 28 09:06:25 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  5. cmd/bucket-handlers_test.go

    	rec := httptest.NewRecorder()
    	req, err := newTestSignedRequestV4(http.MethodPut, getPutPolicyURL("", bucketName), int64(len(policyBytes)), bytes.NewReader(policyBytes),
    		credentials.AccessKey, credentials.SecretKey, nil)
    	if err != nil {
    		t.Fatalf("Failed to create HTTP request for PutBucketPolicyHandler: <ERROR> %v", err)
    	}
    	apiRouter.ServeHTTP(rec, req)
    	if rec.Code != http.StatusNoContent {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 39.8K bytes
    - Viewed (0)
  6. cmd/iam.go

    	sp, spok := jwtClaims.Lookup(policy.SessionPolicyName)
    	if ptok && spok && pt == embeddedPolicyType {
    		policyBytes, err := base64.StdEncoding.DecodeString(sp)
    		if err != nil {
    			return UserIdentity{}, nil, err
    		}
    		embeddedPolicy, err = policy.ParseConfig(bytes.NewReader(policyBytes))
    		if err != nil {
    			return UserIdentity{}, nil, err
    		}
    	}
    
    	return sa, embeddedPolicy, nil
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 29 16:01:48 UTC 2024
    - 74.6K bytes
    - Viewed (0)
  7. cmd/bucket-handlers.go

    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    	}
    
    	// Handle policy if it is set.
    	if len(policyBytes) > 0 {
    		postPolicyForm, err := parsePostPolicyForm(bytes.NewReader(policyBytes))
    		if err != nil {
    			errAPI := errorCodes.ToAPIErr(ErrPostPolicyConditionInvalidFormat)
    			errAPI.Description = fmt.Sprintf("%s '(%s)'", errAPI.Description, err)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 12:24:04 UTC 2024
    - 63.4K bytes
    - Viewed (0)
Back to top