Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] clear API also delete graph username/password (Auth info) #2323

Closed
1 task done
turkeymz opened this issue Oct 11, 2023 · 5 comments
Closed
1 task done

[Question] clear API also delete graph username/password (Auth info) #2323

turkeymz opened this issue Oct 11, 2023 · 5 comments
Labels
question Further information is requested

Comments

@turkeymz
Copy link

Bug Type (问题类型)

rest-api (结果不合预期)

Before submit

  • 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

Environment (环境信息)

  • Server Version: 1.0.0 (Apache Release Version)
  • Backend:HBase
  • OS: CentOS 7.9

Expected & Actual behavior (期望与实际表现)

执行:http://{}:{}/graphs/{}/clear?confirm_message=I%27m+sure+to+delete+all+data
此时把整个图数据库都清掉了,包括登录的账号面。以前只清理边和点等。真得万一执行,图数据库是在的,但登录不上了。这导致测试环境下的调试很不方便。

期望恢复过去只清除边和点等业务数据

Vertex/Edge example (问题点 / 边数据举例)

No response

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

No response

@turkeymz turkeymz added the bug Something isn't working label Oct 11, 2023
@javeme
Copy link
Contributor

javeme commented Oct 12, 2023

感谢反馈,后续我们会改进此特性 (#2324 )。将用户数据信息单独存储,保持图数据与用户数据隔离独立。

@imbajin
Copy link
Member

imbajin commented Oct 13, 2023

以前只清理边和点等, 期望恢复过去只清除边和点等业务数据

@javeme Did we only clean vertexes/edges before? I'm not sure about this
@turkeymz What is the version you kept other meta information before?

@turkeymz
Copy link
Author

以前只清理边和点等, 期望恢复过去只清除边和点等业务数据

@javeme Did we only clean vertexes/edges before? I'm not sure about this @turkeymz What is the version you kept other meta information before?

是的,过去使用0.12.0只会清理图数据(属性、点、线、索引等),保留用户数据。
目前使用版本是1.0.0,存储底层用HBase。但会所有清理,导致图数据库报异常。

@imbajin
Copy link
Member

imbajin commented Oct 26, 2023

以前只清理边和点等, 期望恢复过去只清除边和点等业务数据

@javeme Did we only clean vertexes/edges before? I'm not sure about this @turkeymz What is the version you kept other meta information before?

是的,过去使用0.12.0只会清理图数据(属性、点、线、索引等),保留用户数据。 目前使用版本是1.0.0,存储底层用HBase。但会所有清理,导致图数据库报异常。

In theory, there should be no modification for this section. If you have time, could help to check which PR adjustment was made to the clear graph logic and optimize it

@Z-HUANT
Copy link
Contributor

Z-HUANT commented Jan 10, 2024

@turkeymz 后续新版本会对 Auth 数据进行隔离,你可以先把 Auth 数据单独存储在一个 Graph 中,也可以避免 Clear API 删除,操作步骤参考:

(推荐) 一个 Server 中配置两个 Graph 的方案:

  1. 一个 Server 进程中配置两个 Graph, 一个用户数据图, 一个事 Auth 专用图
  2. 复制 conf/graphs 文件夹下的 hugegraph.properties,命名为 auth.properties,用于存储 auth 信息,记得修改里面的 store 属性
  3. 修改 conf 文件夹下的 rest-server.properties 的 auth.graph_store 属性,value 值为 auth,让 auth 信息存储在 auth.properties 配置的 store 数据库
  4. 执行 init-store 会初始化两个数据库(hugegraph.properties、auth.properties),admin 账号存储在 auth.properties
  5. 启动 HugeGraph,执行 Clear API 只会删除 hugegraph.properties 的数据,不会删除 auth.properties 的数据

注: 如果生产环境已有 ≥ 2 个 Server:

  1. 新开一个 Auth Server 单独存储 Auth 数据
  2. Auth Server 配置参考:https://hugegraph.apache.org/cn/docs/config/config-authentication/
  3. 其他 Server 修改 rest-server.properties 的 auth.remote_url 属性,指向 Auth Server
  4. 其他 Server 执行 Clear API 只会删除自己的数据,不会影响 Auth Server 的账号信息

@imbajin imbajin changed the title [Bug] 调用clear API把图数据库账号密码也清了 [Question] clear API also delete graph username/password (Auth info) Jan 11, 2024
@apache apache locked and limited conversation to collaborators Jan 11, 2024
@imbajin imbajin converted this issue into discussion #2413 Jan 11, 2024
@imbajin imbajin added question Further information is requested and removed bug Something isn't working labels Jan 11, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants