Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for DecryptData (0.26 sec)

  1. cmd/config.go

    			}
    			if withData {
    				data, err := readConfig(ctx, objAPI, obj.Name)
    				if err != nil {
    					// ignore history file if not readable.
    					continue
    				}
    
    				data, err = decryptData(data, obj.Name)
    				if err != nil {
    					// ignore history file that cannot be loaded.
    					continue
    				}
    
    				cfgEntry.Data = string(data)
    			}
    			configHistory = append(configHistory, cfgEntry)
    			count--
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Aug 23 10:07:06 GMT 2023
    - 6K bytes
    - Viewed (0)
  2. cmd/tier-handlers.go

    	ctx := r.Context()
    
    	objAPI, cred := validateAdminReq(ctx, w, r, policy.SetTierAction)
    	if objAPI == nil {
    		return
    	}
    
    	password := cred.SecretKey
    	reqBytes, err := madmin.DecryptData(password, io.LimitReader(r.Body, r.ContentLength))
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminConfigBadJSON, err), r.URL)
    		return
    	}
    
    	var cfg madmin.TierConfig
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 15 19:52:44 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  3. cmd/iam-etcd-store.go

    		})
    		if err != nil {
    			return err
    		}
    	}
    	return saveKeyEtcd(ctx, ies.client, itemPath, data, opts...)
    }
    
    func getIAMConfig(item interface{}, data []byte, itemPath string) error {
    	data, err := decryptData(data, itemPath)
    	if err != nil {
    		return err
    	}
    	json := jsoniter.ConfigCompatibleWithStandardLibrary
    	return json.Unmarshal(data, item)
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  4. cmd/config-encrypted_test.go

    		success bool
    	}{
    		{edata1, cred1, true},
    		{edata2, cred2, true},
    		{data, cred1, false},
    	}
    
    	for _, test := range tests {
    		t.Run("", func(t *testing.T) {
    			ddata, err := madmin.DecryptData(test.cred.String(), bytes.NewReader(test.edata))
    			if err != nil && test.success {
    				t.Errorf("Expected success, saw failure %v", err)
    			}
    			if err == nil && !test.success {
    				t.Error("Expected failure, saw success")
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 20 00:53:08 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  5. cmd/admin-handlers-config-kv.go

    		// More than maxConfigSize bytes were available
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigTooLarge), r.URL)
    		return
    	}
    
    	password := cred.SecretKey
    	kvBytes, err := madmin.DecryptData(password, io.LimitReader(r.Body, r.ContentLength))
    	if err != nil {
    		adminLogIf(ctx, err)
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigBadJSON), r.URL)
    		return
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  6. cmd/iam-object-store.go

    		})
    		if err != nil {
    			return err
    		}
    	}
    	return saveConfig(ctx, iamOS.objAPI, objPath, data)
    }
    
    func decryptData(data []byte, objPath string) ([]byte, error) {
    	if utf8.Valid(data) {
    		return data, nil
    	}
    
    	pdata, err := madmin.DecryptData(globalActiveCred.String(), bytes.NewReader(data))
    	if err == nil {
    		return pdata, nil
    	}
    	if GlobalKMS != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 05 21:26:41 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  7. cmd/config-migrate.go

    		if err != nil {
    			// when config.json is not found, then we freshly initialize.
    			if errors.Is(err, errConfigNotFound) {
    				return newServerCfg()
    			}
    			return nil, err
    		}
    
    		data, err = decryptData(data, configFile)
    		if err != nil {
    			return nil, err
    		}
    
    		newCfg, err := readServerConfig(GlobalContext, objAPI, data)
    		if err == nil {
    			return newCfg, nil
    		}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Oct 18 18:05:24 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  8. cmd/admin-handlers-idp-config.go

    	if contentType != "application/octet-stream" {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrBadRequest), r.URL)
    		return
    	}
    
    	password := cred.SecretKey
    	reqBytes, err := madmin.DecryptData(password, io.LimitReader(r.Body, r.ContentLength))
    	if err != nil {
    		adminLogIf(ctx, err)
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigBadJSON), r.URL)
    		return
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  9. cmd/admin-handlers-idp-ldap.go

    		return
    	}
    
    	isAttach := operation == "attach"
    
    	// Validate API arguments in body.
    	password := cred.SecretKey
    	reqBytes, err := madmin.DecryptData(password, io.LimitReader(r.Body, r.ContentLength))
    	if err != nil {
    		adminLogIf(ctx, err)
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigBadJSON), r.URL)
    		return
    	}
    
    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)
  10. cmd/admin-handlers-users.go

    		// More than maxConfigSize bytes were available
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigTooLarge), r.URL)
    		return
    	}
    
    	password := cred.SecretKey
    	configBytes, err := madmin.DecryptData(password, io.LimitReader(r.Body, r.ContentLength))
    	if err != nil {
    		adminLogIf(ctx, err)
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigBadJSON), 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)
Back to top