jumpserver / jumpserver

An open-source PAM tool alternative to CyberArk. 广受欢迎的开源堡垒机。
https://jumpserver.com
GNU General Public License v3.0
25.57k stars 5.34k forks source link

[Question] DOMAINS Issue #14329

Closed APK-PAM closed 1 month ago

APK-PAM commented 1 month ago

Product Version

v4.1.0

Product Edition

Installation Method

Environment Information

Ubuntu 20.04

🤔 Question Description

Hello, I have problem in login page when i want to login i faced with this error:

Configuration file has problems and cannot be logged in. Please contact the administrator or view latest docs If you are administrator, you can update the config resolve it, set DOMAINS=pam.local.net

i set the domains in config file but it still does not work. why?

Expected Behavior

No response

Additional Information

No response

BaiJiangJie commented 1 month ago

For version 3.6, for security reasons, it is mandatory to configure trusted domain names in the DOMAINS setting to access the service. Otherwise, an error code 400/403 will be prompted, preventing access to the page. The DOMAINS configuration is as follows:

# Open the config.txt configuration file and define the DOMAINS field
vim /opt/jumpserver/config/config.txt 

# Trusted DOMAINS definition
# Define trusted access IPs. Please modify according to actual circumstances. If it is a public IP, replace it with the corresponding public IP.
# DOMAINS="demo.jumpserver.org"    # Use domain name for access
# DOMAINS="172.17.200.191"         # Use IP for access
# DOMAINS="demo.jumpserver.org,172.17.200.191"    # Use both IP and domain name for access
DOMAINS=

# 重启 JumpServer 服务生效
jmsctl restart

A service restart is required for the configuration to take effect.

BaiJiangJie commented 1 month ago

But, If you are using one-click deployment, you need to pass the DOMAINS=pam.local.net parameter using the -e option when restarting the container.

APK-PAM commented 1 month ago

Hi, resolved Thanks