[keycloak-user] Custom identity provider - Resource not found page shown
Jeff Victor
jeff at sweetjacket.com
Fri Jun 7 22:55:46 EDT 2019
I'm trying to implement a custom SAML identity provider in keycloak. The
use case is that I need to be able to specify the value of Issuer in the
SAML authentication request. By default you can see in
SAMLIdentityProvider.java that this is currently set by:
private String getEntityId(UriInfo uriInfo, RealmModel realm) {
return
UriBuilder.fromUri(uriInfo.getBaseUri()).path("realms").path(realm.getName()).build().toString();
}
So you end up with something like:
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
https://mykeycloakinstance.com/auth/realms/acme</saml:Issuer>
So I'm trying to extend SAMLIdentityProvider.java and
SAMLIdentityProviderFactory.java and create my own. The idea being that I
would add a new text field to the SAML identity provider screen where I
could specify the issuer used in the authentication request.
I've created a project which you can find here:
https://github.com/jeff-sweetjacket/keycloak-custom-saml-idp
When I drop this jar into /standalone/deployments it gets picked up and is
registered without issue. However, when I try to add this new identity
provider through the keycloak admin UI I get a "Resource not found..."
page. Here's a relevant stackoverflow question which shows an image of the
screen:
https://stackoverflow.com/questions/52757115/how-to-have-identity-provider-configuration-page-visible-in-keycloak
And an associated issue on this mailing list:
https://lists.jboss.org/pipermail/keycloak-user/2018-October/015828.html
I've gone through the documentation for creating a custom SPI here:
https://www.keycloak.org/docs/latest/server_development/#_providers
But I can't find any information about how to create / modify an existing
page in keycloak admin such as the add SAML identity provider page.
Can anyone point me in the right direction?
Thanks,
Jeff
More information about the keycloak-user
mailing list