Keycloak openid-connect/3p-cookies/step1.html not found error

Posted on

I am trying to configure my Keycloak hostname. I have a frontend URL for the public requests and an admin URL not publicly exposed :

Frontend URL : http://localhost:8080/auth
Admin URL : http://localhost:8081/auth
I have the following hostname configuration in my standalone-ha.xml file :

<spi name="hostname">
                <default-provider>${keycloak.hostname.provider:default}</default-provider>
                <provider name="default" enabled="true">
                    <properties>
                        <property name="frontendUrl" value="${env.FRONTEND_URL}"/>
                        <property name="forceBackendUrlToFrontendUrl" value="false"/>
                        <property name="adminUrl" value="${env.ADMIN_URL}"/>
                    </properties>
                </provider>
                ...

Now I can't access the Keycloak admin console (localhost:8081/auth/admin). It only loads a white page with the following error in the console :

GET http://localhost:8080/auth/realms/master/protocol/openid-connect/3p-cookies/step1.html?version=6rmi9 404 (Not Found) check3pCookiesSupported @keycloak.js?version=6rmi9:1314 Promise.then (async) (anonymous) @keycloak.js?version=6rmi9:350

I cannot update the "keycloak.js" file as seen in some answers because it is not an adapter but the builtin file from Keycloak. I also have updated the Content Security Policy of the master realm with the following :

frame-src 'self' http://localhost:8000 http://localhost:8080 http://localhost:8081; frame-ancestors 'self' http://localhost:8000

Have I overlooked anything ?

Responses