You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "arshilkxwork (via GitHub)" <gi...@apache.org> on 2026/10/13 07:29:11 UTC
[PR] docs(config): document auth.admin_pa_file [hugegraph-doc]
arshilkxwork opened a new pull request, #526:
URL: https://github.com/apache/hugegraph-doc/pull/526
Docs for apache/hugegraph#3334 (https://github.com/apache/hugegraph/pull/3334), which adds the Server option `auth.admin_pa_file`.
`auth.admin_pa` goes through the properties grammar: the value is trimmed, backslashes are unescaped and the file is decoded as ISO-8859-1. The new option names a file that the Server reads as raw UTF-8, dropping one trailing line break. When set, it takes precedence over `auth.admin_pa` and the `init-store.sh` password prompt. Like `auth.admin_pa`, it only matters on first startup.
Updated in both EN and CN:
- `config-option.md`: a row for `auth.admin_pa_file` right after `auth.admin_pa`.
- `config-authentication.md`: a commented `auth.admin_pa_file` line under `auth.admin_pa` in the `rest-server.properties` example.
- `config-backend-hstore.md`: with `init_store.enabled=false`, the explicit-password check now also accepts `auth.admin_pa_file` and reads the file at that point.
This should merge after apache/hugegraph#3334, since no released Server has the option yet.
I ran `git diff --check`. I did not build the site locally.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] docs(config): document auth.admin_pa_file [hugegraph-doc]
Posted by "arshilkxwork (via GitHub)" <gi...@apache.org>.
arshilkxwork commented on code in PR #526:
URL: https://github.com/apache/hugegraph-doc/pull/526#discussion_r4262811747
##########
content/en/docs/config/config-option.md:
##########
@@ -69,6 +69,7 @@ Corresponding configuration file `rest-server.properties`
| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. |
| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. |
| auth.admin_pa | pa | Used when the Server startup path initializes admin. Explicitly set a strong password before production deployment; the public default is `pa`. On local persistent backends, `init-store.sh` prompts for the initial password. |
+| auth.admin_pa_file | | Path of a file holding the initial password for the built-in admin account. The file is read as raw UTF-8 with one trailing line break removed, so spaces, backslashes and non-ASCII characters need no properties escaping. When set, it takes precedence over `auth.admin_pa` and the `init-store.sh` password prompt. A missing, empty or non-UTF-8 file stops startup. Takes effect on first startup. |
Review Comment:
Fixed in 5d97063. The row now says the password is applied only when the admin is first created, and that PD (hstore) and non-persistent backends read the file on every start, so it has to stay readable while the option is set. The hstore init-store paragraph and the `rest-server.properties` comment say the same.
##########
content/cn/docs/config/config-option.md:
##########
@@ -69,6 +69,7 @@ search_boost: 1.5
| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. |
| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. |
| auth.admin_pa | pa | Server 启动路径初始化内置 admin 账户时使用,默认值为公开的 `pa`,生产部署前必须显式设置强密码。本地持久化后端首次初始化由 `init-store.sh` 交互式读取密码。 |
+| auth.admin_pa_file | | 存放内置 admin 账户初始密码的文件路径。文件按原始 UTF-8 读取,并去掉末尾的一个换行符,因此空格、反斜杠和非 ASCII 字符无需按 properties 语法转义。设置后优先于 `auth.admin_pa` 和 `init-store.sh` 的交互式密码输入。文件不存在、为空或不是合法 UTF-8 时启动失败。仅在首次启动时生效。 |
Review Comment:
Fixed in 5d97063 with the same wording as the EN row, and also in the CN hstore page and properties comment.
##########
content/en/docs/config/config-option.md:
##########
@@ -69,6 +69,7 @@ Corresponding configuration file `rest-server.properties`
| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. |
| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. |
| auth.admin_pa | pa | Used when the Server startup path initializes admin. Explicitly set a strong password before production deployment; the public default is `pa`. On local persistent backends, `init-store.sh` prompts for the initial password. |
+| auth.admin_pa_file | | Path of a file holding the initial password for the built-in admin account. The file is read as raw UTF-8 with one trailing line break removed, so spaces, backslashes and non-ASCII characters need no properties escaping. When set, it takes precedence over `auth.admin_pa` and the `init-store.sh` password prompt. A missing, empty or non-UTF-8 file stops startup. Takes effect on first startup. |
Review Comment:
Fixed in 5d97063. Since your review, #3334 also gained 7ba00bd, which requires a regular file (symlinks followed) and caps the password at 72 UTF-8 bytes. The rows and both properties comments now cover the BOM, the 4096-byte file limit, the regular-file check and the 72-byte limit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] docs(config): document auth.admin_pa_file [hugegraph-doc]
Posted by "arshilkxwork (via GitHub)" <gi...@apache.org>.
arshilkxwork closed pull request #526: docs(config): document auth.admin_pa_file
URL: https://github.com/apache/hugegraph-doc/pull/526
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] docs(config): document auth.admin_pa_file [hugegraph-doc]
Posted by "bitflicker64 (via GitHub)" <gi...@apache.org>.
bitflicker64 commented on code in PR #526:
URL: https://github.com/apache/hugegraph-doc/pull/526#discussion_r4264902024
##########
content/en/docs/config/config-option.md:
##########
@@ -69,6 +69,7 @@ Corresponding configuration file `rest-server.properties`
| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. |
| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. |
| auth.admin_pa | pa | Used when the Server startup path initializes admin. Explicitly set a strong password before production deployment; the public default is `pa`. On local persistent backends, `init-store.sh` prompts for the initial password. |
+| auth.admin_pa_file | | Path of a regular file (symlinks are followed) holding the initial password for the built-in admin account. The file is read as raw UTF-8 with a leading BOM and one trailing line break removed, so spaces, backslashes and non-ASCII characters need no properties escaping. The password may be at most 72 bytes in UTF-8, because the password hash ignores anything after that. When set, it takes precedence over `auth.admin_pa` and the `init-store.sh` password prompt. A file that is missing, unreadable, not a regular file, larger than 4096 bytes, not valid UTF-8, empty, or holding a password longer than 72 bytes stops `init-store.sh` or Server startup. The password is only applied when the admin account is first created, but with PD (hstore) and non-persistent backends the file is read on every start, so keep it readable for as long as the option is set. |
Review Comment:
Important: this row, the `rest-server.properties` example in `config-authentication.md` and the `init_store.enabled=false` paragraph in `config-backend-hstore.md` present `auth.admin_pa_file` as available, in EN and CN, without saying which Server has it. No released Server and not even current master has the option (apache/hugegraph#3334 is still open), and a Server without it does not reject the key.
Evidence, apache/hugegraph master 0b7c0de: `git grep admin_pa_file` finds nothing. `HugeConfig.addPropertyDirect` only logs `The config option '{}' is redundant, please ensure it has been registered` for an unregistered key and carries on. `GraphManager.loadMetaFromPD()` (GraphManager.java:375-377) then calls `initAdminUserIfNeeded(conf.get(ServerOptions.ADMIN_PA))`, and the non-persistent path in `checkBackendVersionOrExit` reads `ServerOptions.ADMIN_PA` as well, whose default is `pa`. So an operator on such a Server who follows this row, sets only `auth.admin_pa_file` and leaves `auth.admin_pa` unset gets the admin account created with the public password `pa` on PD (hstore) with init-store enabled and on the memory backend, with one WARN line as the only sign. On local persistent backends `init-store.sh` falls back to the interactive prompt instead of reading the file. Merging this after #3334 does not cover readers on an older release. The other pages in this directory already
mark version-bound behaviour (`Since 1.7.0 ...` in `config-backend-hstore.md:80`, `applies only to images built from master` in `config-guide.md:39`), and the hstore table this PR extends says its facts were checked at Server master `2f827d6`, where the option does not exist.
Requested change: state the first Server version that supports `auth.admin_pa_file` (or that it is master-only until that release) in this row and in the CN row at `content/cn/docs/config/config-option.md:72`, and add the same note to the two properties comments and the two hstore paragraphs. Say there that an older Server ignores the option, so `auth.admin_pa` still has to be set on it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] docs(config): document auth.admin_pa_file [hugegraph-doc]
Posted by "arshilkxwork (via GitHub)" <gi...@apache.org>.
arshilkxwork commented on code in PR #526:
URL: https://github.com/apache/hugegraph-doc/pull/526#discussion_r4265230921
##########
content/en/docs/config/config-option.md:
##########
@@ -69,6 +69,7 @@ Corresponding configuration file `rest-server.properties`
| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. |
| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. |
| auth.admin_pa | pa | Used when the Server startup path initializes admin. Explicitly set a strong password before production deployment; the public default is `pa`. On local persistent backends, `init-store.sh` prompts for the initial password. |
+| auth.admin_pa_file | | Path of a regular file (symlinks are followed) holding the initial password for the built-in admin account. The file is read as raw UTF-8 with a leading BOM and one trailing line break removed, so spaces, backslashes and non-ASCII characters need no properties escaping. The password may be at most 72 bytes in UTF-8, because the password hash ignores anything after that. When set, it takes precedence over `auth.admin_pa` and the `init-store.sh` password prompt. A file that is missing, unreadable, not a regular file, larger than 4096 bytes, not valid UTF-8, empty, or holding a password longer than 72 bytes stops `init-store.sh` or Server startup. The password is only applied when the admin account is first created, but with PD (hstore) and non-persistent backends the file is read on every start, so keep it readable for as long as the option is set. |
Review Comment:
Fixed in 877f8f4. The option rows, both `rest-server.properties` comments and both hstore paragraphs, in EN and CN, now say `auth.admin_pa_file` is only in versions after 1.7.0, and that a 1.7.0 or earlier Server ignores the key with a warning and uses `auth.admin_pa` (default `pa`), so `auth.admin_pa` still has to be set there. I followed the "1.7.0 and earlier / later versions" wording already used in `config-option.md` instead of naming 1.8.0, since apache/hugegraph#3334 has not merged yet.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] docs(config): document auth.admin_pa_file [hugegraph-doc]
Posted by "bitflicker64 (via GitHub)" <gi...@apache.org>.
bitflicker64 commented on code in PR #526:
URL: https://github.com/apache/hugegraph-doc/pull/526#discussion_r4257616049
##########
content/en/docs/config/config-option.md:
##########
@@ -69,6 +69,7 @@ Corresponding configuration file `rest-server.properties`
| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. |
| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. |
| auth.admin_pa | pa | Used when the Server startup path initializes admin. Explicitly set a strong password before production deployment; the public default is `pa`. On local persistent backends, `init-store.sh` prompts for the initial password. |
+| auth.admin_pa_file | | Path of a file holding the initial password for the built-in admin account. The file is read as raw UTF-8 with one trailing line break removed, so spaces, backslashes and non-ASCII characters need no properties escaping. When set, it takes precedence over `auth.admin_pa` and the `init-store.sh` password prompt. A missing, empty or non-UTF-8 file stops startup. Takes effect on first startup. |
Review Comment:
Minor: two behaviours of the current Server head are missing from this row and its CN counterpart. `readAdminPasswordFile` (StandardAuthenticator.java in apache/hugegraph#3334 at 128c0b3) also strips a leading UTF-8 BOM, and it rejects a file larger than 4096 bytes (`MAX_ADMIN_PA_FILE_BYTES`) with "is larger than 4096 bytes". The failure list here names only missing, empty and non-UTF-8 files. Both were added in the third commit of that PR, after this doc commit was written.
Requested change: mention the BOM alongside the trailing line break, and add the 4096-byte limit to the conditions that stop startup, in both the EN and CN rows (and the BOM in the two `rest-server.properties` comments, to match the shipped `rest-server.properties`).
##########
content/cn/docs/config/config-option.md:
##########
@@ -69,6 +69,7 @@ search_boost: 1.5
| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. |
| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. |
| auth.admin_pa | pa | Server 启动路径初始化内置 admin 账户时使用,默认值为公开的 `pa`,生产部署前必须显式设置强密码。本地持久化后端首次初始化由 `init-store.sh` 交互式读取密码。 |
+| auth.admin_pa_file | | 存放内置 admin 账户初始密码的文件路径。文件按原始 UTF-8 读取,并去掉末尾的一个换行符,因此空格、反斜杠和非 ASCII 字符无需按 properties 语法转义。设置后优先于 `auth.admin_pa` 和 `init-store.sh` 的交互式密码输入。文件不存在、为空或不是合法 UTF-8 时启动失败。仅在首次启动时生效。 |
Review Comment:
Important: "仅在首次启动时生效" (takes effect only on first startup) is stronger than the English row and contradicts the Server code for PD/hstore. The file is read on every start there, so deleting it after the first boot stops the Server from starting.
Evidence: apache/hugegraph#3334 head 128c0b3: `GraphManager.loadMetaFromPD()` (GraphManager.java:375-378) evaluates `StandardAuthenticator.initialAdminPassword(conf)` as the argument of `initAdminUserIfNeeded(...)`, so the file is read before the admin-exists check, on every PD start. `readAdminPasswordFile` throws `ConfigException` when the file cannot be read. The option description in `ServerOptions.ADMIN_PA_FILE` says the same: "PD and non-persistent backends read it on every start, so keep it readable while this option is set."
Requested change: state that the password is only applied when the admin account is first created, and that with PD (hstore) and non-persistent backends the file is read on every start and must stay readable while the option is set. Apply the same to `content/cn/docs/config/config-backend-hstore.md` line 151 and the properties comment in `content/cn/docs/config/config-authentication.md`.
##########
content/en/docs/config/config-option.md:
##########
@@ -69,6 +69,7 @@ Corresponding configuration file `rest-server.properties`
| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. |
| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. |
| auth.admin_pa | pa | Used when the Server startup path initializes admin. Explicitly set a strong password before production deployment; the public default is `pa`. On local persistent backends, `init-store.sh` prompts for the initial password. |
+| auth.admin_pa_file | | Path of a file holding the initial password for the built-in admin account. The file is read as raw UTF-8 with one trailing line break removed, so spaces, backslashes and non-ASCII characters need no properties escaping. When set, it takes precedence over `auth.admin_pa` and the `init-store.sh` password prompt. A missing, empty or non-UTF-8 file stops startup. Takes effect on first startup. |
Review Comment:
Important: "Takes effect on first startup" is only half of the contract, and the missing half breaks restarts on PD/hstore. The password is applied once, but the file is read on every Server start when `usePD=true` (and on non-persistent backends). An operator who reads this row and removes the secret mount after the first boot gets a Server that refuses to start.
Evidence: apache/hugegraph#3334 head 128c0b3: `GraphManager.loadMetaFromPD()` (GraphManager.java:375-378) evaluates `StandardAuthenticator.initialAdminPassword(conf)` as the argument of `initAdminUserIfNeeded(...)`, so the file is read before the admin-exists check, on every PD start. `readAdminPasswordFile` throws `ConfigException` when the file cannot be read. The option description in `ServerOptions.ADMIN_PA_FILE` says the same: "PD and non-persistent backends read it on every start, so keep it readable while this option is set."
Requested change: say that the password is only applied when the admin account is first created, but that with PD (hstore) and non-persistent backends the file is read on every start and must stay readable for as long as the option is set. The same sentence is needed in `config-backend-hstore.md` (line 179, "which is read at this point"), since that is the page for exactly the deployment that re-reads the file, and in the `rest-server.properties` comment in `config-authentication.md`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] docs(config): document auth.admin_pa_file [hugegraph-doc]
Posted by "arshilkxwork (via GitHub)" <gi...@apache.org>.
arshilkxwork commented on PR #526:
URL: https://github.com/apache/hugegraph-doc/pull/526#issuecomment-6163236549
Closing together with apache/hugegraph#3334, which is deferred (https://github.com/apache/hugegraph/pull/3334#issuecomment-6161212632). Thanks @bitflicker64 for the reviews. Your last point was right: the fallback note I added in 877f8f4 is wrong for releases before 1.7.0, which have no `auth.admin_pa`, and for 1.7.0 on the memory backend, which uses `auth.admin_token`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] docs(config): document auth.admin_pa_file [hugegraph-doc]
Posted by "arshilkxwork (via GitHub)" <gi...@apache.org>.
arshilkxwork commented on code in PR #526:
URL: https://github.com/apache/hugegraph-doc/pull/526#discussion_r4262812374
##########
content/en/docs/config/config-option.md:
##########
@@ -69,6 +69,7 @@ Corresponding configuration file `rest-server.properties`
| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. |
| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. |
| auth.admin_pa | pa | Used when the Server startup path initializes admin. Explicitly set a strong password before production deployment; the public default is `pa`. On local persistent backends, `init-store.sh` prompts for the initial password. |
+| auth.admin_pa_file | | Path of a file holding the initial password for the built-in admin account. The file is read as raw UTF-8 with one trailing line break removed, so spaces, backslashes and non-ASCII characters need no properties escaping. When set, it takes precedence over `auth.admin_pa` and the `init-store.sh` password prompt. A missing, empty or non-UTF-8 file stops startup. Takes effect on first startup. |
Review Comment:
Fixed in 5d97063. Since your review, apache/hugegraph#3334 also gained 7ba00bd, which requires a regular file (symlinks followed) and caps the password at 72 UTF-8 bytes. The rows and both properties comments now cover the BOM, the 4096-byte file limit, the regular-file check and the 72-byte limit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] docs(config): document auth.admin_pa_file [hugegraph-doc]
Posted by "bitflicker64 (via GitHub)" <gi...@apache.org>.
bitflicker64 commented on code in PR #526:
URL: https://github.com/apache/hugegraph-doc/pull/526#discussion_r4266617551
##########
content/en/docs/config/config-option.md:
##########
@@ -69,6 +69,7 @@ Corresponding configuration file `rest-server.properties`
| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. |
| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. |
| auth.admin_pa | pa | Used when the Server startup path initializes admin. Explicitly set a strong password before production deployment; the public default is `pa`. On local persistent backends, `init-store.sh` prompts for the initial password. |
+| auth.admin_pa_file | | Versions after 1.7.0 only. A 1.7.0 or earlier Server ignores this key, logging only a warning, and still uses `auth.admin_pa` (default `pa`) or the `init-store.sh` prompt, so set `auth.admin_pa` on those versions. Path of a regular file (symlinks are followed) holding the initial password for the built-in admin account. The file is read as raw UTF-8 with a leading BOM and one trailing line break removed, so spaces, backslashes and non-ASCII characters need no properties escaping. The password may be at most 72 bytes in UTF-8, because the password hash ignores anything after that. When set, it takes precedence over `auth.admin_pa` and the `init-store.sh` password prompt. A file that is missing, unreadable, not a regular file, larger than 4096 bytes, not valid UTF-8, empty, or holding a password longer than 72 bytes stops `init-store.sh` or Server startup. The password is only applied when the admin account is first created, but with PD (hstore) and non-persis
tent backends the file is read on every start, so keep it readable for as long as the option is set. |
Review Comment:
Important: the fallback half of the version note added in 877f8f4 is wrong for part of the range it names. The earlier request on 5d97063 to say that `auth.admin_pa` still has to be set was checked against master only, not the release tags, and it does not hold for them: `auth.admin_pa` exists only from 1.7.0, and 1.7.0 reads it on the PD startup path only.
Evidence, apache/hugegraph release tags:
- 1.5.0, 1.3.0, 1.2.0, 1.0.0: `git grep admin_pa <tag>` finds nothing, so `auth.admin_pa` is as unknown there as `auth.admin_pa_file` (at 1.5.0 `HugeConfig.addPropertyDirect` logs the same `The config option '{}' is redundant` warning for it). The admin password comes from the `init-store.sh` prompt (`StandardAuthenticator.initAdminUser()` calls `inputPassword()`), or from `auth.admin_token` on the memory backend (`GraphManager.java:439-441` at 1.5.0).
- 1.7.0: the only read of `ServerOptions.ADMIN_PA` is in `GraphManager.loadMetaFromPD()` (`GraphManager.java:364`). On the memory backend, the only non-persistent one, `checkBackendVersionOrExit` still runs `initAdminUser(config.get(ServerOptions.AUTH_ADMIN_TOKEN))` (`GraphManager.java:1614-1616`), and `auth.admin_token` defaults to the public `162f7848-0b6d-4faf-b557-3a0797869c55` (`ServerOptions.java:487`). That path moved to `auth.admin_pa` in a93cc218d (#2927, 2026-01-04), which no release tag contains.
So on 1.7.0 with the memory backend and auth on, an operator who follows this row and sets `auth.admin_pa` still gets an admin whose password is the `auth.admin_token` value. The sentence is right for 1.7.0 with PD (hstore).
Requested change: in this row and the CN row (`content/cn/docs/config/config-option.md:72`), replace the fallback sentence with what the releases do, for example: "Versions after 1.7.0 only. A 1.7.0 or earlier Server ignores this key, logging only a warning, and creates admin as before: from the `init-store.sh` prompt on local persistent backends, from `auth.admin_pa` (default `pa`) on 1.7.0 with PD (hstore), and from `auth.admin_token` (public default) on the memory backend. `auth.admin_pa` does not exist before 1.7.0." In the two properties comments (`content/en/docs/config/config-authentication.md:103`, `content/cn/docs/config/config-authentication.md:98`), keep "older Servers ignore this key" and point to the option table instead of "still need auth.admin_pa". In the two hstore paragraphs (`content/en/docs/config/config-backend-hstore.md:183`, `content/cn/docs/config/config-backend-hstore.md:151`), change "1.7.0 or earlier" / "1.7.0 及更早版本" to 1.7.0, since those parag
raphs are about PD.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org