How to disable registration on a public facing instance?

Issue #4 new
Ovidiu created an issue

Can’t seem to figure it out. Also, even though I have removed the captcha info and set it to false the captcha when registering is still showing 😞

I have this in my app.properties

# Enable captcha confirmation
google.recaptcha2.enabled = false

# ReCaptcha is the default captcha. Public and private keys are required.
# More Info: http://www.google.com/recaptcha .
#google.recaptcha2.siteKey = 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
#google.recaptcha2.secretKey =  6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe

Also, I tried configuring email sending and wisemapping still tries localhost instead of 10.10.10.10

#------------------------
# Plain SMTP Server Configuration
#------------------------
mail.smtp.port=25
mail.smtp.host=10.10.10.10
mail.username=
mail.password=
mail.smtp.auth=false
mail.smtp.starttls.enable=false
mail.smtp.quitwait=false

wisemapping still tries to use localhost for sending email 😞

wisemapping  | An expected error has occurred trying to send an email notification. Usually, the main reason for this is that the SMTP server properties has not been configured properly. Edit the WEB-INF/app.properties file and verify the SMTP server configuration properties.
wisemapping  | Cause:Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;
wisemapping  |   nested exception is:
wisemapping  |  java.net.ConnectException: Connection refused. Failed messages: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;
wisemapping  |   nested exception is:
wisemapping  |  java.net.ConnectException: Connection refused

Comments (13)

  1. Ovidiu reporter

    Solved the email and captcha problem by mounting app.properties to the correct directory, see 3rd line of snippet

        volumes:
          - ./data/db:/var/lib/wisemapping/db
          - ./data/app.properties:/usr/local/tomcat/webapps/ROOT/WEB-INF/app.properties
    

    Still don’t know how to disable registration.

    I tried this inside app.properties but it does not work as one can still register

    # Coma separated list of domains and emails ban
    accounts.exclusion.domain=*
    

  2. Paulo Veiga

    Unfortunately, there is not way to disable page registration. Might I know why are you interested in this ?.

  3. Ovidiu reporter

    Hi Paulo,
    thanks for checking in. I am interested in removing registration as I run a private instance of wisemapping for close family only and have made it publicly reachable via reverse proxy.

    Chances of random people registering are minimal but disabling registration would give me some peace of mind in case there’s a security vulnerability in wisemapping down the line.

  4. Richard Körber

    I would need the same feature for the same reason. I want to run a private instance that shall only be accessible by certain people. It would be great if there is a way to disable new registrations altogether (e.g. by setting a property). At the moment I solved that by using a reverse proxy and client certificate authentication.

  5. Matheus Pinheiro

    I too would love this feature for similar reasons. My workaround for now was enabling captcha and setting invalid key and secret values. While not pretty, it prevents new accounts from signing in.

  6. Colin Manning

    Would an implementation of a Traefik container be a suitable work around?

    Traefik could redirect any requests for c/registration to c/login (or maybe a 404).

    Obviously best option would be an environment variable (or app.properties) that enables or disables both the register button AND the /c/registration link

  7. Matheus Pinheiro

    Having the env var options would be the best option indeed.

    I’m now using oauth2-proxy with Google SSO to lock the entire application, it’s working great for me.

  8. nico og

    Hello, any news ?
    I also have the app in public. Not be able to control who is creating an account is a real issue..

  9. Paulo Veiga

    Hey! Thanks for all feedback. As part of the new version, I’m working on an option to remove the whole regregistation based on configuration. I’m expecting to have a first release in 1 month aprox.

  10. Log in to comment