Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/documentation/upgrading/topics/changes/changes-27_0_0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,26 @@ String saUserId = clientResource.toRepresentation().getServiceAccountUserId();
The `getServiceAccountUser()` method has also been removed from the Java and JavaScript admin client libraries.
If you need the full user representation for the service account, use the user ID from the client representation to fetch it via the Users API.

=== Client registration `install` provider removed
// https://github.com/keycloak/keycloak/issues/53478

The `install` client registration provider, which was deprecated in {project_name} 26.8, has been removed.
Requests to `/realms/<realm>/clients-registrations/install/<clientId>` now return a `404 Not Found` response.

The following related APIs have also been removed:

* The `getAdapterConfig()` method of the `ClientRegistration` class in the Java client registration library (`keycloak-client-registration-api`).
* The `install` endpoint type (`-e install` or `-e adapter`) of the `kcreg get` command.

Retrieve the adapter configuration of a client with the Admin REST API instead, using `GET /admin/realms/<realm>/clients/<client-uuid>/installation/providers/<provider-id>`, for example with the `keycloak-oidc-keycloak-json` provider.
The same configuration is available from `kcadm.sh get clients/<client-uuid>/installation/providers/keycloak-oidc-keycloak-json`.

The removed endpoint accepted client credentials or a registration access token, and it did not require authentication for public clients.
The Admin REST API endpoint requires an access token with permission to view the client.
Applications that loaded their `keycloak.json` anonymously from the removed endpoint, such as JavaScript applications, must bundle the configuration with the application or fetch it with an authenticated call.

The `default` and `saml2-entity-descriptor` client registration providers remain deprecated and are not affected by this change.

=== Kerberos password authentication accepts only allowed realms
// https://github.com/keycloak/keycloak/issues/54271

Expand Down
21 changes: 0 additions & 21 deletions docs/guides/securing-apps/client-registration-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -279,27 +279,6 @@ $ kcreg.sh get myclient
C:\> kcreg get myclient
----

[WARNING]
====
The `-e install` flag retrieves adapter configuration via the deprecated `install` client registration provider.
Use the Admin REST API (`GET /admin/realms/<realm>/clients/<client-uuid>/installation/providers/<provider-id>`) instead.
====

You can also retrieve the client configuration as an adapter configuration file, which you can package with your web application.

For example, on:

* Linux:
[options="nowrap"]
----
$ kcreg.sh get myclient -e install > keycloak.json
----
* Windows:
[options="nowrap"]
----
C:\> kcreg get myclient -e install > keycloak.json
----

Run the [command]`kcreg get --help` command for more information about the [command]`kcreg get` command.


Expand Down
25 changes: 1 addition & 24 deletions docs/guides/securing-apps/client-registration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ The Client Registration Service endpoint is `/realms/<realm>/clients-registratio
The built-in supported `providers` are:

* default - {project_name} Client Representation (JSON)
* install - {project_name} Adapter Configuration (JSON)
* openid-connect - OpenID Connect Client Metadata Description (JSON)
* saml2-entity-descriptor - SAML Entity Descriptor (XML)

Expand Down Expand Up @@ -115,28 +114,6 @@ It will also return a new registration access token.
To delete the Client Representation perform an HTTP DELETE request to:
`/realms/<realm>/clients-registrations/default/<client id>`

== {project_name} adapter configuration

[WARNING]
====
The `install` client registration provider is deprecated since {project_name} 26.8 and will be removed in a future major release.
Retrieve adapter configuration via the Admin REST API (`GET /admin/realms/<realm>/clients/<client-uuid>/installation/providers/<provider-id>`) instead.
====

The `installation` client registration provider can be used to retrieve the adapter configuration for a client.
In addition to token authentication you can also authenticate with client credentials using HTTP basic authentication.
To do this include the following header in the request:

[source]
----
Authorization: basic BASE64(client-id + ':' + client-secret)
----

To retrieve the Adapter Configuration then perform an HTTP GET request to `/realms/<realm>/clients-registrations/install/<client id>`.

No authentication is required for public clients.
This means that for the JavaScript adapter you can load the client configuration directly from {project_name} using the above URL.

== OpenID Connect Dynamic Client Registration

{project_name} implements https://openid.net/specs/openid-connect-registration-1_0.html[OpenID Connect Dynamic Client Registration], which extends https://datatracker.ietf.org/doc/html/rfc7591[OAuth 2.0 Dynamic Client Registration Protocol] and https://datatracker.ietf.org/doc/html/rfc7592[OAuth 2.0 Dynamic Client Registration Management Protocol].
Expand Down Expand Up @@ -194,7 +171,7 @@ For full instructions on using the Client Registration refer to the JavaDocs.
Below is an example of creating a client. You need to replace `eyJhbGciOiJSUz...` with a proper initial access token or bearer token.
[WARNING]
====
The `ClientRegistration` methods `reg.create()`, `reg.get()`, `reg.update()`, and `reg.delete()` target `default`; `reg.getAdapterConfig()` targets `install`; and `reg.saml().create()` targets `saml2-entity-descriptor`. These providers are deprecated since {project_name} 26.8 and will be removed in a future major release.
The `ClientRegistration` methods `reg.create()`, `reg.get()`, `reg.update()`, and `reg.delete()` target `default`; and `reg.saml().create()` targets `saml2-entity-descriptor`. These providers are deprecated since {project_name} 26.8 and will be removed in a future major release.
New integrations should use the replacement Admin REST API endpoints described above, or the OpenID Connect dynamic client registration endpoint for OIDC client registration.
====
[source,java,subs="attributes+"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
public enum EndpointType {
DEFAULT("default", "default"),
OIDC("openid-connect", "oidc", "oidc"),
INSTALL("install", "install", "adapter"),
SAML2("saml2-entity-descriptor", "saml2", "saml2");

private String endpoint;
Expand All @@ -47,8 +46,6 @@ public static EndpointType of(String name) {
return DEFAULT;
} else if (OIDC.endpoint.equals(name) || OIDC.alternativeNames.contains(name)) {
return OIDC;
} else if (INSTALL.endpoint.equals(name) || INSTALL.alternativeNames.contains(name)) {
return INSTALL;
} else if (SAML2.endpoint.equals(name) || SAML2.alternativeNames.contains(name)) {
return SAML2;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.keycloak.client.cli.config.ConfigData;
import org.keycloak.client.registration.cli.CmdStdinContext;
import org.keycloak.client.registration.cli.EndpointType;
import org.keycloak.representations.adapters.config.AdapterConfig;
import org.keycloak.representations.idm.ClientRepresentation;
import org.keycloak.representations.oidc.OIDCClientRepresentation;
import org.keycloak.util.JsonSerialization;
Expand Down Expand Up @@ -127,10 +126,6 @@ protected void process() {
});
break;
}
case INSTALL: {
result = JsonSerialization.readValue(json, AdapterConfig.class);
break;
}
case SAML2: {
break;
}
Expand Down Expand Up @@ -169,7 +164,7 @@ protected String help() {
out.println(" CLIENT ClientId of the client to display");
out.println(" -t, --token TOKEN Use the specified Registration Access Token for authorization");
out.println(" -c, --compressed Don't pretty print the output");
out.println(" -e, --endpoint TYPE Endpoint type to use - one of: 'default', 'oidc', 'install'");
out.println(" -e, --endpoint TYPE Endpoint type to use - one of: 'default', 'oidc'");
out.println();
out.println("Examples:");
out.println();
Expand All @@ -179,9 +174,6 @@ protected String help() {
out.println("Get configuration in OIDC format:");
out.println(" " + PROMPT + " " + CMD + " get my_client -e oidc");
out.println();
out.println("Get adapter configuration for the client:");
out.println(" " + PROMPT + " " + CMD + " get my_client -e install");
out.println();
out.println();
out.println("Use '" + CMD + " help' for general information and a list of commands");
return sb.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static String usage() {
out.println("Commands: ");
out.println(" config Set up credentials, and other configuration settings using the config file");
out.println(" create Register a new client");
out.println(" get Get configuration of existing client in Keycloak or OIDC format, or adapter install configuration");
out.println(" get Get configuration of existing client in Keycloak or OIDC format");
out.println(" update Update a client configuration");
out.println(" delete Delete a client");
out.println(" attrs List available attributes");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.io.IOException;
import java.io.InputStream;

import org.keycloak.representations.adapters.config.AdapterConfig;
import org.keycloak.representations.idm.ClientRepresentation;
import org.keycloak.representations.oidc.OIDCClientRepresentation;
import org.keycloak.util.JsonSerialization;
Expand Down Expand Up @@ -48,7 +47,6 @@ public class ClientRegistration {
private final String XML = "application/xml";

private final String DEFAULT = "default";
private final String INSTALLATION = "install";
private final String OIDC = "openid-connect";
private final String SAML = "saml2-entity-descriptor";

Expand Down Expand Up @@ -85,11 +83,6 @@ public ClientRepresentation get(String clientId) throws ClientRegistrationExcept
return resultStream != null ? deserialize(resultStream, ClientRepresentation.class) : null;
}

public AdapterConfig getAdapterConfig(String clientId) throws ClientRegistrationException {
InputStream resultStream = httpUtil.doGet(JSON, INSTALLATION, clientId);
return resultStream != null ? deserialize(resultStream, AdapterConfig.class) : null;
}

public ClientRepresentation update(ClientRepresentation client) throws ClientRegistrationException {
String content = serialize(client);
InputStream resultStream = httpUtil.doPut(content, JSON, UTF_8, JSON, DEFAULT, client.getClientId());
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class ClientRegistrationService {

private final KeycloakSession session;

private static final Set<String> DEPRECATED_PROVIDER_IDS = Set.of("default", "install", "saml2-entity-descriptor");
private static final Set<String> DEPRECATED_PROVIDER_IDS = Set.of("default", "saml2-entity-descriptor");

public ClientRegistrationService(KeycloakSession session, EventBuilder event) {
this.session = session;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@

org.keycloak.services.clientregistration.DefaultClientRegistrationProviderFactory
org.keycloak.services.clientregistration.oidc.OIDCClientRegistrationProviderFactory
org.keycloak.services.clientregistration.AdapterInstallationClientRegistrationProviderFactory
org.keycloak.protocol.saml.clientregistration.EntityDescriptorClientRegistrationProviderFactory
Loading
Loading