Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for PolicyDBGet (0.21 sec)

  1. cmd/ftp-server-driver.go

    		if errors.Is(err, errNoSuchServiceAccount) {
    			lookupRes, groupDistNames, err := globalIAMSys.LDAPConfig.Bind(username, password)
    			if err != nil {
    				return false, err
    			}
    			ldapPolicies, _ := globalIAMSys.PolicyDBGet(lookupRes.NormDN, groupDistNames...)
    			return len(ldapPolicies) > 0, nil
    		}
    		return subtle.ConstantTimeCompare([]byte(sa.Credentials.SecretKey), []byte(password)) == 1, nil
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 14K bytes
    - Viewed (0)
  2. cmd/iam-store.go

    	return nil
    }
    
    // PolicyDBGet - fetches policies associated with the given user or group, and
    // additional groups if provided.
    func (store *IAMStoreSys) PolicyDBGet(name string, groups ...string) ([]string, error) {
    	if name == "" {
    		return nil, errInvalidArgument
    	}
    
    	cache := store.rlock()
    	defer store.runlock()
    
    	policies, _, err := cache.policyDBGet(store, name, false, false)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Oct 14 16:35:37 UTC 2024
    - 83.2K bytes
    - Viewed (0)
  3. cmd/iam.go

    	}))
    
    	return
    }
    
    // PolicyDBGet - gets policy set on a user or group. If a list of groups is
    // given, policies associated with them are included as well.
    func (sys *IAMSys) PolicyDBGet(name string, groups ...string) ([]string, error) {
    	if !sys.Initialized() {
    		return nil, errServerNotInitialized
    	}
    
    	return sys.store.PolicyDBGet(name, groups...)
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 29 16:01:48 UTC 2024
    - 74.6K bytes
    - Viewed (0)
  4. cmd/sts-handlers.go

    	claims[parentClaim] = user.AccessKey
    
    	// Validate that user.AccessKey's policies can be retrieved - it may not
    	// be in case the user is disabled.
    	if _, err = globalIAMSys.PolicyDBGet(user.AccessKey, user.Groups...); err != nil {
    		writeSTSErrorResponse(ctx, w, ErrSTSInvalidParameterValue, err)
    		return
    	}
    
    	secret, err := getTokenSigningKey()
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 01:29:20 UTC 2024
    - 33.9K bytes
    - Viewed (0)
  5. cmd/signature-v4-utils_test.go

    	if err != nil {
    		t.Fatalf("unable to attach policy to credential, %s", err)
    	}
    
    	time.Sleep(4 * time.Second)
    
    	policies, err := globalIAMSys.PolicyDBGet(ucreds.AccessKey)
    	if err != nil {
    		t.Fatalf("unable to get policy to credential, %s", err)
    	}
    
    	if len(policies) == 0 {
    		t.Fatal("no policies found")
    	}
    
    	if policies[0] != "consoleAdmin" {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 05 21:26:41 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  6. cmd/admin-handlers-idp-ldap.go

    		opts.claims[ldapUser] = targetUser // DN
    		opts.claims[ldapActualUser] = lookupResult.ActualDN
    
    		// Check if this user or their groups have a policy applied.
    		ldapPolicies, err := globalIAMSys.PolicyDBGet(targetUser, targetGroups...)
    		if err != nil {
    			writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    			return
    		}
    		if len(ldapPolicies) == 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Sep 21 11:35:40 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  7. cmd/sftp-server.go

    		if err != nil {
    			return nil, err
    		}
    
    	}
    
    	if lookupResult == nil {
    		return nil, errNoSuchUser
    	}
    
    	ldapPolicies, _ := globalIAMSys.PolicyDBGet(lookupResult.NormDN, targetGroups...)
    	if len(ldapPolicies) == 0 {
    		return nil, errSFTPUserHasNoPolicies
    	}
    
    	claims := make(map[string]interface{})
    	for attribKey, attribValue := range lookupResult.Attributes {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 20 20:00:29 UTC 2024
    - 16K bytes
    - Viewed (0)
  8. cmd/admin-handlers-users.go

    		return
    	}
    
    	var stsAccountPolicy policy.Policy
    
    	if sessionPolicy != nil {
    		stsAccountPolicy = *sessionPolicy
    	} else {
    		policiesNames, err := globalIAMSys.PolicyDBGet(stsAccount.ParentUser, stsAccount.Groups...)
    		if err != nil {
    			writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    			return
    		}
    		if len(policiesNames) == 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 03 23:11:02 UTC 2024
    - 85.1K bytes
    - Viewed (0)
Back to top