Skip to content

Comments

keycloak-integration#268

Draft
kofi-k wants to merge 1 commit intomainfrom
keycloak-integration
Draft

keycloak-integration#268
kofi-k wants to merge 1 commit intomainfrom
keycloak-integration

Conversation

@kofi-k
Copy link
Collaborator

@kofi-k kofi-k commented Oct 16, 2025

No description provided.

@kofi-k kofi-k force-pushed the keycloak-integration branch 2 times, most recently from 4ec56ef to 6ba46f6 Compare October 20, 2025 10:38
@kofi-k kofi-k marked this pull request as ready for review October 20, 2025 10:38
@kofi-k kofi-k requested a review from Erikvv October 20, 2025 10:38
@Erikvv
Copy link
Member

Erikvv commented Oct 20, 2025

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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JavaScript and Java each have their own AnyLogic Cloud client. So it can't be shared.

@kofi-k kofi-k force-pushed the keycloak-integration branch from 6ba46f6 to ef0a63d Compare October 21, 2025 21:11
@kofi-k kofi-k force-pushed the keycloak-integration branch from ef0a63d to 8c79a48 Compare October 22, 2025 13:51
@kofi-k kofi-k requested a review from Erikvv October 24, 2025 10:20
@Erikvv Erikvv marked this pull request as draft November 21, 2025 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants