Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for getConditionValues (0.23 sec)

  1. cmd/auth-handler.go

    		return cred, s3Err
    	}
    	if globalIAMSys.IsAllowed(policy.Args{
    		AccountName:     cred.AccessKey,
    		Groups:          cred.Groups,
    		Action:          policy.Action(action),
    		ConditionValues: getConditionValues(r, "", cred),
    		IsOwner:         owner,
    		Claims:          cred.Claims,
    	}) {
    		// Request is allowed return the appropriate access key.
    		return cred, ErrNone
    	}
    
    	return cred, ErrAccessDenied
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 26K bytes
    - Viewed (0)
  2. cmd/admin-handlers-users.go

    		checkDenyOnly = true
    	}
    
    	if !globalIAMSys.IsAllowed(policy.Args{
    		AccountName:     cred.AccessKey,
    		Groups:          cred.Groups,
    		Action:          policy.GetUserAdminAction,
    		ConditionValues: getConditionValues(r, "", cred),
    		IsOwner:         owner,
    		Claims:          cred.Claims,
    		DenyOnly:        checkDenyOnly,
    	}) {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAccessDenied), r.URL)
    		return
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 77.3K bytes
    - Viewed (0)
  3. cmd/s3-zip-handlers.go

    			//   status code 403 ("access denied") error.`
    			if globalPolicySys.IsAllowed(policy.BucketPolicyArgs{
    				Action:          policy.ListBucketAction,
    				BucketName:      bucket,
    				ConditionValues: getConditionValues(r, "", auth.AnonymousCredentials),
    				IsOwner:         false,
    			}) {
    				_, err = getObjectInfo(ctx, bucket, zipPath, opts)
    				if toAPIError(ctx, err).Code == "NoSuchKey" {
    					s3Error = ErrNoSuchKey
    				}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 09 10:41:25 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  4. cmd/bucket-handlers.go

    		BucketName:      bucket,
    		ConditionValues: getConditionValues(r, "", auth.AnonymousCredentials),
    		IsOwner:         false,
    	})
    
    	// Check if anonymous (non-owner) has access to upload objects.
    	writable := globalPolicySys.IsAllowed(policy.BucketPolicyArgs{
    		Action:          policy.PutObjectAction,
    		BucketName:      bucket,
    		ConditionValues: getConditionValues(r, "", auth.AnonymousCredentials),
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 16:27:27 GMT 2024
    - 61.6K bytes
    - Viewed (0)
  5. cmd/bucket-policy.go

    	m := make(map[string][]string)
    	if d := r.Form.Get("DurationSeconds"); d != "" {
    		m["DurationSeconds"] = []string{d}
    	}
    	return m
    }
    
    func getConditionValues(r *http.Request, lc string, cred auth.Credentials) map[string][]string {
    	currTime := UTCNow()
    
    	var (
    		username = cred.AccessKey
    		claims   = cred.Claims
    		groups   = cred.Groups
    	)
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 8K bytes
    - Viewed (0)
  6. cmd/admin-handlers-idp-ldap.go

    		if !globalIAMSys.IsAllowed(policy.Args{
    			AccountName:     cred.AccessKey,
    			Groups:          cred.Groups,
    			Action:          policy.ListServiceAccountsAdminAction,
    			ConditionValues: getConditionValues(r, "", cred),
    			IsOwner:         owner,
    			Claims:          cred.Claims,
    		}) {
    			writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAccessDenied), r.URL)
    			return
    		}
    	} else {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  7. cmd/metrics.go

    		if !globalIAMSys.IsAllowed(policy.Args{
    			AccountName:     cred.AccessKey,
    			Groups:          cred.Groups,
    			Action:          policy.PrometheusAdminAction,
    			ConditionValues: getConditionValues(r, "", cred),
    			IsOwner:         owner,
    			Claims:          cred.Claims,
    		}) {
    			if ok {
    				tc.FuncName = "handler.MetricsAuth"
    				tc.ResponseRecorder.LogErrBody = true
    			}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 02 06:48:36 GMT 2024
    - 16.9K bytes
    - Viewed (0)
  8. cmd/object-handlers.go

    			//   status code 403 ("access denied") error.`
    			if globalPolicySys.IsAllowed(policy.BucketPolicyArgs{
    				Action:          policy.ListBucketAction,
    				BucketName:      bucket,
    				ConditionValues: getConditionValues(r, "", auth.AnonymousCredentials),
    				IsOwner:         false,
    			}) {
    				_, err = getObjectInfo(ctx, bucket, object, opts)
    				if toAPIError(ctx, err).Code == "NoSuchKey" {
    					s3Error = ErrNoSuchKey
    				}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 125K bytes
    - Viewed (0)
Back to top