Commit Graph

278 Commits

Author SHA1 Message Date
corgiboy 126d4017a0
auth: check username/password is empty string (#1402)
* auth: check username/password is empty string

* auth: modifiy userinfo verification on create/update
2021-03-22 21:05:07 +08:00
Coderzc ee742faabd
auth fix: init store password must be not empty (#1400)
* auth fix: init store the admin password can't be empty
2021-03-22 18:54:16 +08:00
Jermy Li 3d739616e4
Transfer permission of some operations from STATUS to ANY (#1391)
Change-Id: I7ca443973ff27f45c4d61ac3f4b4c39075d70ba2
2021-03-15 14:28:05 +08:00
Jermy Li 314fd8a6c9
support: invalid cache through rpc (#1357)
* support: invalid cache through rpc
* add RpcServiceConfig* interfaces
* add FanoutCluster to broadcast reuqest
* fix GraphManager.close() is not called by HttpServer.DESTROY_FINISHED
* notify cache with Id[] arg to avoid too many events
* improve perf of raft notify-cache
* only enable cache-rpc service for shared storage
* check raft mode can only be enabled if non-shared store

Change-Id: I3fe18cd8c893a84a56fb66df651b78c5e0fe5f4b
2021-03-11 21:20:46 +08:00
Linary 09c40baca2
Fix AuthManager will find other nodes when init store (#1381)
Change-Id: I4437c89da5290a14a8233c082bd9922714a027b9
2021-03-11 12:08:30 +08:00
Jermy Li 5d48a93051
auth fix: schema operations should rely on specific required-permission (#1387)
Change-Id: Iaa138ec23e779b4d2ca87a3bf46732bbfaa3bc1b
2021-03-11 11:54:40 +08:00
xuliguov5 17ac1956d0
Consistent hash load balancing is done according to the method, the creator of auth element is null by tostring method. (#1385) 2021-03-10 19:10:10 +08:00
Jermy Li 8bda4519a5
auth fix: don't ignore permission exception in parseEntry() (#1380)
Change-Id: I115127904df3e4d3a18ded6b4638bdbde87bd2a5
2021-03-09 15:08:53 +08:00
Jermy Li fb108f14c6
refactor UserManager to AuthManager (#1363)
* rename UserElement to AuthElement

Change-Id: Ic4d087115cb1d8a5898d3abc8fef5a23947ff18b
2021-03-03 19:44:27 +08:00
xuliguov5 964daf122e
fix auth: truncate with SecurityException & clear with Invalid user name admin (#1365)
* fix truncate cause SecurityException
* fix clear data cause Invalid user name admin
2021-03-03 15:40:03 +08:00
Jermy Li 949ff53069
auth: fix resource type NONE and add resource type SCHEMA (#1362)
* let NONE allowed by any permission
* add ResourceType.SCHEMA which can represent any schema resource
* not set STATUS to be represented by other resource

Change-Id: Ib6281cb3dfdc917ecac0c9450f7919e3898f73db
2021-03-02 14:50:11 +08:00
Linary 98cf2b954c
Fix NPE when init admin user (#1360)
* Set option initing-store to be true when init-store

Change-Id: Ic8cb27ca27683a1e20c4ec5cfd0df77b2639c452
2021-03-02 11:24:33 +08:00
xuliguov5 7f63b57043
Add multi-node auth information sharing function (#1350)
* Add multi-node auth information sharing function
* Exclude sofa rpc and other projects with the same jar package, and Optimize some code.
2021-02-10 17:20:01 +08:00
Jermy Li c3f81f54de
auth: add resource metrics_read (#1355)
* auth: add resource metrics_read
* auth: keep single proxy instead of multi proxy for each graph
* not allowed to call HugeFactory.open() by gremlin
* don't shield HugeUser,RolePermission,HugeResource due to rpc access

Change-Id: Iba110199addbfae220616ed69754dcac82fbc848
2021-02-08 20:52:23 +08:00
Jermy Li ec94c07446
auth-delete and role-get APIs need to check if the graph exists (#1338)
Change-Id: I5b76437bd68b1dbbe7bda04c796b9b815104fe20
2021-01-30 16:52:19 +08:00
Jermy Li 1aac00638d
vertex/edge get api use queryVertex/queryEdge instead of iterator (#1345)
also improve some code

Change-Id: I0048c45c9a00bdc81a1b55129a6589043733ef9d
2021-01-30 16:50:54 +08:00
zhoney 59a680c9b3
Support graph read mode and set list aggregate property (#1332)
* add GraphReadMode
* add ReadFrequency
* support aggregate type set and list
* upgrade api version to 0.59

Change-Id: I5db5a1bc91c14b659bbba27c2ad15b40245bc62a
2021-01-14 22:11:10 +08:00
zhoney bc90cf9e0a
add config for whether encoding number of primary keys (#1323)
fixed: hugegraph/hugegraph-tools #78

Change-Id: I07e113b7f29e0d38e5d362663046c755ea8dc751
2021-01-07 14:36:39 +08:00
Linary 717d93ef20
Check if master node before schedule gremlin job (#1314)
Change-Id: I9ef3e1f3f4d30ae8b252a53c148b0b0759eff472
2020-12-28 16:23:54 +08:00
zhoney aa6f6380eb
fix personal/neighbor rank id from String to Object (#1310)
Change-Id: I2a0e42d199b3858facc900dbb745b8a5f2ef37da
2020-12-23 22:01:32 +08:00
zhoney f6f44bb24e
export new implemented oltp traversals (#1289)
* export new implemented oltp traversals
* move EdgeStep, WeightedEdgeStep and RepeatEdgeStep to steps package

Change-Id: I0e501dcffd7c38dbd6afe76e82000935160bee36
2020-12-09 19:54:44 +08:00
Linary 87d7f412c2
Check param capacity for NeighborRankTraverser Step (#1290)
Change-Id: Ibb923021539105add400640ed495a28a12457f28
2020-12-09 17:26:04 +08:00
zhoney eb062b2b02
fix weighted shortest path result not stable (#1280)
Change-Id: Ic97d8c92bd97d6203b7b366a2c6e2f661932e05f
2020-11-25 19:08:44 +08:00
Linary 9279bd721d
Write snapshot explicity after truncate backend (#1275)
Change-Id: Idf3dad865c9baf181227ad063233bef2b548b2d8
2020-11-23 14:02:45 +08:00
Linary b0afc8c168
Remove restserver.protocol option (#1272)
Change-Id: I57a90e5a3254e22f29243beebf81751182d15534
2020-11-19 17:44:18 +08:00
Jermy Li 85065a3b80
improve SSL options (#1260)
Change-Id: I499479ebfda9dc5439b09243b3ce445fadefa287
2020-11-17 16:57:23 +08:00
shzcore f12ab6ca64
add ssl certificate file and default password (#1254) 2020-11-11 19:33:58 +08:00
zhoney ca9a61a92f
unify TinkerPop spell (#1252)
Change-Id: I11475257970b0cb845f3b0bb9621e4901ccf8c6d
2020-11-11 13:19:52 +08:00
zhoney 2f6147f3fd
Fix weighted shortest path NPE (#1250)
* fix NPE of weighted shortest path if no results
* add check for skip degree > 80w
* add NO_LIMIT check in adjacentEdges()
* fix template path error

Change-Id: Ic0fba1a0dea58b322cf864ac7212e0d311199b6f
2020-11-10 21:26:08 +08:00
Jermy Li 645f1a363e
cleanup warning for 0.11.2 (#1243)
Change-Id: Ie6c1eb7a8e10453672541671d3e74c151518a77f
2020-11-05 17:27:33 +08:00
Linary 76d0cb37f8
Support raft node control (#1137)
* Support raft node control
* expose RaftNodeManager instead of StoreProvider
* manage leader info by ourselves
* add list peers API
* define rpcForwarder to handle forward request
* Let raft api return with group
* add group paramter in RaftAPI

Change-Id: I90e2bc97d3aaa1f78208d07fb71dbfcdef991c93
2020-10-30 18:53:06 +08:00
zhoney d5cc79b329
Custom kout/kneighbor, multi-node-shortest-path, jaccard-similar and template paths (#1174)
* Add customized kout/kneighbor, template path, multi-node-shortest-path and jaccard similar
* fix OLTP algorithm not check if source/target vertex exist (#1156)
* support customized kout and kneighbor
* support multi node shortest path API
* support template paths api
* support jaccard similars find oltp api
* use multi-thread to accelerate
* big depth and both direction use multi threads, otherwise single threead
* fix shortest path api NLP
* Szzq paths improve (#51)
* template path use concurrent HashSet to save paths in concurrent mode
* support property filter for paths api
* fix configuration not supported with auth (#55)
* template path supports repeat times args (#57)
* paths supports nearest args
* oltp multiple threads reuse
* add multiple thread depth config
* fix group perperty can't be empty
* upgrade api version to 58
* move customized kout/kneighbor to kout/kneighbor
* move jaccard similar into jaccard similarity
* fix kout/kneighbor withVertex not work
* rebase ramtable
* extract common traverser from template paths traversers
* extract path traverser for template paths and collection paths
* normalize traverser

implements: #1173

Change-Id: I85aa1d4274554d65f85a0deb7ac596e65dbb503b
2020-10-28 17:58:45 +08:00
Linary 9babdae84a
Add rate_limit.read to limit query rate (#1158)
* Add read rate limiter to limit query rate on vertices/edges
* add checkInterrupted() after rate limit

Change-Id: I6d620270937e425b417cbaaedd1d67dfb058791f
2020-09-03 01:17:26 +08:00
Jermy Li a3d583fbcc
improve vertex/edge delete perf (#1150)
Change-Id: I3074e6fbd90b0f9ca35d7369f3e451a489076a4d
2020-08-31 22:04:59 +08:00
Jermy Li 92617ca2ed
fix delete/read without READ permission throw 'no such id' (#1134)
fix delete/read without READ permission throw 'no such id'
this patch define delete/update requires read permission, an ForbiddenException
is thrown when there is no read permission instead 'No such vertex with id: xx'.
fix rest api depend on gremlin permission, updated to not depend on gremlin.
fix expired time is inaccurate due to call now() before tx open()
refactor edgesOfVertex() to unified entrance with EdgeStep
Change-Id: I0d8cfd3d4b7d8ccaf10721249f8d9f86b53b442e
fix: hugegraph-test-811, hugegraph-test-837, hugegraph-test-846
2020-08-07 19:54:58 +08:00
Jermy Li 32adab5a91
fix tasks are sometimes submitted twice (#1130)
* fix tasks are sometimes submitted twice
  also fix server id NPE when truncate with temp graph
* fix rocksdb conflict: no setMaxSubcompactions()
  NoSuchMethodError: org.rocksdb.DBOptionsInterface.setMaxSubcompactions
* fix warnings

Change-Id: Ia9d509c57422eb27b11797aa3567a83101610080
2020-08-03 19:39:28 +08:00
Linary 52d2eacc81
Fix queryByRaft readIndex failed (#1121)
* ReadIndex request rejected because leader has not committed any log entry at its term
* Add wait store started logic
* use polling to wait heartbeat

Change-Id: I1f191a261979a9ffe232827d0c639642547ba5b7
2020-07-31 19:13:23 +08:00
zhoney 5f60a29e1f
add entrance for pagerank and wcc (#1114)
* add entrance for pagerank and wcc
* format all args to "-C key=value"

Change-Id: I9d0a35ac8ea2cd7f1c9b6cf86a62a06e68d6498d
2020-07-28 22:26:05 +08:00
Jermy Li 4474a4a83b
fix auth: init-store no auth context and graphs-list with non STATUS-READ permission (#1115)
* fix: Missing authentication context

because main thread don't set admin-context before init-store, then
scheduler thread can't save anything

* fix graphs-list api return results with non STATUS-READ permission

Change-Id: I6a05e06509caf0ea525fb57ca8352e53ced584aa
2020-07-28 19:57:59 +08:00
Linary df1d89bb10
Fix vertex number id serailized in string (#1109)
* Fix vertex number id serailized in string

* let create batch api return string

Change-Id: I61392376301dff20463dfc5ba3324d1722de9af9
2020-07-28 10:52:45 +08:00
zhoney 3cac836005
add rebuild(boolean) for index label create (#1106)
implements: #1105

Change-Id: I6d399bf0d90f6c91ab64c2bdd01edcb4a35c0a50
2020-07-24 17:55:52 +08:00
zhoney 530707d4e9
Async job schedule (#1030)
* schedule/cancel/restore task async
* change cassandra ttl type from int to long
* wait task completed in api test teardown
* fix CachedSchemaTransaciton cachedTypes error

Change-Id: I06478c6dcf64699aba336aa5c032337bd297783b
2020-07-02 10:50:56 +08:00
Jermy Li 3de3d357e9
bump up common 1.7.8 (#1058)
include: guava 25.1 and cassandra-driver 3.6.0

Change-Id: Iaa420dc5233887a5b7054d7ea9f683cb5627903c
2020-06-28 14:59:15 +08:00
imbajin 81466fdecb
fix: change default minimum log level to TRACE (#1050) 2020-06-22 16:40:28 +08:00
shzcore 0db1aba74b
service support https access (#1036) 2020-06-18 14:40:30 +08:00
zhoney 85535cf758
fix count api bug when last step count in (degree, skipDegree) (#1042)
Change-Id: Ib5335b70b2b5ea03068e792a5486b16708f44364
2020-06-18 10:22:19 +08:00
Jermy Li 395435ced0
Show schema status in schema API (#1035)
fix #800

Change-Id: I08b0e1c642915b739a152a54e84972e82843bc5a
2020-06-17 19:25:18 +08:00
zhoney 8ae6b5e153
close tx in vertex/edge query only if needed (#1039)
Change-Id: I0cc7b3897700449c9215e722e3e9e814f27a1b33
2020-06-16 17:57:52 +08:00
zhoney 18c2804038
close tx in vertex/edge query rest api (#1038)
Change-Id: Ic5bccf464dd40a972026663790555eef5e47ceb6
2020-06-16 15:25:08 +08:00
Jermy Li 7eef881f19
rename auth api and fix some bugs (#1033)
* add 'auth' category before all auth APIs
* fix unable to removeEdge() when enable auth
* fix delete admin user(expect not allowed)
* check auth element not exist before creating
* throw 400 instead of 404 when delete non-exist element

Change-Id: Id8c4f39195f9f6cea95fdbe591592b0f1baf0627
2020-06-15 15:50:49 +08:00