Hi,

Regarding to this issue, I've tried to create the "authorization scope" via the admin GUI manually and found strange behavior as the following:-

1. Create the scope with name as urn:photoz.com:scopes:album:view
2. Click save
3. The system should the success, the scope has been created.
4. Go back to the "authorization scope", there is no any displayed scope.

Then I've tried to create again as the following:-

1. Create the scope with name as aaa
2. Click save
3. The system should the success, the scope has been created.
4. Go back to the "authorization scope", the aaa is displayed.
5. Click the aaa to edit
6. Change name from aaa to urn:photoz.com:scopes:album:view
7. The system should the success, the scope has been created.
8. Go back to the "authorization scope", the urn:photoz.com:scopes:album:view is displayed.

Anyhow I cannot find how to delete the created scoped as well. 


I'm not sure if I'm doing something wrong or not. Could you please help to advise further?


--
   Best Regards,

   Charlee Ch

2016-07-05 17:12 GMT+07:00 Charlee Chitsuk <charlee.ch@gmail.com>:

Hi,

I try to follow the authorization photoz example[1]. I can import the realm[2] to the keycloak properly.

Anyhow when importing the authorization json[3] there is a misconfiguration about the drools policy as the "mavenArtifactVersion" should be "2.0.0.Final".

After correcting the version, sadly there is another failure during the importing  the authorization json[3] as

ERROR [io.undertow.request] (default task-100) UT005023: 
Exception handling request to /auth/admin/realms/photoz/clients/001e0705-8bc6-47de-b408-dd07a5ebba9b/authz/resource-server: 
org.jboss.resteasy.spi.UnhandledException: java.lang.IllegalStateException: Not found in database
at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)
        .....
Caused by: java.lang.IllegalStateException: Not found in database
at org.keycloak.models.authorization.infinispan.CachedScopeStore$1.getDelegateForUpdate(CachedScopeStore.java:175)

Could you please help to advise how to fix this issue? Thank you very much for your help in advance. I'm looking forward to hearing from you soon.





--
   Best Regards,

   Charlee Ch