pinpoint-apm / pinpoint

APM, (Application Performance Management) tool for large-scale distributed systems.
https://pinpoint-apm.gitbook.io/
Apache License 2.0
13.39k stars 3.75k forks source link

Problem to use WebUI authentication with Pinpoint 2.5.1 docker installation #10002

Open mikkonieminenprh opened 1 year ago

mikkonieminenprh commented 1 year ago

I'm trying to use WebUI authentication with Pinpoint 2.5.1 docker installation. I have done following steps: Added basicLogin to SPRING_PROFILES variable in file pinpoint-docker/.env: SPRING_PROFILES=release,basicLogin

Added new row to file pinpoint-docker/pinpoint-web/build/config/pinpoint-web.properties web.security.auth.user=testuser:abc123

Run commands: docker-compose stop pinpoint-web docker-compose rm pinpoint-web docker-compose -f docker-compose.yml -f docker-compose-metric.yml up -d

After that Pinpoint WebUI opening redirect to login page. I have tried testuser and password abc123 but I got the error: "UserDetailsService returned null, which is an interface contract violation"

Any ideas what is wrong?

intr3p1d commented 1 year ago

Refer to this page (https://github.com/pinpoint-apm/pinpoint/tree/master/basic-login), basicLogin is not enabled by the profile. It can be enabled by the option -Dpinpoint.modules.web.login=basicLogin

mikkonieminenprh commented 1 year ago

What is the correct place to add "-Dpinpoint.modules.web.login=basicLogin"? I suppose authentication enabling is not a problem because Pinpoint shows login screen.

intr3p1d commented 1 year ago

You can add pinpoint.modules.web.login=basicLogin in pinpoint-web.properties

Would you share your log files? (with error stacktrace)

mikkonieminenprh commented 1 year ago

This is config file:

# more pinpoint-web/build/config/pinpoint-web.properties
##########
# another way of setting properties.
# applied priority '.ENV' -> 'pinpoint-web.properties'
# property should be commented in docker-compose file to use
# ex) PINPOINT_ZOOKEEPER_ADDRESS should be commented in docker-compose to use pinpoint.zookeeper.address below
##########

pinpoint.zookeeper.address=

pinpoint.modules.web.login=basicLogin

After recreating webUI container login is not enabled and WebUI is not showings any warnings or errors.