An API to fetch external profiles from another system (specifically a skill tagging platform) and import certain properties from matched external records into our entities via the frontend.
You can find the latest version of the needed configuration in the package aambackendservice.skill.di.
The classes with the @ConfigurationProperties defines the needed properties.
An example configuration would be:
features:
skill-api:
mode: disabledHere an example configuration for the SkillLab project 42
features:
skill-api:
enabled: true
mode: skilllab
skilllab-api-client-configuration:
base-path: https://skilllab.app/<some-api-path>/project/42
api-key: this-is-a-secret
project-id: 42
response-timeout-in-seconds: 30 # (default value)
Example for the realm: dummy-realm
- Open the Keycloak user interface and navigate to the
dummy-realm - Go to
Realm roles - Create two new roles by clicking on
Create role:skill_adminskill_reader
- assign role to the
User(s)orGroup(s)who should be able to access the external profiles data
It's necessary to add the roles to the JWT token to verify the roles in the backend.
For that, add an roles mapper for each client that sends requests to the skill api.
This should usually be the app client
- Open the Keycloak user interface and navigate to the
dummy-realm - Go to
Clients - Open the
appclient - Switch to tab
Client scopes - Add the pre-defined client scope
roleswith Assigned Typedefault
You can make a request to the API to check if a certain feature is currently enabled and available:
> GET /actuator/features
// response:
{
"skill": { "enabled": true }
}
If the aam-services backend is not deployed at all, such a request will usually return a HTTP 504 error. You should also account for that possibility.
Every 10 minutes the backend fetches the profiles that changed in SkillLab since the last sync and stores them locally. The time of the last sync is kept per project. It advances with every sync that could fetch from SkillLab, even when individual profiles failed to sync.
Known limitations (neither is retried automatically):
- A profile that fails to sync is skipped until it changes again. The failure is logged as a warning, but the next scheduled sync only asks for profiles changed since the last sync, so it will not pick up the skipped profile unless that profile is edited in SkillLab again.
- At most 10,000 profiles are fetched per sync. If more have changed, the rest are skipped the same way, and this is not logged.
To recover, an admin (role skill_admin) can trigger a sync manually:
# re-import everything
> POST /v1/skill/sync/{projectId}?syncMode=FULL
# re-import everything changed since a given time
> POST /v1/skill/sync/{projectId}?syncMode=DELTA&updatedFrom=2024-12-03T11:50:00.231Z
A full re-import is still subject to the 10,000 profile limit.
Define an Entity attribute of dataType "external-profile" to integrate the API in the application for users. Refer to external-profile.datatype for required config details.
