Skip to content
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

The documentation lacks information related to the authentication of Docker Image’s 7091 port #6351

Closed
1 task done
linghengqian opened this issue Feb 19, 2024 · 1 comment · Fixed by #6356
Closed
1 task done

Comments

@linghengqian
Copy link
Member

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

console:
  user:
    username: seata
    password: seata

Ⅱ. Describe what happened

  • Null.

Ⅲ. Describe what you expected to happen

@Controller
@RequestMapping
public class HealthController {

    private static final String OK = "ok";
    private static final String NOT_OK = "not_ok";

    @Autowired
    private ServerRunner serverRunner;


    @RequestMapping("/health")
    @ResponseBody
    String healthCheck() {
        return serverRunner.started() ? OK : NOT_OK;
    }
}
 Awaitility.await().atMost(Duration.ofMinutes(1)).ignoreExceptions()
                .until(() -> {
                    boolean flag = false;
                    HttpGet httpGet = new HttpGet("http://localhost:" + 7091 + "/health");
                    try (CloseableHttpClient httpclient = HttpClients.createDefault();
                         CloseableHttpResponse response = httpclient.execute(httpGet)) {
                        if (401 == response.getCode()) {
                            flag = true;
                        }
                        HttpEntity entity = response.getEntity();
                        EntityUtils.consume(entity);
                    }
                    return flag;
                });

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. Start Seata Server through the following Docker Compose file.
version: "3.8"
services:
  seata-server:
    image: seataio/seata-server:2.0.0
    ports:
      - "8091:8091"
      - "7091:7091"
  1. Open http://localhost:7091/ . In fact, the Docker Image deployment document does not mention that 7091 has the authentication function turned on by default.
  • image

Minimal yet complete reproducer code (or URL to code):

  • Null.

Ⅴ. Anything else we need to know?

  • Null.

Ⅵ. Environment:

  • JDK version(e.g. java -version):
openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing)
  • Seata client/server version: 2.0.0
  • Database version: MySQL Server 8.3.0
  • OS(e.g. uname -a): Linux DESKTOP-J7M76VH 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  • Others: Null
@slievrly
Copy link
Member

@linghengqian Please add the URLs that should bypass authentication to seata.security.ignore.urls. The issue you have reported is important; the health check page will be excluded from authentication by default in future versions.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants