ArangoDB (3.1.18) 身份验证不适用于具有反向代理的本地主机
ArangoDB (3.1.18) authentication not working for localhost with Reverse proxy
我在网络服务器(Windows 使用 IIS)上设置了一个 ArangoDB,并打算通过 IIS 使用反向代理将其公开到网络,但我希望客户端强制使用身份验证。我找不到通过所需身份验证访问 FOXX 服务的方法。
我添加了数据库'common'并在
中安装了FOXX服务
versioning/version/{project}/{client}/{version}
我可以通过 URL 喜欢
的浏览器正常使用该服务
http://127.0.0.1:8529/_db/common/versioning/version/myproject/aclient/4.9.3
它 returns 我 JSON 我有请求。但它从不要求我提供凭据。因此,如果我通过 IIS 公开此服务,例如:
https://myiisserver.com/_db/common/versioning/version/myproject/aclient/4.9.3
访问服务没有限制!
arangod.conf看起来像这样(实际上没有改变)
endpoint = tcp://127.0.0.1:8529
...
authentication = true
那我做错了什么?我是否仅使用内部端点?有 public 吗?我尝试了各种组合:
https://myiisserver.com/_db/common/_api/versioning/version/myproject/aclient/4.9.3
https://myiisserver.com/versioning/version/myproject/aclient/4.9.3
但想不通。我是在尝试不可能的事情,还是错过了显而易见的事情?
您需要调整端点以包含 myiisserver.com 的 ip。如果您想在服务器的所有接口和地址上公开 arangodb,请尝试 endpoint = tcp://0.0.0.0:8529/
或 endpoint = tcp://[::]:8529/
。后者还将包括 ipv6 地址。如果你只想添加myiisserver.com
,只需要为myiisserver.com
的ip地址添加一行。所以像
endpoint = tcp://127.0.0.1:8529
endpoint = tcp://<ip-address-of-myiisserver.com>:8529
...
authentication = true
如果您想使用 FQDN,请确保服务器上的 nslookup myiisserver.com
和外部世界解析为相同的 IP 地址。换句话说,确保 myiisserver.com
不会解析为 127.0.0.1
、127.0.1.1
、[::1]
,反之亦然。
我明白问题出在哪里了。 ArangoDB 3.1 documentation for Authentication 表示
Turn on authentication
...
If you want to run Foxx apps without HTTP authentcation, but activate
HTTP authentication for the built-in server APIs, you can add the
following line in the server section of the configuration:
authentication-system-only = true
...
所以我在按以下方式编辑我的 'arangod.conf' 后让它工作:
authentication = true
authentication-system-only = false
我在网络服务器(Windows 使用 IIS)上设置了一个 ArangoDB,并打算通过 IIS 使用反向代理将其公开到网络,但我希望客户端强制使用身份验证。我找不到通过所需身份验证访问 FOXX 服务的方法。
我添加了数据库'common'并在
中安装了FOXX服务versioning/version/{project}/{client}/{version}
我可以通过 URL 喜欢
的浏览器正常使用该服务http://127.0.0.1:8529/_db/common/versioning/version/myproject/aclient/4.9.3
它 returns 我 JSON 我有请求。但它从不要求我提供凭据。因此,如果我通过 IIS 公开此服务,例如:
https://myiisserver.com/_db/common/versioning/version/myproject/aclient/4.9.3
访问服务没有限制!
arangod.conf看起来像这样(实际上没有改变)
endpoint = tcp://127.0.0.1:8529
...
authentication = true
那我做错了什么?我是否仅使用内部端点?有 public 吗?我尝试了各种组合:
https://myiisserver.com/_db/common/_api/versioning/version/myproject/aclient/4.9.3
https://myiisserver.com/versioning/version/myproject/aclient/4.9.3
但想不通。我是在尝试不可能的事情,还是错过了显而易见的事情?
您需要调整端点以包含 myiisserver.com 的 ip。如果您想在服务器的所有接口和地址上公开 arangodb,请尝试 endpoint = tcp://0.0.0.0:8529/
或 endpoint = tcp://[::]:8529/
。后者还将包括 ipv6 地址。如果你只想添加myiisserver.com
,只需要为myiisserver.com
的ip地址添加一行。所以像
endpoint = tcp://127.0.0.1:8529
endpoint = tcp://<ip-address-of-myiisserver.com>:8529
...
authentication = true
如果您想使用 FQDN,请确保服务器上的 nslookup myiisserver.com
和外部世界解析为相同的 IP 地址。换句话说,确保 myiisserver.com
不会解析为 127.0.0.1
、127.0.1.1
、[::1]
,反之亦然。
我明白问题出在哪里了。 ArangoDB 3.1 documentation for Authentication 表示
Turn on authentication
...
If you want to run Foxx apps without HTTP authentcation, but activate HTTP authentication for the built-in server APIs, you can add the following line in the server section of the configuration:
authentication-system-only = true
...
所以我在按以下方式编辑我的 'arangod.conf' 后让它工作:
authentication = true
authentication-system-only = false