🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)
🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)

🔧 Programmierung 🕛 kürzlich 4 Min Lesezeit
0

Supporting Multiple post.logout.redirect.uris in Keycloak Config CLI

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

In Keycloak configurations, setting up clients with multiple logout redirect URIs can be a challenging task. This guide provides a step-by-step solution to support multiple post.logout.redirect.uris in Keycloak using the Keycloak Config CLI. We’ll dive into why this issue arises, the approach to overcome it, and a practical example on implementing it in your configuration file.






Problem Statement



The Keycloak attribute post.logout.redirect.uris is often used to specify URLs that the client can redirect to after logout. However, by default, Keycloak Config CLI expects this attribute to be a single string rather than an array. This causes an error when trying to add multiple URIs, which typically looks like this:






YAML






CODE
clientId: my-client1
protocol: openid-connect
attributes:
post.logout.redirect.uris:
- /URI1
- /URI2
- /URI3






OR






JSON






CODE
{
"clientId": "my-client1",
"protocol": "openid-connect",
"attributes": {
"post.logout.redirect.uris": [
"/URI1",
"/URI2",
"/URI3"
]
}
}






Keycloak Config CLI throws an error because it cannot deserialize the array, expecting a string instead: The error looks like this




CODE
Cannot deserialize value of type java.lang.String from Array value (token JsonToken.START_ARRAY)
at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: de.adorsys.keycloak.config.model.RealmImport["clients"]->java.util.ArrayList[6]->org.keycloak.representations.idm.ClientRepresentation["attributes"]->java.util.LinkedHashMap["post.logout.redirect.uris"])









Solution Overview



To work around this limitation, the Keycloak suggests using a delimiter, ##, to separate multiple URIs in a single string. The Keycloak Config CLI then processes this string and recognizes it as multiple URIs based on the delimiter. This allows you to specify multiple logout URIs in one configuration line.






How to Implement Multiple post.logout.redirect.uris






Step 1: Update Your JSON Configuration



To configure multiple logout redirect URIs, add them as a single string in your JSON configuration file, separating each URI with ### Here’s an example:






YAML






CODE
realm: "your-realm"
clients:
- clientId: "your-client-id"
enabled: true
redirectUris:
- "https://app1.example.com/callback"
- "https://app2.example.com/callback"
- "https://app3.example.com/callback"
webOrigins:
- "https://app1.example.com"
- "https://app2.example.com"
- "https://app3.example.com"
attributes:
post.logout.redirect.uris: "https://app1.example.com/logout##https://app2.example.com/logout##https://app3.example.com/logout"
protocol: "openid-connect"
publicClient: false
standardFlowEnabled: true
implicitFlowEnabled: false
directAccessGrantsEnabled: true
serviceAccountsEnabled: false
authorizationServicesEnabled: false
fullScopeAllowed: true









JSON






CODE
{
"realm": "your-realm",
"clients": [
{
"clientId": "your-client-id",
"enabled": true,
"redirectUris": [
"https://app1.example.com/callback",
"https://app2.example.com/callback",
"https://app3.example.com/callback"
],
"webOrigins": [
"https://app1.example.com",
"https://app2.example.com",
"https://app3.example.com"
],
"attributes": {
"post.logout.redirect.uris": "https://app1.example.com/logout##https://app2.example.com/logout##https://app3.example.com/logout"
},
"protocol": "openid-connect",
"publicClient": false,
"standardFlowEnabled": true,
"implicitFlowEnabled": false,
"directAccessGrantsEnabled": true,
"serviceAccountsEnabled": false,
"authorizationServicesEnabled": false,
"fullScopeAllowed": true
}
]
}






This approach uses the ## delimiter to separate multiple logout URIs within a single string.






Step 2: Load Your Configuration



Once you've updated your JSON file with the ## delimiter, use Keycloak Config CLI to import your realm configuration. If the configuration is correctly set up, Keycloak will recognize each URI in post.logout.redirect.uris as a separate redirect URI.






Step 3: Verify in the Keycloak Admin Console



To confirm the configuration, open your Keycloak Admin Console and navigate to the relevant client. In the Settings tab, check the "Post Logout Redirect URIs" section to see if each URI is listed individually. If the delimiter is handled correctly, you should see each URI separated, allowing Keycloak to redirect to any of them post-logout.






Why Use a Delimiter?



The Keycloak Config CLI does not support arrays directly for this attribute due to serialization constraints. The delimiter approach provides a flexible workaround, allowing you to specify multiple URIs while retaining compatibility with the CLI’s existing deserialization logic.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
3 Quellen
GPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
1 Quelle
Apple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
1 Quelle
Major AI platforms go down in unprecedented simultaneous outage
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Supporting Multiple post.logout.redirect.uris in Keycloak Config CLI

Thematisch verwandte Begriffe: Supporting, Multiple, postlogoutredirecturis, Keycloak · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...