Skip to content
README.md 1.83 KiB
Newer Older
Pierre Ozoux's avatar
Pierre Ozoux committed
# SCIM Service Provider
Pierre Ozoux's avatar
Pierre Ozoux committed

Pierre Ozoux's avatar
Pierre Ozoux committed
This app allows to provision users and groups in Nextcloud from a scim client.

Pierre Ozoux's avatar
Pierre Ozoux committed
You can see the [video](https://hot-objects.liiib.re/meet-liiib-re-recordings/pair_2022-05-02-15-40-37.mp4) that shows how it works.
Pierre Ozoux's avatar
Pierre Ozoux committed

## Limitations

 - doesn't accept `application/scim+json` content-type, but only `application/json`
 - doesn't implement `meta:createdAt` nor `meta:lastModified` due to this [bug](https://github.com/nextcloud/server/issues/22640) (return unix epoch instead).

Pierre Ozoux's avatar
Pierre Ozoux committed
## How to use

We plan to publish on the Nextcloud app store, but in the mean time, you can use instructions at the bottom.

## Use with Keycloak

You can use with the [SCIM plugin we developped for keycloak](https://lab.libreho.st/libre.sh/scim/keycloak-scim).

Pierre Ozoux's avatar
Pierre Ozoux committed
## Running tests
Pierre Ozoux's avatar
Pierre Ozoux committed

Pierre Ozoux's avatar
Pierre Ozoux committed
To run the test, you can use [insomnia UI](https://docs.insomnia.rest).
Pierre Ozoux's avatar
Pierre Ozoux committed

Pierre Ozoux's avatar
Pierre Ozoux committed
![screenshot insomnia ui](./screenshots/insomnia.png)
Pierre Ozoux's avatar
Pierre Ozoux committed

Pierre Ozoux's avatar
Pierre Ozoux committed
For CI, there is still [a bug](https://github.com/Kong/insomnia/issues/4747) we need to find a fix.
Pierre Ozoux's avatar
Pierre Ozoux committed

Pierre Ozoux's avatar
Pierre Ozoux committed
## Todo

 - [ ] Meta (Create our own table)
Pierre Ozoux's avatar
Pierre Ozoux committed
    - createdAt
    - lastModified
 - [ ] ExternalID for Groups (Create our onw table)
 - [ ] json exceptions
 - [ ] group member removal
 - [ ] pagination
 - [ ] CI/CD
   - [ ] Lint cs:check
   - [ ] test psalm
   - [ ] test insomnia
   - [ ] publish app on app store
 - [ ] lib user scim php
 - [ ] accept first email, even if not primary
Pierre Ozoux's avatar
Pierre Ozoux committed

Pierre Ozoux's avatar
Pierre Ozoux committed
## Quick "Deploy" to test
Pierre Ozoux's avatar
Pierre Ozoux committed

Pierre Ozoux's avatar
Pierre Ozoux committed
```
cd apps
Pierre Ozoux's avatar
Pierre Ozoux committed
wget https://lab.libreho.st/libre.sh/scim/nextcloud-scim/-/archive/main/nextcloud-scim-main.zip
Pierre Ozoux's avatar
Pierre Ozoux committed
unzip nextcloud-scim-main.zip
rm nextcloud-scim-main.zip
rm -rf scimserviceprovider
Pierre Ozoux's avatar
Pierre Ozoux committed
mv nextcloud-scim-main scimserviceprovider
Pierre Ozoux's avatar
Pierre Ozoux committed
```

## NextGov Hackathon

Pierre Ozoux's avatar
Pierre Ozoux committed
This app was started during the [Nextgov hackathon](https://eventornado.com/submission/automatic-sso-saml-sync-from-identity-provider-keycloak-through-a-well-known-protocol-scim?s=1#idea)!