Conversation
4ec56ef to
6ba46f6
Compare
|
This is going in the the right direction. We need to mind that we don't break existing stuff. I think it would be a good idea to put Keycloak integration behind a feature flag. |
| val path = req.path("path") ?: "" | ||
|
|
||
| if (idToken == null) { | ||
| return@handler Response(UNAUTHORIZED).body("Not logged in") |
There was a problem hiding this comment.
Some models can be accessed without being logged in.
I'm not sure how we will express this in keycloak. Maybe we can link those models to the service account user of the client. I've noted this down in #217
| return@handler Response(UNAUTHORIZED).body("Not logged in") | ||
| } | ||
|
|
||
| val modelId = Regex("api/open/8\\.5\\.0/versions/([^/]+)/runs") |
There was a problem hiding this comment.
This is the version ID not the model ID.
We'll need to query AnyLogic cloud to get the model ID. You can get the full list of models and versions via GET /api/open/8.5.0/models. Can be done through AnyLogicCloudClient.getModels() see https://anylogic.help/cloud/api/java.html.
(There is no direct API call to get the model ID from a version ID.)
This is getting a bit more complicated than I had hoped.
There was a problem hiding this comment.
I see we already have an AnyLogicCloudClient in the site module, makes sense to me to move it into shared if we're going to need it on the backend side of things
There was a problem hiding this comment.
JavaScript and Java each have their own AnyLogic Cloud client. So it can't be shared.
6ba46f6 to
ef0a63d
Compare
ef0a63d to
8c79a48
Compare
No description provided.