Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enabling remote access to Keycloak

Tags:

keycloak

I'm using the Keycloak authorization server in order to manage my application permissions. However, I've found out the standalone server can be accessed locally only.

http://localhost:8080/auth works, but not it does http://myhostname:8080/auth. This issue doesn't permit accessing the server from the internal network.

like image 427
Xtreme Biker Avatar asked Dec 22 '15 07:12

Xtreme Biker


People also ask

How do I access a Keycloak?

Open command prompt and run docker-compose up to run keycloak. Open browser and enter the keycloak url. Click on Administration Console. Default username and password is 'admin' , 'admin'.

How do I open a Keycloak with another port?

If you run basic bin/standalone.sh without changing any configuration, your keycloak server will be started on port 8080 . Port 9990 is not your keycloak server, it is WildFly one. You are also using offset wrong. Basically, offset is the number you increment your original port ( 8080 ) for.

How do you authenticate with a Keycloak?

Configure Keycloak to authenticate your cbioportal instance. Log in to your Keycloak Identity Provider, e.g. http://localhost:8080/auth, as an admin user. ⚠️ when setting this up on something else than localhost (e.g. production), you will need to use/enable https on your Keycloak server.


1 Answers

The standalone Keycloak server runs on the top of a JBoss Wildfly instance and this server doesn't allow accessing it externally by default, for security reasons (it should be only for the administration console, but seems to affect every url in case of Keycloak). It has to be booted with the -b=0.0.0.0 option to enable it.

However, if your Wildfly is running on a remote machine and you try to access your administrative page through the network by it’s IP address or hostname, let’s say, at http://54.94.240.170:8080/, you will probably see a graceful This webpage is not available error, in another words, Wildfly said “No, thanks, I’m not allowing requests from another guys than the ones at my local machine”.

See also:

  • Enable Wildfly remote access
  • Wildfly remotely access administration console doesnt work
like image 118
Xtreme Biker Avatar answered Sep 18 '22 12:09

Xtreme Biker