Open srinathganesh1 opened 4 years ago
Your client setup in keycloak needs to have:
Service Accounts
enabledview-users
and view-groups
scopes in both client scopes and service account scopes.I can detail more what to do if you want.
I tried setting the scope and service account, and a few more configs. It still didn't work. Updated original post (since 403 stopped coming somehow)
Do you have a sample demo project? or a sample configuration for keycloak
Update: I made this change
and I am getting error
Can you show me the logs from keycloak?
Can you show me the logs from keycloak?
sure will post them.
I will shortly update the original post will all my configuration again (instead of two comments)
Flowable Logs
2020-03-31 16:46:20.360 INFO 19732 --- [nio-8080-exec-5] o.a.c.c.C.[.[.[/flowable-modeler] : Initializing Spring FrameworkServlet 'dispatcherServlet'
2020-03-31 16:46:20.360 INFO 19732 --- [nio-8080-exec-5] o.s.w.s.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization started
2020-03-31 16:46:20.408 INFO 19732 --- [nio-8080-exec-5] o.s.w.s.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 43 ms
Keycloak Logs: Nothing getting logged.
I have updated original post with the latest configs https://github.com/premium-minds/flowable-keycloak/issues/1#issue-585720922
I'll make a sample project from https://github.com/flowable/flowable-engine/tree/master/modules/flowable-ui-modeler.
But it will take some time. Maybe next week. Sorry.
I'll make a sample project from https://github.com/flowable/flowable-engine/tree/master/modules/flowable-ui-modeler.
But it will take some time. Maybe next week. Sorry.
Ok thank you. does my current configs looks fine?
Yes, it looks fine. Maybe there's something missing in the SecurityConfiguration
. But I need some time to test this.
Yes, it looks fine. Maybe there's something missing in the
SecurityConfiguration
. But I need some time to test this.
Ok thanks
@srinathganesh1 can you checkout this commit: https://github.com/premium-minds/flowable-keycloak-example/commit/69dda8c4fb92d9e0c68d766eafeebbaf11a59036
This example is working for flowable-ui-modeler
.
Thanks a lot. I will try it out.
On Mon, 6 Apr, 2020, 20:21 André Camilo, notifications@github.com wrote:
@srinathganesh1 https://github.com/srinathganesh1 can you checkout this commit: premium-minds/flowable-keycloak-example@69dda8c https://github.com/premium-minds/flowable-keycloak-example/commit/69dda8c4fb92d9e0c68d766eafeebbaf11a59036
This example is working for flowable-ui-modeler
@ajcamilo @srinathganesh1 Is this issue fixed? I got the same issue - RESTEASY003210: Could not find resource for full path: http://localhost:8080/flowable-task
@krishnakumar-ls I've only did the modifications in the project flowable-ui-modeler, but if you need for the other projects, just do the same changes from this commit: https://github.com/premium-minds/flowable-keycloak-example/commit/69dda8c4fb92d9e0c68d766eafeebbaf11a59036?
@ajcamilo I did the changes in flowable-task project as per this commit https://github.com/premium-minds/flowable-keycloak-example/commit/69dda8c4fb92d9e0c68d766eafeebbaf11a59036 But still I got the same issue(RESTEASY003210: Could not find resource for full path).
I'll try to get some time in the weekend to check that out, ok?
@ajcamilo Sure.
@krishnakumar-ls what is the version of flowable you are using?
@ajcamilo I'm using Flowable 6.5.0
@ajcamilo Got 404 error for the URL 'http://localhost:8080/flowable-task/' after redirect from keycloak auth server.
Sorry for the delay @krishnakumar-ls
Checkout the new version of https://github.com/premium-minds/flowable-keycloak-example/commit/9d1314a3be5d9f02889eb61c093c1a5a95e9c522
Now flowable-task uses keycloak authentication.
@ajcamilo Thank you! I will try this checkout https://github.com/premium-minds/flowable-keycloak-example/commit/9d1314a3be5d9f02889eb61c093c1a5a95e9c522 Can you you share me the configuration changes in flowable-ui-*-app>src>main>docker>docker-compose.yml to build a flowable docker image.
add the following to the environment
part of the flowable app:
- KEYCLOAK_URL=<url to keycloak>
- KEYCLOAK_REALM=<keycloak realm>
- KEYCLOAK_ISSUER-URL=<issuer url>
- KEYCLOAK_CLIENT_CLIENT-ID=<client id>
- KEYCLOAK_CLIENT_CLIENT-SECRET=<client secret>
@srinathganesh1 hi, have you solved your problem?
@ajcamilo hi, I have a problem , when I run flowable-ui-modeler project there is an error in the program,can you tell me the reason? thank you .
Caused by: java.lang.ClassNotFoundException: com.premiumminds.flowable.conf.KeycloakProperties at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_161] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_161] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) ~[?:1.8.0_161] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_161] at org.springframework.boot.devtools.restart.classloader.RestartClassLoader.loadClass(RestartClassLoader.java:144) ~[spring-boot-devtools-2.2.2.RELEASE.jar:2.2.2.RELEASE] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_161] at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:1.8.0_161] at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[?:1.8.0_161] at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[?:1.8.0_161] at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:463) ~[spring-core-5.2.2.RELEASE.jar:5.2.2.RELEASE] ... 26 more
Process finished with exit code 0
@Sanlisi, did you check this out? https://github.com/premium-minds/flowable-keycloak-example
You can see this commit https://github.com/premium-minds/flowable-keycloak-example/commit/69dda8c4fb92d9e0c68d766eafeebbaf11a59036 It has all the changes needed to the flowable project for the modeler to work with keycloak.
so , I have some questions:
thank you.
@Sanlisi This exception is raised due to user permission issue. You have to add client service account roles by click client -> select 'Service Account Roles' tab -> Add client roles & have to add client role mapping by click user -> select 'Role Mapping' -> add client roles
@krishnakumar-ls @ajcamilo Sorry, I tried your method, but it still doesn’t work,so can you give me a complete images of keycloak ui ? Currently my configuration is like this
Can you give me your email? thank you very much
@Sanlisi the view-users
and view-groups
roles are from the client realm-management
@ajcamilo @srinathganesh1 hi , according to your prompt, yesterday’s problem has been solved, but I encountered a new problem,when I visit the page:http://localhost:8888/flowable-modeler, as if the page has been refreshing,Why is that? Where does Kaycloak UI need to be configured? thank you very much。
Sorry to jump the topic in a different direction (still related to keycloak SSO)
I have not personally tried it, but based on release notes it seems latest flowable has built in keycloak support
@srinathganesh1 @ajcamilo the problem has been solved,I use the 6.6 version,Ref: https://blog.flowable.org/2020/10/12/flowable-6-6-0-release/ ,thank you very much
Updated with latest status (removed some irreverent things):
modules/flowable-ui-modeler/flowable-ui-modeler-conf/src/main/java/org/flowable/ui/modeler/conf/SecurityConfiguration.java
(I was not able to directly replace the class name, since new class name had one extra parameter)modules/flowable-ui-modeler/flowable-ui-modeler-app/src/main/resources/flowable-default.properties
User Permission
Service Account
I had to add view-users from the auto generated master-realm to do away with token error
Error after signin (there are no logs generated for this in flowable and keycloak)