Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for policyDBGet (0.22 sec)

  1. 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)
    	if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Apr 27 10:04:10 GMT 2024
    - 75.2K bytes
    - Viewed (2)
  2. cmd/ftp-server-driver.go

    		if errors.Is(err, errNoSuchServiceAccount) {
    			ldapUserDN, groupDistNames, err := globalIAMSys.LDAPConfig.Bind(username, password)
    			if err != nil {
    				return false, err
    			}
    			ldapPolicies, _ := globalIAMSys.PolicyDBGet(ldapUserDN, groupDistNames...)
    			return len(ldapPolicies) > 0, nil
    		}
    		return subtle.ConstantTimeCompare([]byte(sa.Credentials.SecretKey), []byte(password)) == 1, nil
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 12:23:42 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  3. cmd/sftp-server.go

    					targetUser, targetGroups, err := globalIAMSys.LDAPConfig.Bind(c.User(), string(pass))
    					if err != nil {
    						return nil, err
    					}
    					ldapPolicies, _ := globalIAMSys.PolicyDBGet(targetUser, targetGroups...)
    					if len(ldapPolicies) == 0 {
    						return nil, errAuthentication
    					}
    					return &ssh.Permissions{
    						CriticalOptions: map[string]string{
    							ldapUser:  targetUser,
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  4. 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...)
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 21:28:16 GMT 2024
    - 71.1K bytes
    - Viewed (1)
  5. 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
    	}
    
    	if len(sessionPolicyStr) > 0 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 18:36:18 GMT 2024
    - 34.7K bytes
    - Viewed (2)
  6. 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" {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 05 21:26:41 GMT 2024
    - 14.3K bytes
    - Viewed (0)
  7. 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 {
    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)
Back to top