Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for AddCannedPolicy (1.21 sec)

  1. cmd/admin-handlers-users_test.go

       "Action": [
        "s3:ListBucket"
       ],
       "Resource": [
        "arn:aws:s3:::testbucket"
       ]
      }
     ]
    }`)
    
    	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
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 47.4K bytes
    - Viewed (0)
  2. cmd/sts-handlers_test.go

     "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)
    	}
    
    	if err = s.adm.AddUser(ctx, "dillon", "dillon-123"); err != nil {
    		c.Fatalf("policy add error: %v", err)
    	}
    
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 100.2K bytes
    - Viewed (1)
  3. cmd/admin-handlers-users-race_test.go

       "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 {
    		c.Fatalf("policy add error: %v", err)
    	}
    
    	userCount := 50
    	accessKeys := make([]string, userCount)
    	secretKeys := make([]string, userCount)
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 4K bytes
    - Viewed (0)
  4. cmd/sftp-server_test.go

       "Action": [
        "s3:PutObject",
        "s3:GetObject",
        "s3:ListBucket"
       ],
       "Resource": [
        "arn:aws:s3:::BUCKET/*"
       ]
      }
     ]
    }`)
    
    	err := s.adm.AddCannedPolicy(ctx, policy, policyBytes)
    	if err != nil {
    		c.Fatalf("policy add error: %v", err)
    	}
    
    	{
    		userDN := "uid=dillon,ou=people,ou=swengg,dc=min,dc=io"
    		userReq := madmin.PolicyAssociationReq{
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Thu Feb 27 18:43:32 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  5. cmd/admin-router.go

    		}
    
    		// -- IAM APIs --
    
    		// Add policy IAM
    		adminRouter.Methods(http.MethodPut).Path(adminVersion+"/add-canned-policy").HandlerFunc(adminMiddleware(adminAPI.AddCannedPolicy, traceAllFlag)).Queries("name", "{name:.*}")
    
    		// Add user IAM
    		adminRouter.Methods(http.MethodGet).Path(adminVersion + "/accountinfo").HandlerFunc(adminMiddleware(adminAPI.AccountInfoHandler, traceAllFlag))
    
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Wed Apr 16 07:34:24 UTC 2025
    - 26.7K bytes
    - Viewed (0)
  6. cmd/admin-handlers-users.go

    		Type:      madmin.SRIAMItemPolicy,
    		Name:      policyName,
    		UpdatedAt: UTCNow(),
    	}))
    }
    
    // AddCannedPolicy - PUT /minio/admin/v3/add-canned-policy?name=<policy_name>
    func (a adminAPIHandlers) AddCannedPolicy(w http.ResponseWriter, r *http.Request) {
    	ctx := r.Context()
    
    	objectAPI, _ := validateAdminReq(ctx, w, r, policy.CreatePolicyAdminAction)
    	if objectAPI == nil {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 90.6K bytes
    - Viewed (0)
Back to top