[keycloak-user] Custom page for not found realm (tenant)
Marek Posolda
mposolda at redhat.com
Tue Jun 7 14:46:10 EDT 2016
Then maybe the easiest path is to configure error page at undertow
subsystem level in standalone.xml . You can take a look for example at
https://developer.jboss.org/thread/251980?start=0&tstart=0
Marek
On 07/06/16 19:21, Haim Vana wrote:
>
> It's pretty straight forward the JS utility redirects us to KeyCloak
> with a realm that doesn’t exist, marked in yellow below.
>
> http://192.168.99.100:9090/auth/realms/1000000121/protocol/openid-connect/auth?client_id=reportium&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2F%3FTENANTID%3D1000000121&state=20d710ca-ffe3-4c67-b495-bdb6fc9bad40&response_type=code
> <http://192.168.99.100:9090/auth/realms/1000000121/protocol/openid-connect/auth?client_id=reportium&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2F%3FTENANTID%3D1000000121&state=20d710ca-ffe3-4c67-b495-bdb6fc9bad40&response_type=code>
>
> KeyCloak returns 404 resulting in a blank page.
>
> *From:*Marek Posolda [mailto:mposolda at redhat.com]
> *Sent:* Tuesday, June 07, 2016 7:50 PM
> *To:* Haim Vana <haimv at perfectomobile.com>; keycloak-user at lists.jboss.org
> *Subject:* Re: [keycloak-user] Custom page for not found realm (tenant)
>
> How exactly the error page looks like and how the browser URL looks
> like? Is it something in the server.log when it's displayed?
>
> Marek
>
> On 07/06/16 15:31, Haim Vana wrote:
>
> Hi Marek,
>
> The exception (HTTP error 404) is on KeyCloak side (missing
> tenant), I have looked into the themes
> <https://emea01.safelinks.protection.outlook.com/?url=http%3a%2f%2fkeycloak.github.io%2fdocs%2fuserguide%2fkeycloak-server%2fhtml_single%2findex.html%23themes&data=01%7c01%7chaimv%40perfectomobile.com%7c626641da90b9484e5d2a08d38ef3c0fb%7cceb4c662d6994e7da0bd272619a46977%7c1&sdata=Hii1VGckqpBLk1RNW94EvLMlZdazbCXatypIRAGhWk4%3d>
> chapter and the themes examples
> <https://emea01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fkeycloak%2fkeycloak%2ftree%2fmaster%2fexamples%2fthemes&data=01%7c01%7chaimv%40perfectomobile.com%7c626641da90b9484e5d2a08d38ef3c0fb%7cceb4c662d6994e7da0bd272619a46977%7c1&sdata=lo9wMO8BHKE%2fEZTR6J8FfKMuCyTEjBialzqOGq629LQ%3d>
> but I didn't find a way to customize the missing tenant page
> (instead of the 404 that is thrown).
>
> Is it possible ?
>
> We can’t do it in the web.xml since we want it to only for the
> missing tenant scenario.
>
> Thanks,
>
> Haim.
>
> *From:*Marek Posolda [mailto:mposolda at redhat.com]
> *Sent:* Tuesday, June 07, 2016 10:21 AM
> *To:* Haim Vana <haimv at perfectomobile.com>
> <mailto:haimv at perfectomobile.com>; keycloak-user at lists.jboss.org
> <mailto:keycloak-user at lists.jboss.org>
> *Subject:* Re: [keycloak-user] Custom page for not found realm
> (tenant)
>
> Is the error thrown on application side or on keycloak side? If
> it's on application side and you have servlet application, you can
> configure the custom error page in web.xml . For example see
> https://www.onehippo.org/library/concepts/error-pages-and-error-handling/1.-handling-error-codes-and-exceptions-by-the-web.xml.html
> <https://emea01.safelinks.protection.outlook.com/?url=https%3a%2f%2fwww.onehippo.org%2flibrary%2fconcepts%2ferror-pages-and-error-handling%2f1.-handling-error-codes-and-exceptions-by-the-web.xml.html&data=01%7c01%7chaimv%40perfectomobile.com%7c5730227127a048fb870e08d38ea44dce%7cceb4c662d6994e7da0bd272619a46977%7c1&sdata=K8cKlTEFcGnJbJJXSxYkLV5rS110wO5kW7yTKNuU5DU%3d>
> .
>
> If it's on keycloak side, you can change look&feel of keycloak
> error pages with usage of custom theme. See the docs and our theme
> examples for more details.
>
> Marek
>
>
> On 07/06/16 09:10, Haim Vana wrote:
>
> Hi,
>
> We are using KeyCloak with multi-tenancy, each realm
> represents a tenant (customer).
>
> Sometimes due to setup issue or typo in the realm name we are
> getting 404 page, is there a custom page or a way to customize
> a page for missing realm scenario ?
>
> For example something like – Realm <name> doesn't exist…
>
> Thanks,
>
> Haim.
>
> The information contained in this message is proprietary to
> the sender, protected from disclosure, and may be privileged.
> The information is intended to be conveyed only to the
> designated recipient(s) of the message. If the reader of this
> message is not the intended recipient, you are hereby notified
> that any dissemination, use, distribution or copying of this
> communication is strictly prohibited and may be unlawful. If
> you have received this communication in error, please notify
> us immediately by replying to the message and deleting it from
> your computer. Thank you.
>
>
>
> _______________________________________________
>
> keycloak-user mailing list
>
> keycloak-user at lists.jboss.org
> <mailto:keycloak-user at lists.jboss.org>
>
> https://lists.jboss.org/mailman/listinfo/keycloak-user
> <https://emea01.safelinks.protection.outlook.com/?url=https%3a%2f%2flists.jboss.org%2fmailman%2flistinfo%2fkeycloak-user&data=01%7c01%7chaimv%40perfectomobile.com%7c5730227127a048fb870e08d38ea44dce%7cceb4c662d6994e7da0bd272619a46977%7c1&sdata=dGJHvWU5BkL9%2fD9O%2fVX6TjrfG6geCDU9zsqVV8FgKiU%3d>
>
> The information contained in this message is proprietary to the
> sender, protected from disclosure, and may be privileged. The
> information is intended to be conveyed only to the designated
> recipient(s) of the message. If the reader of this message is not
> the intended recipient, you are hereby notified that any
> dissemination, use, distribution or copying of this communication
> is strictly prohibited and may be unlawful. If you have received
> this communication in error, please notify us immediately by
> replying to the message and deleting it from your computer. Thank
> you.
>
> The information contained in this message is proprietary to the
> sender, protected from disclosure, and may be privileged. The
> information is intended to be conveyed only to the designated
> recipient(s) of the message. If the reader of this message is not the
> intended recipient, you are hereby notified that any dissemination,
> use, distribution or copying of this communication is strictly
> prohibited and may be unlawful. If you have received this
> communication in error, please notify us immediately by replying to
> the message and deleting it from your computer. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160607/b965d845/attachment.html
More information about the keycloak-user
mailing list