Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: skillLab integration #52

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

tomwwinter
Copy link
Contributor

No description provided.

@tomwwinter tomwwinter force-pushed the tw/feat/skilllab-integration branch 3 times, most recently from 4624194 to 208ad38 Compare November 28, 2024 12:20
Copy link

github-actions bot commented Dec 4, 2024

Code Coverage Analyse

Overall Project 57.46% -9.59%
Files changed 47.71%

File Coverage
SecurityConfiguration.kt 100% 🍏
ReportCalculationEventListener.kt 100% 🍏
ObjectMapperConfiguration.kt 100% 🍏
SkillLabFetchUserProfileUpdatesUseCase.kt 100% 🍏
SkillLabSyncUserProfileUseCase.kt 98.64% -1.36% 🍏
SqlSearchUserProfileUseCase.kt 94.03% -5.97% 🍏
EscoSkill.kt 91.43% -8.57% 🍏
SearchUserProfileUseCase.kt 90% -10% 🍏
FetchUserProfileUpdatesUseCase.kt 88.89% -11.11% 🍏
SkillLabUserProfileEntity.kt 85.94% -11.72% 🍏
SyncUserProfileUseCase.kt 83.33% -16.67%
UserProfileUpdateEvent.kt 76% -24%
SkillLabUserProfileSyncEntity.kt 69.64% -25%
SkillReferenceEntity.kt 52.94% -29.41%
DefaultCouchDbClient.kt 50.59% 🍏
AamAuthenticationConverter.kt 35.29% -64.71%
UserProfile.kt 28.45% -66.38%
Application.kt 25% 🍏
SkillLabClient.kt 18.56% -70.22%
SkillConfiguration.kt 15% -70%
DefaultUserProfileUpdateConsumer.kt 0% -88%
DefaultUserProfileUpdatePublisher.kt 0% -87.76%
SkillController.kt 0% -92.15%
SkillAdminController.kt 0% -91.35%
SyncSkillsJob.kt 0% -86.08%
SkillConfigurationSkillLab.kt 0% -70.23%
UserProfileUpdateEventQueueConfiguration.kt 0% -66.67%
SyncRepository.kt 0% -3.57%

Copy link
Member

@sleidig sleidig left a comment

Choose a reason for hiding this comment

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

Looks great! 🥇

We should add a small README to the module folder and include that architecture diagram, I think. It took me a little while until I understood the purpose of the various consumers and use cases - seeing the rough overall architecture would probably help navigate this more easily.

Otherwise code looks very clean and simple to me.

Comment on lines +30 to +33
.filter { it.startsWith("aam_") }
.map {
SimpleGrantedAuthority("ROLE_$it")
}
Copy link
Member

Choose a reason for hiding this comment

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

I am a bit lost here, looking at this as a new dev. Do we have any description about how the roles are used and mapped for us?

Is the "aam_" added internally or already do be defined in the Keycloak roles?
How to use the @PreAuthorize("hasAuthority('ROLE_aam_skill_admin')") in the following files: which parts are hard prefixes and which ones the name of the role in Keycloak? (Maybe we could have one annotation to check exactly against a keycloak role name to make this easier to understand?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"aam_skill_admin" is the name of the role in the token and in Keycloak. The "ROLE_" prefix is an spring boot convention, not really necessary.

return asSuccessResponse(searchResults)
}

val searchNames = listOf(nameParts.first(), nameParts.last())
Copy link
Member

Choose a reason for hiding this comment

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

why not iterate every name part (including middle names, etc.)?

@tomwwinter tomwwinter force-pushed the tw/feat/skilllab-integration branch from 52d21c3 to d9ba26e Compare December 10, 2024 20:23
fix: ObjectMapperConfiguration

fix: fallback for SkillUsage Enum

fix: pr feedback

docs: draft skill.md

Update application/aam-backend-service/src/main/resources/application.yaml

Co-authored-by: Sebastian <[email protected]>

Update application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/skill/controller/SkillAdminController.kt

Co-authored-by: Sebastian <[email protected]>

Update application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/skill/core/SqlSearchUserProfileUseCase.kt

Co-authored-by: Sebastian <[email protected]>

fix: di relicts

fix: pr feedback and some tests

feat: pagination for search results

feat: protect endpoints and conditional configuration

feat: skillLab admin api

feat: improve user profile search

fix: default query params and escoUri

feat: at user-profile/id endpoint

feat: add skill module with skill-api

ci: dont trigger on main pushes

docs: add skill-api-v1.yaml

ci: add publish script for external-mock-service

fix: use correct dto for skillab api

feat: add external-mocks-application with skilllab mock
@tomwwinter tomwwinter force-pushed the tw/feat/skilllab-integration branch from d9ba26e to 6173e87 Compare December 10, 2024 20:25
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