Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for IsServiceAccount (0.41 sec)

  1. cmd/iam-store.go

    		// Only consider service account or STS credentials with
    		// non-empty session tokens.
    		if !(cred.IsServiceAccount() || cred.IsTemp()) ||
    			cred.SessionToken == "" {
    			continue
    		}
    
    		var (
    			err    error
    			claims map[string]interface{} = cred.Claims
    		)
    
    		if cred.IsServiceAccount() {
    			claims, err = getClaimsFromTokenWithSecret(cred.SessionToken, cred.SecretKey)
    		} else if cred.IsTemp() {
    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. internal/auth/credentials.go

    func (cred Credentials) IsTemp() bool {
    	return cred.SessionToken != "" && !cred.Expiration.IsZero() && !cred.Expiration.Equal(timeSentinel)
    }
    
    // IsServiceAccount - returns whether credential is a service account or not
    func (cred Credentials) IsServiceAccount() bool {
    	_, ok := cred.Claims[iamPolicyClaimNameSA]
    	return cred.ParentUser != "" && ok
    }
    
    // IsValid - returns whether credential is valid or not.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  3. cmd/iam.go

    	return false, "", nil
    }
    
    // IsServiceAccount - returns if given key is a service account
    func (sys *IAMSys) IsServiceAccount(name string) (bool, string, error) {
    	if !sys.Initialized() {
    		return false, "", errServerNotInitialized
    	}
    
    	u, found := sys.store.GetUser(name)
    	if !found {
    		return false, "", errNoSuchUser
    	}
    	cred := u.Credentials
    	if cred.IsServiceAccount() {
    		return true, cred.ParentUser, nil
    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)
  4. cmd/auth-handler.go

    	}
    
    	if token == "" && cred.IsTemp() && !cred.IsServiceAccount() {
    		// Temporary credentials should always have x-amz-security-token
    		return nil, ErrInvalidToken
    	}
    
    	if token != "" && !cred.IsTemp() {
    		// x-amz-security-token should not present for static credentials.
    		return nil, ErrInvalidToken
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 26K bytes
    - Viewed (0)
  5. cmd/bucket-policy.go

    	currTime := UTCNow()
    
    	var (
    		username = cred.AccessKey
    		claims   = cred.Claims
    		groups   = cred.Groups
    	)
    
    	if cred.IsTemp() || cred.IsServiceAccount() {
    		// For derived credentials, check the parent user's permissions.
    		username = cred.ParentUser
    	}
    
    	principalType := "Anonymous"
    	if username != "" {
    		principalType = "User"
    		if len(claims) > 0 {
    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-users.go

    	if exists && (user.Credentials.IsTemp() || user.Credentials.IsServiceAccount()) {
    		// Updating STS credential is not allowed, and this API does not
    		// support updating service accounts.
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAddUserInvalidArgument), r.URL)
    		return
    	}
    
    	if (cred.IsTemp() || cred.IsServiceAccount()) && cred.ParentUser == accessKey {
    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)
  7. cmd/admin-handlers-idp-ldap.go

    	// account or STS account):
    	requestorUser := cred.AccessKey
    	requestorParentUser := cred.AccessKey
    	requestorGroups := cred.Groups
    	requestorIsDerivedCredential := false
    	if cred.IsServiceAccount() || cred.IsTemp() {
    		requestorParentUser = cred.ParentUser
    		requestorIsDerivedCredential = true
    	}
    
    	// Check if we are creating svc account for request sender.
    	isSvcAccForRequestor := false
    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)
  8. cmd/sts-handlers.go

    	if s3Err != ErrNone {
    		return auth.Credentials{}, s3Err
    	}
    
    	// Temporary credentials or Service accounts cannot generate further temporary credentials.
    	if user.IsTemp() || user.IsServiceAccount() {
    		return auth.Credentials{}, ErrAccessDenied
    	}
    
    	// Session tokens are not allowed in STS AssumeRole requests.
    	if getSessionToken(r) != "" {
    		return auth.Credentials{}, ErrAccessDenied
    	}
    
    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)
  9. cmd/site-replication.go

    			continue
    		}
    
    		peerName := info.Sites[dID].Name
    
    		u, ok := globalIAMSys.GetUser(ctx, user)
    		if !ok {
    			continue
    		}
    		creds := u.Credentials
    		if creds.IsServiceAccount() {
    			claims, err := globalIAMSys.GetClaimsForSvcAcc(ctx, creds.AccessKey)
    			if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 184.1K bytes
    - Viewed (1)
Back to top