Created
https://issues.jboss.org/browse/KEYCLOAK-5909. Right now the value
of field "owner" should be the user's identifier and not the username. I
changed to also supposed username and added more validations to avoid such
error.
Thanks.
On Fri, Nov 24, 2017 at 2:21 PM, Corentin Dupont <corentin.dupont(a)gmail.com>
wrote:
PS. I have keycloak 3.4.0.Final now
On Fri, Nov 24, 2017 at 5:20 PM, Corentin Dupont <
corentin.dupont(a)gmail.com> wrote:
> Hi,
> after creating a resource through the API, the "resources" panel on the
> UI will not open anymore:
> *Error!* An unexpected server error has occurred
>
> In the keycloak traces there is:
> keycloak_1 | 16:15:00,037 ERROR [io.undertow.request] (default
> task-27) UT005023: Exception handling request to
> /auth/admin/realms/waziup/clients/0892e431-5daf-413e-b4cf-
> eaee121ee447/authz/resource-s
> erver/resource: org.jboss.resteasy.spi.UnhandledException:
> java.lang.RuntimeException: Could not find the user [guest] who owns the
> Resource [062e4b4f-d931-42c1-8c88-117766797ecd].
>
> The user guest exists...
> I created the resource with something similar to:
> curl -X POST "http://localhost:8080/auth/realms/myrealm/authz/protection/
> resource_set" -H "Content-Type: application/json" -H
"Authorization:
> Bearer $TOKEN" -d '{
> "name": "My house",
> "uri": "/houses/123",
> "scopes": ["view"],
> "owner": "guest"
> }'
>
> Thanks
> Corentin
>