Jämpti autorisaatio mankeli IAM:eille
Requirements: docker, npm
# Install dependencies
$ npm i
# Start the server (you can also use npm start)
$ docker compose up
Jami API should now be available at http://localhost:3000/. Configure the port for your needs in docker-compose.yml
.
If you need the importer client to work locally (to fetch a person's Sisu roles), you will need an api-gw token. Check documentation in GitLab for information on how to get one. If you already have a token for Oodikone, you can use that. Otherwise, select "Oodikone" when creating a new token. Once you have the token, add it to the .env
file like this:
IMPORTER_DB_API_TOKEN=your-token-here
- Body
{
"userId": "hy-hlo-12345678",
"iamGroups": ["hy-employees", "grp-toska"]
}
- Response
{
"500-M009": {
"read": true,
"write": true,
"admin": true
},
"T920101": {
"read": true,
"write": false,
"admin": false
},
"specialGroup": {
"superAdmin": true
}
}
- Response
Array<Faculty>
- Response
{
"id": "hy-hlo-12345678",
"iamGroups": ["hy-employees", "grp-toska"],
}
- Response
{
"500-M009": {
"read": true,
"write": true,
"admin": true
},
"T920101": {
"read": true,
"write": true,
"admin": true
},
// ...
"specialGroup": {
"allProgrammes": true
}
}
- Response: the FACULTIES object from ./src/organisation/faculties.ts
- Response: all user's iam groups and their computed access rights:
[
{
"id": "hy-hlo-12345678",
"iamGroups": ["hy-employees", "grp-toska"],
"500-M009": {
"read": true,
"write": true,
"admin": true
},
"T920101": {
"read": true,
"write": false,
"admin": false
},
"specialGroup": {
"superAdmin": true
}
},
// ...
]
Like GET /all-access
, but for a specified list of users. This endpoint also includes the information about full access to student data in Sisu.
NB! Might be slow for large amounts of users, if Sisu access info is not in the cache (currently stored for 24 hours).
- Body
{
"userIds": ["hy-hlo-12345678", ...],
}
- Response
[
{
"id": "hy-hlo-12345678",
"iamGroups": [
"hy-employees",
"grp-toska"
],
"access": {},
"specialGroup": {
"superAdmin": true,
"fullSisuAccess": true
}
},
...
]
- Response: all unique iam groups in Jami DB:
["grp-toska", "hy-employees"]
GET
/ping
=> pong